Changeset 1218 for trunk/lib/SVN.cc


Ignore:
Timestamp:
Oct 10, 2010, 4:27:39 AM (11 years ago)
Author:
Peter Johansson
Message:

refs #371. Remove variable binary_ in SVNblame, which was not
used. SVNblame will now fail if ued on binary file (but we don't call
blame on binary files). The SVN class now takes care of svn errors and
translate them into exceptions via the cleanup function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/SVN.cc

    r1217 r1218  
    181181
    182182
    183   svn_error_t* SVN::client_blame(const std::string& path,
    184                                 svn_client_blame_receiver_t receiver,
    185                                 void *baton, svn_revnum_t rev)
     183  void SVN::client_blame(const std::string& path,
     184                        svn_client_blame_receiver_t receiver,
     185                        void *baton, svn_revnum_t rev)
    186186  {
    187187    svn_opt_revision_t head;
    188188    head.kind=svn_opt_revision_number;
    189189    head.value.number=rev;
    190     return client_blame_call(path, receiver, baton, head);
    191   }
    192 
    193   svn_error_t* SVN::client_blame(const std::string& path,
    194                                 svn_client_blame_receiver_t receiver,
    195                                 void *baton)
     190    client_blame_call(path, receiver, baton, head);
     191  }
     192
     193  void SVN::client_blame(const std::string& path,
     194                        svn_client_blame_receiver_t receiver,
     195                        void *baton)
    196196  {
    197197    svn_opt_revision_t head;
    198198    head.kind = ( svn_path_is_url(path.c_str()) ?
    199199                  svn_opt_revision_head : svn_opt_revision_base );
    200     return client_blame_call(path, receiver, baton, head);
    201   }
    202 
    203 
    204   svn_error_t* SVN::client_blame_call(const std::string& path,
    205                                       svn_client_blame_receiver_t receiver,
    206                                       void *baton, svn_opt_revision_t& head)
     200    client_blame_call(path, receiver, baton, head);
     201  }
     202
     203
     204  void SVN::client_blame_call(const std::string& path,
     205                              svn_client_blame_receiver_t receiver,
     206                              void *baton, svn_opt_revision_t& head)
    207207  {
    208208    // Setup to use all revisions
     
    216216                                       false, receiver, baton, context_,
    217217                                       subpool);
    218     if (err && err->apr_err!=SVN_ERR_CLIENT_IS_BINARY_FILE)
     218    if (err)
    219219      // cleanup will throw an exception
    220220      cleanup(err, subpool, "SVN::client_blame: svn_client_blame3 failed");
    221221    svn_pool_destroy(subpool);
    222     return err;
    223222  }
    224223
     
    328327    if (info->repos_root_URL)
    329328      rurb->path=info->repos_root_URL;
    330 
    331329    return SVN_NO_ERROR;
    332330  }
Note: See TracChangeset for help on using the changeset viewer.