Changeset 573 for branches


Ignore:
Timestamp:
Mar 18, 2008, 2:11:36 PM (15 years ago)
Author:
Peter Johansson
Message:

fixes #281

Location:
branches/0.6-stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/0.6-stable/bin/svndigest.cc

    r486 r573  
    9696  }
    9797  catch (SVNException e) {
    98     std::cerr << "\nsvndigest: " << e.what()
    99               << "\nsvndigest: failed to initilize subversion access for "
    100               << option->root() << std::endl;
     98    std::cerr << "svndigest: " << e.what() << "\n";
    10199    exit(-1);
    102100  }
  • branches/0.6-stable/lib/SVN.cc

    r572 r573  
    9898    // setup, maybe this is unnecessary?
    9999    const char* canonical_path=svn_path_internal_style(path.c_str(), pool_);
    100     if (svn_error_t *err=svn_wc_adm_open3(&adm_access_, NULL, canonical_path,
    101                                           false, -1, context_->cancel_func,
    102                                           context_->cancel_baton, pool_))
     100    if ((err=svn_wc_adm_open3(&adm_access_, NULL, canonical_path,
     101                              false, -1, context_->cancel_func,
     102                              context_->cancel_baton, pool_))){
     103      if (err->apr_err == SVN_ERR_WC_NOT_DIRECTORY)
     104        cleanup_failed_init(err, std::string(err->message), true);
    103105      cleanup_failed_init(err, "SVN: svn_wc_adm_open3 failed");
     106    }
    104107
    105108    // get a session to the repository
    106109    struct root_url_receiver_baton rurb;
    107110    client_info(path, root_url_receiver, static_cast<void*>(&rurb));
    108     if (svn_error_t *err=svn_client_open_ra_session(&ra_session_,
    109                                                     rurb.path.c_str(),
    110                                                     context_, pool_))
     111    if ((err=svn_client_open_ra_session(&ra_session_,
     112                                        rurb.path.c_str(),
     113                                        context_, pool_)))
    111114      cleanup_failed_init(err, "SVN: svn_client_open_ra_session failed");
    112115  }
     
    125128
    126129  void SVN::cleanup(svn_error_t *err,apr_pool_t *pool,
    127                     const std::string& message)
    128   {
    129     svn_handle_error2(err,stderr,false,"svndigest: ");
     130                    std::string message, bool mute)
     131  {
     132    if (!mute)
     133      svn_handle_error2(err,stderr,false,"svndigest: ");
    130134    svn_error_clear(err);
    131135    if (pool){
     
    138142
    139143
    140   void SVN::cleanup_failed_init(svn_error_t *err, const std::string& message)
    141   {
    142     cleanup(err,pool_);
     144  void SVN::cleanup_failed_init(svn_error_t *err, const std::string& message,
     145                                bool mute)
     146  {
     147    cleanup(err,pool_, "", true);
    143148    throw SVNException(message);
    144149  }
  • branches/0.6-stable/lib/SVN.h

    r430 r573  
    203203    ///
    204204    SVN(const SVN&);
     205    SVN& operator=(const SVN&);
    205206
    206207    ///
     
    214215       This function will write an error message to stdout, free \a
    215216       err and \a pool resources. If \a err or \a pool are a NULL
    216        pointers the function will do nothing with these resources.
     217       pointers the function will do nothing with these resources. If
     218       \a mute is true, no error message is written.
    217219
    218220       cleanup will throw a SVNException if \a message has
     
    223225    */
    224226    void cleanup(svn_error_t *err, apr_pool_t *pool,
    225                  const std::string& message=std::string());
     227                 std::string message=std::string(), bool mute=false);
    226228
    227229    /**
     
    235237       @see SVNException
    236238    */
    237     void cleanup_failed_init(svn_error_t *err, const std::string& message);
     239    void cleanup_failed_init(svn_error_t *err, const std::string& message,
     240                             bool mute=false);
    238241
    239242    static SVN* instance_;
Note: See TracChangeset for help on using the changeset viewer.