filemerge: switch the default name for internal tools from internal:x to :x

This commit is contained in:
Mads Kiilerich 2014-09-28 17:15:28 +02:00
parent 59a85f7e89
commit 26870bfa1d
5 changed files with 22 additions and 22 deletions

View File

@ -25,10 +25,10 @@ internals = {}
def internaltool(name, trymerge, onfailure=None):
'''return a decorator for populating internal merge tool table'''
def decorator(func):
fullname = 'internal:' + name
fullname = ':' + name
func.__doc__ = "``%s``\n" % fullname + func.__doc__.strip()
internals[fullname] = func
internals[':' + name] = func
internals['internal:' + name] = func
func.trymerge = trymerge
func.onfailure = onfailure
return func
@ -112,8 +112,8 @@ def _picktool(repo, ui, path, binary, symlink):
# internal merge or prompt as last resort
if symlink or binary:
return "internal:prompt", None
return "internal:merge", None
return ":prompt", None
return ":merge", None
def _eoltype(data):
"Guess the EOL type of a file"
@ -217,7 +217,7 @@ def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
of merge."""
tool, toolpath, binary, symlink = toolconf
if symlink:
repo.ui.warn(_('warning: internal:merge cannot merge symlinks '
repo.ui.warn(_('warning: internal :merge cannot merge symlinks '
'for %s\n') % fcd.path())
return False, 1
r = _premerge(repo, toolconf, files, labels=labels)
@ -247,7 +247,7 @@ def _imerge3(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
@internaltool('tagmerge', True,
_("automatic tag merging of %s failed! "
"(use 'hg resolve --tool internal:merge' or another merge "
"(use 'hg resolve --tool :merge' or another merge "
"tool of your choice)\n"))
def _itagmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
"""

View File

@ -68,7 +68,7 @@ Mercurial uses these rules when deciding which merge tool to use:
it will by default not be used for symlinks and binary files.
7. If the file to be merged is not binary and is not a symlink, then
``internal:merge`` is used.
internal ``:merge`` is used.
8. The merge of the file fails and must be resolved before commit.

View File

@ -970,7 +970,7 @@ internal merge cannot handle symlinks and shouldn't try:
$ hg commit -qm 'f is symlink'
$ hg merge -r 2 --tool internal:merge
merging f
warning: internal:merge cannot merge symlinks for f
warning: internal :merge cannot merge symlinks for f
merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon

View File

@ -40,7 +40,7 @@ Symlink is local parent, executable is other:
picked tool 'internal:merge' for a (binary False symlink True)
merging a
my a@521a1e40188f+ other a@3574f3e69b1c ancestor a@c334dc3be0da
warning: internal:merge cannot merge symlinks for a
warning: internal :merge cannot merge symlinks for a
merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
@ -74,7 +74,7 @@ Symlink is other parent, executable is local:
picked tool 'internal:merge' for a (binary False symlink True)
merging a
my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da
warning: internal:merge cannot merge symlinks for a
warning: internal :merge cannot merge symlinks for a
merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
@ -106,7 +106,7 @@ Update to link with local change should cause a merge prompt (issue3200):
a: versions differ -> m
updating: a 1/1 files (100.00%)
(couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re)
picked tool 'internal:prompt' for a (binary False symlink True)
picked tool ':prompt' for a (binary False symlink True)
no tool found to merge a
keep (l)ocal or take (o)ther? l
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
@ -138,7 +138,7 @@ where that was what happened.
$ hg ci -qm2
$ hg merge
merging f
warning: internal:merge cannot merge symlinks for f
warning: internal :merge cannot merge symlinks for f
merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
@ -150,7 +150,7 @@ where that was what happened.
$ hg up -Cqr1
$ hg merge
merging f
warning: internal:merge cannot merge symlinks for f
warning: internal :merge cannot merge symlinks for f
merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
@ -177,7 +177,7 @@ Test removed 'x' flag merged with change to symlink
$ hg ci -qm2
$ hg merge
merging f
warning: internal:merge cannot merge symlinks for f
warning: internal :merge cannot merge symlinks for f
merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
@ -189,7 +189,7 @@ Test removed 'x' flag merged with change to symlink
$ hg up -Cqr1
$ hg merge
merging f
warning: internal:merge cannot merge symlinks for f
warning: internal :merge cannot merge symlinks for f
merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
@ -271,13 +271,13 @@ h: l vs l, different
merging b incomplete! (edit conflicts, then use 'hg resolve --mark')
warning: cannot merge flags for c
merging d
warning: internal:merge cannot merge symlinks for d
warning: internal :merge cannot merge symlinks for d
merging d incomplete! (edit conflicts, then use 'hg resolve --mark')
merging f
warning: internal:merge cannot merge symlinks for f
warning: internal :merge cannot merge symlinks for f
merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
merging h
warning: internal:merge cannot merge symlinks for h
warning: internal :merge cannot merge symlinks for h
merging h incomplete! (edit conflicts, then use 'hg resolve --mark')
3 files updated, 0 files merged, 0 files removed, 5 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
@ -332,13 +332,13 @@ h: l vs l, different
merging b incomplete! (edit conflicts, then use 'hg resolve --mark')
warning: cannot merge flags for c
merging d
warning: internal:merge cannot merge symlinks for d
warning: internal :merge cannot merge symlinks for d
merging d incomplete! (edit conflicts, then use 'hg resolve --mark')
merging f
warning: internal:merge cannot merge symlinks for f
warning: internal :merge cannot merge symlinks for f
merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
merging h
warning: internal:merge cannot merge symlinks for h
warning: internal :merge cannot merge symlinks for h
merging h incomplete! (edit conflicts, then use 'hg resolve --mark')
3 files updated, 0 files merged, 0 files removed, 5 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon

View File

@ -517,7 +517,7 @@ detect merge tag conflicts
merging .hgtags
automatic .hgtags merge failed
the following 1 tags are in conflict: t7
automatic tag merging of .hgtags failed! (use 'hg resolve --tool internal:merge' or another merge tool of your choice)
automatic tag merging of .hgtags failed! (use 'hg resolve --tool :merge' or another merge tool of your choice)
2 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]