# HG changeset patch # User Siddharth Agarwal # Date 1508868930 25200 # 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 -r 37450a122128 -r 2a774cae3a03 mercurial/configitems.py --- 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, diff -r 37450a122128 -r 2a774cae3a03 tests/test-audit-path.t --- 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 diff -r 37450a122128 -r 2a774cae3a03 tests/test-commandserver.t --- 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 diff -r 37450a122128 -r 2a774cae3a03 tests/test-merge1.t --- 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 diff -r 37450a122128 -r 2a774cae3a03 tests/test-pathconflicts-basic.t --- 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 - diff -r 37450a122128 -r 2a774cae3a03 tests/test-pathconflicts-merge.t --- 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 diff -r 37450a122128 -r 2a774cae3a03 tests/test-pathconflicts-update.t --- 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) - diff -r 37450a122128 -r 2a774cae3a03 tests/test-update-names.t --- 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