Mercurial > hg
comparison mercurial/merge.py @ 23478:30b602168c3b stable
update: don't overwrite untracked ignored files on update
When looking for untracked files that would conflict with a tracked
file in the target revision (or the remote side of a merge), we
explcitly exclude ignored files. The code was added in 7e30f5f2285f
(merge: refactor unknown file conflict checking, 2012-02-09), but it
seems like only unknown, not ignored, files were considered since the
beginning of time.
Although ignored files are mostly build outputs and backup files, we
should still not overwrite them. Fix by simply removing the explicit
check.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 16 Nov 2014 23:41:44 -0800 |
parents | 902554884335 |
children | 406dfc63a1ad |
comparison
equal
deleted
inserted
replaced
23477:689540e6007e | 23478:30b602168c3b |
---|---|
296 elif not r: | 296 elif not r: |
297 self.mark(dfile, 'r') | 297 self.mark(dfile, 'r') |
298 return r | 298 return r |
299 | 299 |
300 def _checkunknownfile(repo, wctx, mctx, f): | 300 def _checkunknownfile(repo, wctx, mctx, f): |
301 return (not repo.dirstate._ignore(f) | 301 return (os.path.isfile(repo.wjoin(f)) |
302 and os.path.isfile(repo.wjoin(f)) | |
303 and repo.wopener.audit.check(f) | 302 and repo.wopener.audit.check(f) |
304 and repo.dirstate.normalize(f) not in repo.dirstate | 303 and repo.dirstate.normalize(f) not in repo.dirstate |
305 and mctx[f].cmp(wctx[f])) | 304 and mctx[f].cmp(wctx[f])) |
306 | 305 |
307 def _checkunknown(repo, wctx, mctx): | 306 def _checkunknown(repo, wctx, mctx): |