##// END OF EJS Templates
diff: don't crash when merged-in addition is copied...
Martin von Zweigbergk -
r27902:51b6ce25 default
parent child Browse files
Show More
@@ -2273,6 +2273,11 b' def diff(repo, node1=None, node2=None, m'
2273 modified = sorted(modifiedset)
2273 modified = sorted(modifiedset)
2274 added = sorted(addedset)
2274 added = sorted(addedset)
2275 removed = sorted(removedset)
2275 removed = sorted(removedset)
2276 for dst, src in copy.items():
2277 if src not in ctx1:
2278 # Files merged in during a merge and then copied/renamed are
2279 # reported as copies. We want to show them in the diff as additions.
2280 del copy[dst]
2276
2281
2277 def difffn(opts, losedata):
2282 def difffn(opts, losedata):
2278 return trydiff(repo, revs, ctx1, ctx2, modified, added, removed,
2283 return trydiff(repo, revs, ctx1, ctx2, modified, added, removed,
@@ -68,3 +68,10 b' parent 1, the diff should be relative to'
68 +++ b/a2
68 +++ b/a2
69 @@ -0,0 +1,1 @@
69 @@ -0,0 +1,1 @@
70 +foo
70 +foo
71 $ hg diff --nodates --git
72 diff --git a/a2 b/a2
73 new file mode 100644
74 --- /dev/null
75 +++ b/a2
76 @@ -0,0 +1,1 @@
77 +foo
General Comments 0
You need to be logged in to leave comments. Login now