Mercurial > hg
changeset 34942:2a774cae3a03 stable
merge: disable path conflict checking by default (issue5716)
We shouldn't ship a severe perf regression in hg update for 4.4.
Differential Revision: https://phab.mercurial-scm.org/D1223
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 24 Oct 2017 11:15:30 -0700 |
parents | 37450a122128 |
children | 3423f7e2d287 |
files | mercurial/configitems.py tests/test-audit-path.t tests/test-commandserver.t tests/test-merge1.t tests/test-pathconflicts-basic.t tests/test-pathconflicts-merge.t tests/test-pathconflicts-update.t tests/test-update-names.t |
diffstat | 8 files changed, 46 insertions(+), 40 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/configitems.py Tue Oct 24 11:14:38 2017 -0700 +++ b/mercurial/configitems.py Tue Oct 24 11:15:30 2017 -0700 @@ -579,7 +579,7 @@ default='abort', ) coreconfigitem('experimental', 'merge.checkpathconflicts', - default=True, + default=False, ) coreconfigitem('merge', 'followcopies', default=True,
--- a/tests/test-audit-path.t Tue Oct 24 11:14:38 2017 -0700 +++ b/tests/test-audit-path.t Tue Oct 24 11:15:30 2017 -0700 @@ -104,8 +104,7 @@ back/test #if symlink $ hg update -Cr2 - back: is both a file and a directory - abort: destination manifest contains path conflicts + abort: path 'back/test' traverses symbolic link 'back' [255] #else ('back' will be a file and cause some other system specific error) @@ -167,12 +166,8 @@ $ hg up -qC 1 $ hg merge 2 - a: path conflict - a file or link has the same name as a directory - the local file has been renamed to a~aa04623eb0c3 - resolve manually then use 'hg resolve --mark a' - 1 files updated, 0 files merged, 0 files removed, 1 files unresolved - use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon - [1] + abort: path 'a/poisoned' traverses symbolic link 'a' + [255] try rebase onto other revision: cache of audited paths should be discarded, and the rebase should fail (issue5628) @@ -180,11 +175,8 @@ $ hg up -qC 2 $ hg rebase -s 2 -d 1 --config extensions.rebase= rebasing 2:e73c21d6b244 "file a/poisoned" (tip) - a: path conflict - a file or link has the same name as a directory - the local file has been renamed to a~aa04623eb0c3 - resolve manually then use 'hg resolve --mark a' - unresolved conflicts (see hg resolve, then hg rebase --continue) - [1] + abort: path 'a/poisoned' traverses symbolic link 'a' + [255] $ ls ../merge-symlink-out $ cd .. @@ -216,8 +208,7 @@ $ hg up -qC 0 $ hg up 1 - a: is both a file and a directory - abort: destination manifest contains path conflicts + abort: path 'a/b' traverses symbolic link 'a' [255] try linear update including symlinked directory and its content: paths are @@ -226,8 +217,7 @@ $ hg up -qC null $ hg up 1 - a: is both a file and a directory - abort: destination manifest contains path conflicts + abort: path 'a/b' traverses symbolic link 'a' [255] $ ls ../update-symlink-out @@ -238,8 +228,7 @@ $ rm -f a $ hg up -qC 2 $ hg up 1 - a: is both a file and a directory - abort: destination manifest contains path conflicts + abort: path 'a/b' traverses symbolic link 'a' [255] $ ls ../update-symlink-out
--- a/tests/test-commandserver.t Tue Oct 24 11:14:38 2017 -0700 +++ b/tests/test-commandserver.t Tue Oct 24 11:15:30 2017 -0700 @@ -975,12 +975,8 @@ *** runcommand up -qC 2 *** runcommand up -qC 1 *** runcommand merge 2 - a: path conflict - a file or link has the same name as a directory - the local file has been renamed to a~aa04623eb0c3 - resolve manually then use 'hg resolve --mark a' - 1 files updated, 0 files merged, 0 files removed, 1 files unresolved - use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon - [1] + abort: path 'a/poisoned' traverses symbolic link 'a' + [255] $ ls ../merge-symlink-out cache of repo.auditor should be discarded, so matcher would never traverse
--- a/tests/test-merge1.t Tue Oct 24 11:14:38 2017 -0700 +++ b/tests/test-merge1.t Tue Oct 24 11:15:30 2017 -0700 @@ -30,22 +30,23 @@ $ mkdir b && touch b/nonempty $ hg up - b: untracked directory conflicts with file - abort: untracked files in working directory differ from files in requested revision - [255] + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg ci nothing changed [1] $ hg sum - parent: 0:538afb845929 - commit #0 + parent: 1:b8bb4a988f25 tip + commit #1 branch: default - commit: 1 unknown (clean) - update: 1 new changesets (update) + commit: (clean) + update: (current) phases: 2 draft - $ rm b/nonempty + +The following line is commented out because the file doesn't exist at the moment, and some OSes error out even with `rm -f`. +$ rm b/nonempty + $ hg up - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg sum parent: 1:b8bb4a988f25 tip commit #1
--- a/tests/test-pathconflicts-basic.t Tue Oct 24 11:14:38 2017 -0700 +++ b/tests/test-pathconflicts-basic.t Tue Oct 24 11:15:30 2017 -0700 @@ -1,3 +1,11 @@ +Path conflict checking is currently disabled by default because of issue5716. +Turn it on for this test. + + $ cat >> $HGRCPATH << EOF + > [experimental] + > merge.checkpathconflicts=True + > EOF + $ hg init repo $ cd repo $ echo base > base @@ -96,4 +104,3 @@ commit: (clean) update: 1 new changesets, 2 branch heads (merge) phases: 4 draft -
--- a/tests/test-pathconflicts-merge.t Tue Oct 24 11:14:38 2017 -0700 +++ b/tests/test-pathconflicts-merge.t Tue Oct 24 11:15:30 2017 -0700 @@ -1,3 +1,11 @@ +Path conflict checking is currently disabled by default because of issue5716. +Turn it on for this test. + + $ cat >> $HGRCPATH << EOF + > [experimental] + > merge.checkpathconflicts=True + > EOF + $ hg init repo $ cd repo $ echo base > base
--- a/tests/test-pathconflicts-update.t Tue Oct 24 11:14:38 2017 -0700 +++ b/tests/test-pathconflicts-update.t Tue Oct 24 11:15:30 2017 -0700 @@ -1,3 +1,11 @@ +Path conflict checking is currently disabled by default because of issue5716. +Turn it on for this test. + + $ cat >> $HGRCPATH << EOF + > [experimental] + > merge.checkpathconflicts=True + > EOF + $ hg init repo $ cd repo $ echo base > base @@ -150,4 +158,3 @@ $ hg up file2 --clean 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (activating bookmark file2) -
--- a/tests/test-update-names.t Tue Oct 24 11:14:38 2017 -0700 +++ b/tests/test-update-names.t Tue Oct 24 11:15:30 2017 -0700 @@ -50,9 +50,7 @@ $ hg st ? name/file $ hg up 1 - name: untracked directory conflicts with file - abort: untracked files in working directory differ from files in requested revision - [255] + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd .. #if symlink