merge with stable
authorMatt Mackall <mpm@selenic.com>
Fri, 05 Dec 2014 12:10:56 -0600
changeset 23479 406dfc63a1ad
parent 23476 39a12719ec65 (current diff)
parent 23478 30b602168c3b (diff)
child 23480 88d2d77eb981
merge with stable
mercurial/merge.py
tests/test-up-local-change.t
--- a/mercurial/merge.py	Wed Dec 03 11:02:52 2014 -0800
+++ b/mercurial/merge.py	Fri Dec 05 12:10:56 2014 -0600
@@ -298,8 +298,7 @@
         return r
 
 def _checkunknownfile(repo, wctx, mctx, f):
-    return (not repo.dirstate._ignore(f)
-        and os.path.isfile(repo.wjoin(f))
+    return (os.path.isfile(repo.wjoin(f))
         and repo.wopener.audit.check(f)
         and repo.dirstate.normalize(f) not in repo.dirstate
         and mctx[f].cmp(wctx[f]))
--- a/tests/test-up-local-change.t	Wed Dec 03 11:02:52 2014 -0800
+++ b/tests/test-up-local-change.t	Fri Dec 05 12:10:56 2014 -0600
@@ -167,6 +167,37 @@
   (commit and merge, or update --clean to discard changes)
   [255]
 
+test conflicting untracked files
+
+  $ hg up -qC 0
+  $ echo untracked > b
+  $ hg st
+  ? b
+  $ hg up 1
+  b: untracked file differs
+  abort: untracked files in working directory differ from files in requested revision
+  [255]
+  $ rm b
+
+test conflicting untracked ignored file
+
+  $ hg up -qC 0
+  $ echo ignored > .hgignore
+  $ hg add .hgignore
+  $ hg ci -m 'add .hgignore'
+  created new head
+  $ echo ignored > ignored
+  $ hg add ignored
+  $ hg ci -m 'add ignored file'
+
+  $ hg up -q 'desc("add .hgignore")'
+  $ echo untracked > ignored
+  $ hg st
+  $ hg up 'desc("add ignored file")'
+  ignored: untracked file differs
+  abort: untracked files in working directory differ from files in requested revision
+  [255]
+
 test a local add
 
   $ cd ..