mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
merge with stable
This commit is contained in:
commit
934178e495
@ -156,7 +156,7 @@ def archive(ui, repo, dest, **opts):
|
||||
|
||||
ctx = repo[opts.get('rev')]
|
||||
if not ctx:
|
||||
raise util.Abort(_('repository has no revisions'))
|
||||
raise util.Abort(_('no working directory: please specify a revision'))
|
||||
node = ctx.node()
|
||||
dest = cmdutil.make_filename(repo, dest, node)
|
||||
if os.path.realpath(dest) == repo.root:
|
||||
@ -2330,32 +2330,40 @@ def rename(ui, repo, *pats, **opts):
|
||||
del wlock
|
||||
|
||||
def resolve(ui, repo, *pats, **opts):
|
||||
"""resolve file merges from a branch merge or update
|
||||
"""retry file merges from a merge or update
|
||||
|
||||
This command will attempt to resolve unresolved merges from the
|
||||
last update or merge command. This will use the local file
|
||||
revision preserved at the last update or merge to cleanly retry
|
||||
the file merge attempt. With no file or options specified, this
|
||||
command will attempt to resolve all unresolved files.
|
||||
This command will cleanly retry unresolved file merges using file
|
||||
revisions preserved from the last update or merge. To attempt to
|
||||
resolve all unresolved files, use the -a switch.
|
||||
|
||||
This command will also allow listing resolved files and manually
|
||||
marking and unmarking files as resolved.
|
||||
|
||||
The codes used to show the status of files are:
|
||||
U = unresolved
|
||||
R = resolved
|
||||
"""
|
||||
|
||||
if len([x for x in opts if opts[x]]) > 1:
|
||||
all, mark, unmark, show = [opts.get(o) for o in 'all mark unmark list'.split()]
|
||||
|
||||
if (show and (mark or unmark)) or (mark and unmark):
|
||||
raise util.Abort(_("too many options specified"))
|
||||
if pats and all:
|
||||
raise util.Abort(_("can't specify --all and patterns"))
|
||||
if not (all or pats or show or mark or unmark):
|
||||
raise util.Abort(_('no files or directories specified; '
|
||||
'use --all to remerge all files'))
|
||||
|
||||
ms = merge_.mergestate(repo)
|
||||
m = cmdutil.match(repo, pats, opts)
|
||||
|
||||
for f in ms:
|
||||
if m(f):
|
||||
if opts.get("list"):
|
||||
if show:
|
||||
ui.write("%s %s\n" % (ms[f].upper(), f))
|
||||
elif opts.get("mark"):
|
||||
elif mark:
|
||||
ms.mark(f, "r")
|
||||
elif opts.get("unmark"):
|
||||
elif unmark:
|
||||
ms.mark(f, "u")
|
||||
else:
|
||||
wctx = repo[None]
|
||||
@ -3315,7 +3323,8 @@ table = {
|
||||
_('[OPTION]... SOURCE... DEST')),
|
||||
"resolve":
|
||||
(resolve,
|
||||
[('l', 'list', None, _('list state of files needing merge')),
|
||||
[('a', 'all', None, _('remerge all unresolved files')),
|
||||
('l', 'list', None, _('list state of files needing merge')),
|
||||
('m', 'mark', None, _('mark files as resolved')),
|
||||
('u', 'unmark', None, _('unmark files as resolved'))],
|
||||
_('[OPTION]... [FILE]...')),
|
||||
|
@ -400,8 +400,8 @@ def run_one(test, skips, fails):
|
||||
fail("output changed and returned error code %d" % ret)
|
||||
else:
|
||||
fail("output changed")
|
||||
if not nodiff:
|
||||
show_diff(ref_out, out)
|
||||
if not nodiff:
|
||||
show_diff(ref_out, out)
|
||||
ret = 1
|
||||
elif ret:
|
||||
mark = '!'
|
||||
|
@ -60,4 +60,4 @@ rev-0.tar created
|
||||
abort: unknown archive type 'bogus'
|
||||
% server errors
|
||||
% empty repo
|
||||
abort: repository has no revisions
|
||||
abort: no working directory: please specify a revision
|
||||
|
@ -183,7 +183,7 @@ list of commands:
|
||||
recover roll back an interrupted transaction
|
||||
remove remove the specified files on the next commit
|
||||
rename rename files; equivalent of copy + remove
|
||||
resolve resolve file merges from a branch merge or update
|
||||
resolve retry file merges from a merge or update
|
||||
revert restore individual files or dirs to an earlier state
|
||||
rollback roll back the last transaction
|
||||
root print the root (top) of the current working dir
|
||||
@ -246,7 +246,7 @@ list of commands:
|
||||
recover roll back an interrupted transaction
|
||||
remove remove the specified files on the next commit
|
||||
rename rename files; equivalent of copy + remove
|
||||
resolve resolve file merges from a branch merge or update
|
||||
resolve retry file merges from a merge or update
|
||||
revert restore individual files or dirs to an earlier state
|
||||
rollback roll back the last transaction
|
||||
root print the root (top) of the current working dir
|
||||
|
@ -74,7 +74,7 @@ list of commands:
|
||||
recover roll back an interrupted transaction
|
||||
remove remove the specified files on the next commit
|
||||
rename rename files; equivalent of copy + remove
|
||||
resolve resolve file merges from a branch merge or update
|
||||
resolve retry file merges from a merge or update
|
||||
revert restore individual files or dirs to an earlier state
|
||||
rollback roll back the last transaction
|
||||
root print the root (top) of the current working dir
|
||||
@ -133,7 +133,7 @@ use "hg -v help" to show aliases and global options
|
||||
recover roll back an interrupted transaction
|
||||
remove remove the specified files on the next commit
|
||||
rename rename files; equivalent of copy + remove
|
||||
resolve resolve file merges from a branch merge or update
|
||||
resolve retry file merges from a merge or update
|
||||
revert restore individual files or dirs to an earlier state
|
||||
rollback roll back the last transaction
|
||||
root print the root (top) of the current working dir
|
||||
|
@ -322,7 +322,7 @@ hg merge
|
||||
echo % keyword stays outside conflict zone
|
||||
cat m
|
||||
echo % resolve to local
|
||||
HGMERGE=internal:local hg resolve
|
||||
HGMERGE=internal:local hg resolve -a
|
||||
hg commit -m localresolve
|
||||
cat m
|
||||
|
||||
|
@ -44,9 +44,12 @@ hg resolve baz
|
||||
echo % after
|
||||
hg resolve -l
|
||||
|
||||
echo % resolve all
|
||||
echo % resolve all warning
|
||||
hg resolve
|
||||
|
||||
echo % resolve all
|
||||
hg resolve -a
|
||||
|
||||
echo % after
|
||||
hg resolve -l
|
||||
|
||||
|
@ -28,6 +28,8 @@ merging baz and foo to baz
|
||||
% after
|
||||
U bar
|
||||
R baz
|
||||
% resolve all warning
|
||||
abort: no files or directories specified; use --all to remerge all files
|
||||
% resolve all
|
||||
merging bar
|
||||
warning: conflicts during merge.
|
||||
|
Loading…
Reference in New Issue
Block a user