[PATCH 09 of 11 V5] update: accept --merge to allow merging across topo branches (issue5125)
Martin von Zweigbergk
martinvonz at google.com
Tue Feb 28 09:21:24 EST 2017
Sure, sounds good to me. I'd appreciate if that can be changed in flight.
On Tue, Feb 28, 2017, 01:37 Denis Laxalde <denis.laxalde at logilab.fr> wrote:
> Martin von Zweigbergk via Mercurial-devel a écrit :
> > # HG changeset patch
> > # User Martin von Zweigbergk <martinvonz at google.com>
> > # Date 1487019517 28800
> > # Mon Feb 13 12:58:37 2017 -0800
> > # Node ID d23e5a40f9c4c8d3459255c6c2cb633452b914d8
> > # Parent b99e3df11bb16c8c1118f2bf29ea0d0816591259
> > update: accept --merge to allow merging across topo branches (issue5125)
> >
> > diff -r b99e3df11bb1 -r d23e5a40f9c4 mercurial/commands.py
> > --- a/mercurial/commands.py Mon Feb 27 15:09:19 2017 -0800
> > +++ b/mercurial/commands.py Mon Feb 13 12:58:37 2017 -0800
> > @@ -5279,12 +5279,13 @@
> > @command('^update|up|checkout|co',
> > [('C', 'clean', None, _('discard uncommitted changes (no backup)')),
> > ('c', 'check', None, _('require clean working directory')),
> > + ('m', 'merge', None, _('merge local changes')),
>
> It's not obvious to me what "local changes" means, perhaps "uncommitted
> changes" would be better (more consistent with the docstring also).
>
> > ('d', 'date', '', _('tipmost revision matching date'), _('DATE')),
> > ('r', 'rev', '', _('revision'), _('REV'))
> > ] + mergetoolopts,
> > - _('[-C|-c] [-d DATE] [[-r] REV]'))
> > + _('[-C|-c|-m] [-d DATE] [[-r] REV]'))
> > def update(ui, repo, node=None, rev=None, clean=False, date=None,
> check=False,
> > - tool=None):
> > + merge=None, tool=None):
> > """update working directory (or switch revisions)
> >
> > Update the repository's working directory to the specified
> > @@ -5303,8 +5304,8 @@
> >
> > .. container:: verbose
> >
> > - The -C/--clean and -c/--check options control what happens if the
> > - working directory contains uncommitted changes.
> > + The -C/--clean, -c/--check, and -m/--merge options control what
> > + happens if the working directory contains uncommitted changes.
> > At most of one of them can be specified.
> >
> > 1. If no option is specified, and if
> > @@ -5316,10 +5317,14 @@
> > branch), the update is aborted and the uncommitted changes
> > are preserved.
> >
> > - 2. With the -c/--check option, the update is aborted and the
> > + 2. With the -m/--merge option, the update is allowed even if the
> > + requested changeset is not an ancestor or descendant of
> > + the working directory's parent.
> > +
> > + 3. With the -c/--check option, the update is aborted and the
> > uncommitted changes are preserved.
> >
> > - 3. With the -C/--clean option, uncommitted changes are discarded
> and
> > + 4. With the -C/--clean option, uncommitted changes are discarded
> and
> > the working directory is updated to the requested changeset.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170228/f50a55b9/attachment.html>
More information about the Mercurial-devel
mailing list