several rev, one patch exclude branch

Gregory Szorc gregory.szorc at gmail.com
Sun Aug 14 21:18:59 UTC 2016


On Sun, Aug 14, 2016 at 12:38 AM, Uwe Brauer <oub at mat.ucm.es> wrote:

> Hello
>
> Please have a lock at the following log -G
>
> @  changeset:   6831:51db987e1c4b
> |  bookmark:    master
> |  tag:         tip
> |  parent:      6828:812891d581e1
> |  user:        Uwe Brauer <oub at mat.ucm.es>
> |  date:        Sat Aug 13 19:25:53 2016 +0000
> |  summary:     * exam.el (LaTeX-exam-class-options): Typos
> |
> | o  changeset:   6830:d933bd3edf00
> | |  bookmark:    uwe
> | |  user:        Uwe Brauer <oub at mat.ucm.es>
> | |  date:        Sat Aug 13 16:19:35 2016 +0000
> | |  summary:     Start to rewrite section about prettifying in
> doc/auctex.texi
> | |
> | o  changeset:   6829:2eeafa7e08a6
> |/   user:        Uwe Brauer <oub at mat.ucm.es>
> |    date:        Sat Aug 13 16:17:16 2016 +0000
> |    summary:     Add style/bidi.el
> |
> o  changeset:   6828:812891d581e1
> |  user:        Uwe Brauer <oub at mat.ucm.es>
> |  date:        Sat Aug 13 15:55:06 2016 +0000
> |  summary:     Add entry to Makefile.in: examn.el (found in
> style/examn.el)
> |
>
> I want to generate a patch which covers rev 6828 till 6831 but excludes
> 6830 and 6829 because it is on a branch.
> How can I do that?
> hg export -g -r 6831:6828
>
> Generated a patch which included the branch, which is not what I want
>

You want the "::" operator to select a DAG range. From `hg help revset`:

    "x::y"
      A DAG range, meaning all changesets that are descendants of x and
      ancestors of y, including x and y themselves. If the first endpoint is
      left out, this is equivalent to "ancestors(y)", if the second is left
      out it is equivalent to "descendants(x)".

      An alternative syntax is "x..y".

    "x:y"
      All changesets with revision numbers between x and y, both inclusive.
      Either endpoint can be left out, they default to 0 and tip.

So in your case: `hg export -g -r 6828::6831`. Of course, you could also
put the SHA-1 fragments or the bookmark names in there as well. The
following is equivalent: `hg export -g -r 812891d581e1::master` (or at
least it is the same until the "master" bookmark moves).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20160814/8a7971a6/attachment-0002.html>


More information about the Mercurial mailing list