Mercurial > hg-stable
changeset 23479:406dfc63a1ad
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 05 Dec 2014 12:10:56 -0600 |
parents | 39a12719ec65 (current diff) 30b602168c3b (diff) |
children | 88d2d77eb981 |
files | mercurial/merge.py tests/test-up-local-change.t |
diffstat | 2 files changed, 32 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 ..