Mercurial > hg > mercurial-crew-with-dirclash
changeset 4640:178778ca648f
Merge with crew-stable
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 20 Jun 2007 00:22:51 +0200 |
parents | 63b9d2deed48 (current diff) c7371aa0c153 (diff) |
children | 7c5428853566 |
files | mercurial/commands.py mercurial/context.py tests/test-annotate tests/test-debugrename |
diffstat | 6 files changed, 46 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2743,7 +2743,9 @@ table = { "debugdata": (debugdata, [], _('debugdata FILE REV')), "debugindex": (debugindex, [], _('debugindex FILE')), "debugindexdot": (debugindexdot, [], _('debugindexdot FILE')), - "debugrename": (debugrename, [], _('debugrename FILE [REV]')), + "debugrename": (debugrename, + [('r', 'rev', '', _('revision to debug'))], + _('debugrename [-r REV] FILE')), "debugwalk": (debugwalk, walkopts, _('debugwalk [OPTION]... [FILE]...')), "^diff": (diff,
--- a/mercurial/context.py +++ b/mercurial/context.py @@ -291,11 +291,10 @@ class filectx(object): # sort by revision (per file) which is a topological order visit = [] - files.reverse() for f in files: - fn = [(n._filerev, n) for n in needed.keys() if n._path == f] - fn.sort() + fn = [(n.rev(), n) for n in needed.keys() if n._path == f] visit.extend(fn) + visit.sort() hist = {} for r, f in visit:
--- a/tests/test-annotate +++ b/tests/test-annotate @@ -76,3 +76,19 @@ hg annotate -nf b echo % linkrev vs rev hg annotate -r tip a + +# test issue 589 +# annotate was crashing when trying to --follow something +# like A -> B -> A +echo % generate ABA rename configuration +echo foo > foo +hg add foo +hg ci -m addfoo +hg rename foo bar +hg ci -m renamefoo +hg rename bar foo +hg ci -m renamebar + +echo % annotate after ABA with follow +hg annotate --follow foo +
--- a/tests/test-annotate.out +++ b/tests/test-annotate.out @@ -52,3 +52,6 @@ 7 b: d 0: a 1: a 1: a +% generate ABA rename configuration +% annotate after ABA with follow +foo: foo