D1223: merge: disable path conflict checking by default (issue5716)
sid0 (Siddharth Agarwal)
phabricator at mercurial-scm.org
Tue Oct 24 02:17:49 UTC 2017
sid0 updated this revision to Diff 3075.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D1223?vs=3074&id=3075
REVISION DETAIL
https://phab.mercurial-scm.org/D1223
AFFECTED 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
CHANGE DETAILS
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 @@
$ 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
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
+ > [debug]
+ > 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 --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
+ > [debug]
+ > merge.checkpathconflicts=True
+ > EOF
+
$ hg init repo
$ cd repo
$ echo base > base
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
+ > [debug]
+ > 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 --git a/tests/test-merge1.t b/tests/test-merge1.t
--- a/tests/test-merge1.t
+++ b/tests/test-merge1.t
@@ -30,22 +30,20 @@
$ 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
+ $ rm -f 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-commandserver.t b/tests/test-commandserver.t
--- a/tests/test-commandserver.t
+++ b/tests/test-commandserver.t
@@ -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 --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 @@
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,24 +166,17 @@
$ 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)
$ 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,18 +208,16 @@
$ 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
audited first by calculateupdates(), where no symlink is created so both
'a' and 'a/b' are taken as good paths. still applyupdates() should fail.
$ 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 --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -576,7 +576,7 @@
default='abort',
)
coreconfigitem('debug', 'merge.checkpathconflicts',
- default=True,
+ default=False,
)
coreconfigitem('merge', 'followcopies',
default=True,
To: sid0, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list