Changeset 756 for trunk/lib/SVNlog.cc
 Timestamp:
 Jan 27, 2009, 12:13:28 AM (13 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/lib/SVNlog.cc
r693 r756 114 114 { 115 115 SVNlog log; 116 std::vector<Commitment>::iterator lhs_iter=lhs.commits().begin(); 117 std::vector<Commitment>::const_iterator rhs_iter=rhs.commits().begin(); 118 while(lhs_iter<lhs.commits().end() && rhs_iter<rhs.commits().end()) { 119 if (lhs_iter>revision() < rhs_iter>revision()) { 120 121 log.commits().push_back(*lhs_iter); 122 ++lhs_iter; 123 } 124 else if (rhs_iter>revision()<lhs_iter>revision()) { 125 log.commits().push_back(*rhs_iter); 126 ++rhs_iter; 127 } 128 else { 129 log.commits().push_back(*lhs_iter); 130 ++lhs_iter; 131 ++rhs_iter; 132 } 133 } 134 while(lhs_iter<lhs.commits().end()) { 135 log.commits().push_back(*lhs_iter); 136 ++lhs_iter; 137 } 138 while(rhs_iter<rhs.commits().end()) { 139 log.commits().push_back(*rhs_iter); 140 ++rhs_iter; 141 } 116 log.commits().reserve(std::max(lhs.commits().size(), rhs.commits().size())); 117 std::set_union(lhs.commits().begin(), lhs.commits().end(), 118 rhs.commits().begin(), rhs.commits().end(), 119 std::back_inserter(log.commits()), LessRevision()); 142 120 lhs.swap(log); 143 121 return lhs;
Note: See TracChangeset
for help on using the changeset viewer.