Show More
@@ -960,25 +960,17 b' def debugindexdot(ui, file_):' | |||
|
960 | 960 | ui.write("\t%d -> %d\n" % (r.rev(pp[1]), i)) |
|
961 | 961 | ui.write("}\n") |
|
962 | 962 | |
|
963 |
def debugrename(ui, repo, file, |
|
|
963 | def debugrename(ui, repo, file1, *pats, **opts): | |
|
964 | 964 | """dump rename information""" |
|
965 | r = repo.file(relpath(repo, [file])[0]) | |
|
966 | if rev: | |
|
967 | try: | |
|
968 | # assume all revision numbers are for changesets | |
|
969 | n = repo.lookup(rev) | |
|
970 | change = repo.changelog.read(n) | |
|
971 | m = repo.manifest.read(change[0]) | |
|
972 | n = m[relpath(repo, [file])[0]] | |
|
973 | except (hg.RepoError, KeyError): | |
|
974 | n = r.lookup(rev) | |
|
975 | else: | |
|
976 | n = r.tip() | |
|
977 | m = r.renamed(n) | |
|
978 | if m: | |
|
979 | ui.write(_("renamed from %s:%s\n") % (m[0], hex(m[1]))) | |
|
980 | else: | |
|
981 | ui.write(_("not renamed\n")) | |
|
965 | ||
|
966 | ctx = repo.changectx(opts.get('rev', 'tip')) | |
|
967 | for src, abs, rel, exact in cmdutil.walk(repo, (file1,) + pats, opts, | |
|
968 | ctx.node()): | |
|
969 | m = ctx.filectx(abs).renamed() | |
|
970 | if m: | |
|
971 | ui.write(_("%s renamed from %s:%s\n") % (rel, m[0], hex(m[1]))) | |
|
972 | else: | |
|
973 | ui.write(_("%s not renamed\n") % rel) | |
|
982 | 974 | |
|
983 | 975 | def debugwalk(ui, repo, *pats, **opts): |
|
984 | 976 | """show how files match on given patterns""" |
@@ -4,9 +4,9 b' copy: foo -> bar' | |||
|
4 | 4 | # should match |
|
5 | 5 | rev offset length base linkrev nodeid p1 p2 |
|
6 | 6 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 |
|
7 | renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd | |
|
7 | bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd | |
|
8 | 8 | # should not be renamed |
|
9 | not renamed | |
|
9 | bar not renamed | |
|
10 | 10 | # should show copy |
|
11 | 11 | copy: foo -> bar |
|
12 | 12 | # should show no parents for tip |
@@ -18,5 +18,5 b' copy: foo -> bar' | |||
|
18 | 18 | rev offset length base linkrev nodeid p1 p2 |
|
19 | 19 | 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 |
|
20 | 20 | 1 5 7 1 2 dd12c926cf16 2ed2a3912a0b 000000000000 |
|
21 | renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17 | |
|
21 | bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17 | |
|
22 | 22 | # should show no copies |
@@ -22,4 +22,4 b' blahblah' | |||
|
22 | 22 | rev offset length base linkrev nodeid p1 p2 |
|
23 | 23 | 0 0 67 0 1 dc51707dfc98 000000000000 000000000000 |
|
24 | 24 | 1 67 72 1 3 b2494a44f0a9 000000000000 dc51707dfc98 |
|
25 | renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 | |
|
25 | b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 |
General Comments 0
You need to be logged in to leave comments.
Login now