Changeset 1108
- Timestamp:
- Jul 1, 2010, 3:14:23 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.7-stable/lib/SVNlog.cc
r847 r1108 3 3 /* 4 4 Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson 5 Copyright (C) 2009 Peter Johansson5 Copyright (C) 2009, 2010 Peter Johansson 6 6 7 7 This file is part of svndigest, http://dev.thep.lu.se/svndigest … … 92 92 { 93 93 struct log_receiver_baton *lb=static_cast<struct log_receiver_baton*>(baton); 94 if (!date || !date[0]) 95 throw SVNException("No date defined for revision: " + rev); 94 std::string d; 95 if (date && date[0]) 96 d = date; 97 else if (!lb->commits.empty()) { 98 // FIXME: this is a bit hackish to fix the problem reported in 99 // ticket #458. If we lack read permission for rev, no date is 100 // retrived and we use the date of the previous rev. That should 101 // be OK if we call the super-root and previous rev truly is 102 // rev-1 (super-root contains all revs). That should be the 103 // typical case where this happens. If this would happen when 104 // calling the log of a sub-node (e.g. the trunk) this could be 105 // problematic because log is more or less sparse and when 106 // merging two sparse logs together this workaround could have 107 // strange effects such as rev+1 having a earlier date than 108 // rev. To ensure that we only allow this workaround when 109 // calling super-root, let's do the following check: 110 assert(rev == lb->commits.rbegin()->rev()+1); 111 d = lb->commits.rbegin()->date(); 112 } 113 else { 114 std::stringstream msg; 115 msg << "No date defined for revision: " << rev; 116 throw SVNException(msg.str()); 117 } 96 118 std::string a; 97 119 if (author && author[0])
Note: See TracChangeset
for help on using the changeset viewer.