D784: merge: check for path conflicts when merging (issue5628)
ryanmce (Ryan McElroy)
phabricator at mercurial-scm.org
Thu Oct 5 12:46:11 EDT 2017
ryanmce accepted this revision.
ryanmce added a comment.
I'm sooooo excited by these improvements. one nit inline but this is such an improvement!
INLINE COMMENTS
> mbthomas wrote in merge.py:903-921
> This is potentially slow for large repos, as it has to iterate over the whole manifest.
>
> What I actually want to do is find the files in the directories named by `remoteconflicts`, which should be a small set, however I can't see a way to do that with the manifest API. Suggestions for improvement welcome.
Correct is more important. In a future with treemanifest, I could see some potential optimization opportunities. We may consider experimenting with them inside of treemanifest and upstream the results if this turns out to be a performance concern in very large repos in the wild.
> merge.py:952
> + for p in invalidconflicts:
> + repo.ui.warn(_("%s: is both a file and a directory\n") % p)
> + raise error.Abort(_("destination manifest contains path conflicts"))
nit: we can be more precise here for clarity:
repo.ui.warn(_("%s: is both a file and a directory at destination\n") % p)
> test-audit-path.t:106-107
> $ hg update -Cr2
> - abort: path 'back/test' traverses symbolic link 'back'
> + back: is both a file and a directory
> + abort: destination manifest contains path conflicts
> [255]
so much better!
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D784
To: mbthomas, #hg-reviewers, ryanmce
Cc: ryanmce, mercurial-devel
More information about the Mercurial-devel
mailing list