>>> "Steve" == Steve Fink <sph...@gmail.com> writes:

    > On 09/16/2016 08:08 AM, Simon King wrote:
    >> On Fri, Sep 16, 2016 at 2:51 PM, Uwe Brauer <o...@mat.ucm.es> wrote:
    >>> BTW even if I used named branches instead of bookmarks there is no
    >>> simple way to export a whole branch? As in  in my example
    >>> hg export --branch uwe -o mypatch.patch
    >>> Does not exist?

    > hg export -r 'uwe % master' -o mypatch.patch

    > works with bookmarks, and I'm pretty sure it'd work with named branches.

Do you mean uwe and master are two different bookmarks in this example or
could uwe be a named branch and master a bookmark?

That is very interesting.
But I run an experimient

hg log -G

@  changeset:   5:fafe498954e1
|  bookmark:    uwe
|  tag:         tip
|  user:        Uwe Brauer <o...@mat.ucm.es>
|  date:        Fri Sep 16 20:24:59 2016 +0000
|  summary:     HG: Third commit
o  changeset:   4:1a59a966cb0a
|  user:        Uwe Brauer <o...@mat.ucm.es>
|  date:        Fri Sep 16 20:24:49 2016 +0000
|  summary:     HG: Seond commit
o  changeset:   3:5f0c33d9e2c7
|  user:        Uwe Brauer <o...@mat.ucm.es>
|  date:        Fri Sep 16 20:24:39 2016 +0000
|  summary:     HG: First commit
o  changeset:   2:1f0470d4786a
|  bookmark:    master
|  tag:         default/master
|  user:        Uwe <o...@mat.ucm.es>
|  date:        Fri Sep 16 20:23:48 2016 +0000
|  summary:     Git: Third commit.

hg export -r 'uwe % master' -o mypatch.patch

hg: parse error at 4: syntax error

Hg bookmarks gives:
 master                    2:1f0470d4786a
 * uwe                       5:fafe498954e1

    >> If you've used a named branch, the branch() function would return all
    >> the revisions on that branch.

    > Personally, I would not use a named branch for feature work like this.
    > The branch is baked into the commits, so it could cause problems
    > rebasing and things. Admittedly, I haven't used named branches at all,
    > but my impression is that they only make sense for changes that you
    > really do only want on that branch and never on another branch. In
    > this case, you do not want that restriction; you want to be able to
    > move these changes off of your feature branch (er, fork? head?
    > bookmark?) and onto master or whatever the main development line is.

In my local repo I work usually with three named branches and merge
between them, I did not run into problems so far. 

    > Plus, it seems like 'uwe % master' pretty easily gives you exactly
    > what you want. I suppose if you fork another feature branch uwe2 off
    > of uwe, things might get more complex -- or rather, you'd just need to
    > specify what you mean. 'uwe2 % uwe' would give stuff only on uwe2 and
    > not uwe, or 'uwe2 % master' could be used to apply all changes needed
    > to get master to look like uwe2.

In that example my enthusim of using named branch has cooled down a bit,
because I feel uneasy to use both a bookmark and a named branch. That is
 hg update uwe(branch)
 hg update master(bookmark)

Is different from
 hg update default
 hg update uwe (branch active) while bookmaster master is inactive.

That could become messy easily, at least for me.

    > (As a side note, I only know about % because of questions on this
    > list. I wish I'd known of it sooner, as I've had the exact same need
    > and found it difficult to construct the appropriate revset.)

    > _______________________________________________
    > Mercurial mailing list
    > Mercurial@mercurial-scm.org
    > https://www.mercurial-scm.org/mailman/listinfo/mercurial

Mercurial mailing list

Reply via email to