Kiln » Dependencies » Dulwich Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master-1, master-0, and 0.9.4

walk: Reorganize 'since' boundary code.

Change-Id: I6e4a68562313b0592b0d34d3288faec322cdfec7

Changeset cf2aeff324d7

Parent 5c75abc0d546

committed by Jelmer Vernooij

authored by Dave Borowitz

Changes to one file · Browse files at cf2aeff324d7 Showing diff from parent 5c75abc0d546 Diff from another changeset...

Change 1 of 1 Show Entire File dulwich/​walk.py Stacked
 
143
144
145
 
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
163
164
 
143
144
145
146
147
148
149
150
 
 
 
 
 
 
 
 
 
 
 
 
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
@@ -143,22 +143,26 @@
  for parent_id in commit.parents:   self._push(parent_id)   + reset_extra_commits = True   is_excluded = sha in self._excluded   if is_excluded:   self._exclude_parents(commit)   - if self._min_time is not None: - if commit.commit_time < self._min_time: - # We want to stop walking at min_time, but commits at the - # boundary may be out of order with respect to their - # parents. So we walk _MAX_EXTRA_COMMITS more commits once - # we hit this boundary. - self._extra_commits_left -= 1 - if not self._extra_commits_left: - break - else: - # We're not at a boundary, so reset the counter. - self._extra_commits_left = _MAX_EXTRA_COMMITS + if (self._min_time is not None and + commit.commit_time < self._min_time): + # We want to stop walking at min_time, but commits at the + # boundary may be out of order with respect to their parents. So + # we walk _MAX_EXTRA_COMMITS more commits once we hit this + # boundary. + reset_extra_commits = False + + if reset_extra_commits: + # We're not at a boundary, so reset the counter. + self._extra_commits_left = _MAX_EXTRA_COMMITS + else: + self._extra_commits_left -= 1 + if not self._extra_commits_left: + break     if not is_excluded:   return WalkEntry(self._walker, commit)