# HG changeset patch # User Siddharth Agarwal # Date 2017-10-24 18:15:30 # Node ID 2a774cae3a037df3e8aedcb536b52fd60d83b1a9 # Parent 37450a122128739ab499eb02b8568d44a5d3e3b3 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 diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -579,7 +579,7 @@ coreconfigitem('merge', 'checkignored', default='abort', ) coreconfigitem('experimental', 'merge.checkpathconflicts', - default=True, + default=False, ) coreconfigitem('merge', 'followcopies', default=True, diff --git a/tests/test-audit-path.t b/tests/test-audit-path.t --- a/tests/test-audit-path.t +++ b/tests/test-audit-path.t @@ -104,8 +104,7 @@ attack back/test where back symlinks to 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 @@ try trivial merge $ 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 @@ and the rebase should fail (issue5628) $ 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 @@ try linear update where symlink already $ 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 @@ audited first by calculateupdates(), whe $ 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 @@ a symlink. $ 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 diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t --- a/tests/test-commandserver.t +++ b/tests/test-commandserver.t @@ -975,12 +975,8 @@ and the merge should fail (issue5628) *** 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 diff --git a/tests/test-merge1.t b/tests/test-merge1.t --- a/tests/test-merge1.t +++ b/tests/test-merge1.t @@ -30,22 +30,23 @@ of the files in a commit we're updating $ 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 diff --git a/tests/test-pathconflicts-basic.t b/tests/test-pathconflicts-basic.t --- a/tests/test-pathconflicts-basic.t +++ b/tests/test-pathconflicts-basic.t @@ -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 @@ Repo state is ok commit: (clean) update: 1 new changesets, 2 branch heads (merge) phases: 4 draft - diff --git a/tests/test-pathconflicts-merge.t b/tests/test-pathconflicts-merge.t --- a/tests/test-pathconflicts-merge.t +++ b/tests/test-pathconflicts-merge.t @@ -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 diff --git a/tests/test-pathconflicts-update.t b/tests/test-pathconflicts-update.t --- a/tests/test-pathconflicts-update.t +++ b/tests/test-pathconflicts-update.t @@ -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 @@ Update clean - local directory conflicts $ hg up file2 --clean 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (activating bookmark file2) - diff --git a/tests/test-update-names.t b/tests/test-update-names.t --- a/tests/test-update-names.t +++ b/tests/test-update-names.t @@ -50,9 +50,7 @@ make sure that this does not erase untra $ 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