Mercurial > hg-stable
diff mercurial/merge.py @ 19157:113681bbef9e
manifestmerge: local unknown, remote created: don't traverse symlinks
To figure out what to do with locally unknown files, Mercurial attempts to read
them if they exist. When an attempt is made to read a file that exists but
traverses a symlink, Mercurial aborts.
With this patch, we first ensure that the file doesn't traverse a symlink
before opening it. This is fine because a file being "remote created" means the
symlink doesn't exist remotely, which means it will be deleted in the apply
phase.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Wed, 08 May 2013 14:11:01 -0700 |
parents | c60a7f5a741f |
children | c58b6ab4c26f |
line wrap: on
line diff
--- a/mercurial/merge.py Thu Apr 04 13:45:21 2013 -0700 +++ b/mercurial/merge.py Wed May 08 14:11:01 2013 -0700 @@ -95,6 +95,7 @@ def _checkunknownfile(repo, wctx, mctx, f): return (not repo.dirstate._ignore(f) and 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]))