equal
deleted
inserted
replaced
47 from mercurial.i18n import _ |
47 from mercurial.i18n import _ |
48 from mercurial.node import ( |
48 from mercurial.node import ( |
49 short, |
49 short, |
50 ) |
50 ) |
51 from mercurial import ( |
51 from mercurial import ( |
|
52 pycompat, |
52 registrar, |
53 registrar, |
53 ) |
54 ) |
54 from mercurial.utils import ( |
55 from mercurial.utils import ( |
55 stringutil, |
56 stringutil, |
56 ) |
57 ) |
139 # oldest, so that if we see a file multiple times, we take the |
140 # oldest, so that if we see a file multiple times, we take the |
140 # newest version as canonical. this prevents us from blocking a |
141 # newest version as canonical. this prevents us from blocking a |
141 # changegroup that contains an unacceptable commit followed later |
142 # changegroup that contains an unacceptable commit followed later |
142 # by a commit that fixes the problem. |
143 # by a commit that fixes the problem. |
143 tip = repo['tip'] |
144 tip = repo['tip'] |
144 for rev in xrange(repo.changelog.tiprev(), repo[node].rev() - 1, -1): |
145 for rev in pycompat.xrange(repo.changelog.tiprev(), |
|
146 repo[node].rev() - 1, -1): |
145 c = repo[rev] |
147 c = repo[rev] |
146 for f in c.files(): |
148 for f in c.files(): |
147 if f in seen or f not in tip or f not in c: |
149 if f in seen or f not in tip or f not in c: |
148 continue |
150 continue |
149 seen.add(f) |
151 seen.add(f) |