D779: merge: add _checkunknowndirs function for detecting path conflicts
mbthomas (Mark Thomas)
phabricator at mercurial-scm.org
Tue Sep 26 12:22:08 EDT 2017
mbthomas added inline comments.
INLINE COMMENTS
> ryanmce wrote in merge.py:654
> Why do we need to audit this path first? If we fail the audit, what happens? This looks weird to me.
As in `_checkunknownfile`, this is to avoid symlink traversal while checking these files.
Consider:
$ ln -s bar foo
$ hg add foo
$ hg up <some revision where foo is a directory containing directories>
When checking `foo/dir1/file1`, we will go through `foo` then `foo/dir1` in this loop. The first case doesn't trigger the rule, as although `foo` is a link, it's in the dirstate, so should have been resolved by the merge. The second loop will dereference `foo` and look at `bar/dir1`, which we don't want it to do.
Doing nothing is the right thing here - we will resolve the pathconflict via the merge resolution (there will be a `'pr'` action for this link).
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D779
To: mbthomas, #hg-reviewers
Cc: ryanmce, mercurial-devel
More information about the Mercurial-devel
mailing list