Show More
@@ -547,6 +547,7 b' def diff(repo, node1=None, node2=None, f' | |||
|
547 | 547 | |
|
548 | 548 | all = modified + added + removed |
|
549 | 549 | all.sort() |
|
550 | gone = {} | |
|
550 | 551 | for f in all: |
|
551 | 552 | to = None |
|
552 | 553 | tn = None |
@@ -574,7 +575,11 b' def diff(repo, node1=None, node2=None, f' | |||
|
574 | 575 | a, arev = copied[f] |
|
575 | 576 | omode = gitmode(mmap.execf(a)) |
|
576 | 577 | addmodehdr(header, omode, mode) |
|
577 |
|
|
|
578 | if a in removed and a not in gone: | |
|
579 | op = 'rename' | |
|
580 | gone[a] = 1 | |
|
581 | else: | |
|
582 | op = 'copy' | |
|
578 | 583 | header.append('%s from %s\n' % (op, a)) |
|
579 | 584 | header.append('%s to %s\n' % (op, f)) |
|
580 | 585 | to = getfile(a).read(arev) |
@@ -127,3 +127,11 b' hg diff --git' | |||
|
127 | 127 | echo |
|
128 | 128 | echo '% created between r1 and parent of wd; renamed in the wd' |
|
129 | 129 | hg diff --git -r -2 |
|
130 | hg ci -m 'mv brand-new brand-new2' | |
|
131 | ||
|
132 | echo '% one file is copied to many destinations and removed' | |
|
133 | hg cp brand-new2 brand-new3 | |
|
134 | hg mv brand-new2 brand-new3-2 | |
|
135 | hg ci -m 'multiple renames/copies' | |
|
136 | hg diff --git -r -2 -r -1 | |
|
137 |
@@ -133,3 +133,10 b' new file mode 100644' | |||
|
133 | 133 | +++ b/brand-new2 |
|
134 | 134 | @@ -0,0 +1,1 @@ |
|
135 | 135 | + |
|
136 | % one file is copied to many destinations and removed | |
|
137 | diff --git a/brand-new2 b/brand-new3 | |
|
138 | rename from brand-new2 | |
|
139 | rename to brand-new3 | |
|
140 | diff --git a/brand-new2 b/brand-new3-2 | |
|
141 | copy from brand-new2 | |
|
142 | copy to brand-new3-2 |
General Comments 0
You need to be logged in to leave comments.
Login now