D6244: copies: don't include copies that are not in source in directory move
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Apr 17 19:26:55 EDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG31abb9d713af: copies: don't include copies that are not in source in directory move (authored by martinvonz, committed by ).
CHANGES SINCE LAST UPDATE
diff --git a/tests/test-merge-criss-cross.t b/tests/test-merge-criss-cross.t
@@ -423,17 +423,10 @@
unmatched files in other:
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
- src: 'd1/b' -> dst: 'd2/b'
- checking for directory renames
- discovered dir src: 'd1/' -> dst: 'd2/'
- pending file src: 'd1/a' -> dst: 'd2/a'
- pending file src: 'd1/b' -> dst: 'd2/b'
branchmerge: True, force: False, partial: False
ancestor: 11b5b303e36c, local: c0ef19750a22+, remote: 6ca01f7342b9
- d2/a: remote directory rename - move from d1/a -> dm
- d2/b: remote directory rename, both created -> m
+ d2/b: remote created -> g
calculating bids for ancestor 154e6000f54e
searching for copies back to rev 3
@@ -453,8 +446,7 @@
auction for merging merge bids
d1/a: consensus for r
d1/b: consensus for r
- d2/a: consensus for dm
- d2/b: picking 'get' action
+ d2/b: consensus for g
end of auction
d1/a: other deleted -> r
diff --git a/mercurial/copies.py b/mercurial/copies.py
@@ -682,6 +682,11 @@
if len(fl) == 2 and fl == fl:
copy[fl] = of # not actually divergent, just matching renames
+ # Sometimes we get invalid copies here (the "and not remotebase" in
+ # _checkcopies() seems suspicious). Filter them out.
+ for dst, src in fullcopy.copy().items():
+ if src not in mb:
+ del fullcopy[dst]
if fullcopy and repo.ui.debugflag:
repo.ui.debug(" all copies found (* = to merge, ! = divergent, "
"% = renamed and deleted):\n")
To: martinvonz, #hg-reviewers
More information about the Mercurial-devel