##// END OF EJS Templates
Merge with crew-stable
Patrick Mezard -
r4640:178778ca merge default
parent child Browse files
Show More
@@ -0,0 +1,17 b''
1 #!/bin/sh
2
3 hg init
4 echo a > a
5 hg ci -Am t
6
7 hg mv a b
8 hg ci -Am t1
9 hg debugrename b
10
11 hg mv b a
12 hg ci -Am t2
13 hg debugrename a
14
15 echo % test with --rev
16 hg debugrename --rev 1 b
17
@@ -0,0 +1,5 b''
1 adding a
2 b renamed from a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
3 a renamed from b:9a263dd772e0159ddfa70fb8a448bb6c7ec8c69f
4 % test with --rev
5 b renamed from a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
@@ -2743,7 +2743,9 b' table = {'
2743 "debugdata": (debugdata, [], _('debugdata FILE REV')),
2743 "debugdata": (debugdata, [], _('debugdata FILE REV')),
2744 "debugindex": (debugindex, [], _('debugindex FILE')),
2744 "debugindex": (debugindex, [], _('debugindex FILE')),
2745 "debugindexdot": (debugindexdot, [], _('debugindexdot FILE')),
2745 "debugindexdot": (debugindexdot, [], _('debugindexdot FILE')),
2746 "debugrename": (debugrename, [], _('debugrename FILE [REV]')),
2746 "debugrename": (debugrename,
2747 [('r', 'rev', '', _('revision to debug'))],
2748 _('debugrename [-r REV] FILE')),
2747 "debugwalk": (debugwalk, walkopts, _('debugwalk [OPTION]... [FILE]...')),
2749 "debugwalk": (debugwalk, walkopts, _('debugwalk [OPTION]... [FILE]...')),
2748 "^diff":
2750 "^diff":
2749 (diff,
2751 (diff,
@@ -291,11 +291,10 b' class filectx(object):'
291
291
292 # sort by revision (per file) which is a topological order
292 # sort by revision (per file) which is a topological order
293 visit = []
293 visit = []
294 files.reverse()
295 for f in files:
294 for f in files:
296 fn = [(n._filerev, n) for n in needed.keys() if n._path == f]
295 fn = [(n.rev(), n) for n in needed.keys() if n._path == f]
297 fn.sort()
298 visit.extend(fn)
296 visit.extend(fn)
297 visit.sort()
299 hist = {}
298 hist = {}
300
299
301 for r, f in visit:
300 for r, f in visit:
@@ -76,3 +76,19 b' hg annotate -nf b'
76
76
77 echo % linkrev vs rev
77 echo % linkrev vs rev
78 hg annotate -r tip a
78 hg annotate -r tip a
79
80 # test issue 589
81 # annotate was crashing when trying to --follow something
82 # like A -> B -> A
83 echo % generate ABA rename configuration
84 echo foo > foo
85 hg add foo
86 hg ci -m addfoo
87 hg rename foo bar
88 hg ci -m renamefoo
89 hg rename bar foo
90 hg ci -m renamebar
91
92 echo % annotate after ABA with follow
93 hg annotate --follow foo
94
@@ -52,3 +52,6 b' 7 b: d'
52 0: a
52 0: a
53 1: a
53 1: a
54 1: a
54 1: a
55 % generate ABA rename configuration
56 % annotate after ABA with follow
57 foo: foo
General Comments 0
You need to be logged in to leave comments. Login now