Changeset 1218 for trunk/lib/SVNblame.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/SVNblame.cc

    r978 r1218  
    3131
    3232  SVNblame::SVNblame(const std::string& path)
    33     : binary_(false), instance_(SVN::instance())
     33    : instance_(SVN::instance())
    3434  {
    35     if (svn_error_t* err=
    36         instance_->client_blame(path.c_str(), blame_receiver,
    37                                 static_cast<void*>(&blame_receiver_baton_))) {
    38       // SVN_ERR_CLIENT_IS_BINARY_FILE is the only error allowed to
    39       // escape the client_blame call
    40       svn_error_clear(err);
    41       binary_=true;
    42     }
     35    instance_->client_blame(path.c_str(), blame_receiver,
     36                            static_cast<void*>(&blame_receiver_baton_));
    4337    blame_info_iterator_ = blame_receiver_baton_.blame_info.begin();
    4438  }
     
    4640
    4741  SVNblame::SVNblame(const std::string& path, svn_revnum_t rev)
    48     : binary_(false), instance_(SVN::instance())
     42    : instance_(SVN::instance())
    4943  {
    50     if (svn_error_t* err=
    51         instance_->client_blame(path.c_str(), blame_receiver,
    52                                 static_cast<void*>(&blame_receiver_baton_),
    53                                 rev)) {
    54       // SVN_ERR_CLIENT_IS_BINARY_FILE is the only error allowed to
    55       // escape the client_blame call
    56       svn_error_clear(err);
    57       binary_=true;
    58     }
     44    instance_->client_blame(path.c_str(), blame_receiver,
     45                            static_cast<void*>(&blame_receiver_baton_),
     46                            rev);
    5947    blame_info_iterator_ = blame_receiver_baton_.blame_info.begin();
    6048  }
     
    7563  {
    7664    return (*blame_info_iterator_)->author;
    77   }
    78 
    79 
    80   bool SVNblame::binary(void)
    81   {
    82     return binary_;
    8365  }
    8466
Note: See TracChangeset for help on using the changeset viewer.