[PATCH RFC] mq: support "qimport --existing --name renametothis thatexistingpatch"

Matt Mackall mpm at selenic.com
Fri Jul 23 12:20:22 CDT 2010


On Fri, 2010-07-23 at 11:50 +0900, Nicolas Dumazet wrote:
> On Thu, 22 Jul 2010 11:01:08 -0500
> Matt Mackall <mpm at selenic.com> wrote:
> 
> > On Thu, 2010-07-22 at 10:00 +0900, Nicolas Dumazet wrote:
> > > Hello!
> > > 
> > > 2010/7/22 Bill Barry <after.fallout at gmail.com>:
> > > > Can the documentation be nudged around to suggest this one?
> > > > from:
> > > >     hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... FILE...
> > > > to:
> > > >     hg qimport [-e] FILE [-r REV] [-n NAME] [-f] [-g] [-P] ...
> > > >
> > > > (suggesting "qimport -r REV -n newname" as well)
> > > 
> > > I would not be too happy about that. FILE should be last. If you want
> > > we can move [-e] to be just before FILE, something like:
> > >        hg qimport [-f] [-g] [-P] [-r REV] [-n NAME] [-e]... FILE...
> > > 
> > > Maybe we can change FILE by [FILE [FILE ...] ] or something of the
> > > like, and/or specify that position does not matter, and/or give
> > > examples.
> > > 
> > > FILE in fact in not compulsory, as "qimport -r REV" works
> > 
> > I think it would be better to simply add an example usage to the help
> > text. We need more of those.
> 
> What about:
> 
> diff --git a/hgext/mq.py b/hgext/mq.py
> --- a/hgext/mq.py
> +++ b/hgext/mq.py
> @@ -1806,6 +1806,16 @@
>      To import a patch from standard input, pass - as the patch file.
>      When importing from standard input, a patch name must be specified
>      using the --name flag.
> +
> +    You can import a patch existing inside the patch repository and
> +    rename it on the go::

"To import an existing patch while renaming it::"

> +
> +      hg qimport -e -n new-name existing-patch
> +
> +    Note that order of arguments does not matter, and the same can be
> +    achieved with::
> +
> +      hg qimport -e existing-patch -n new-name
>      """

Why not just show the second, natural version?

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list