[PATCH] clone: update to branch of parent for local source repos by default

Greg Ward greg-hg at gerg.ca
Wed Oct 21 00:01:12 UTC 2009


On Tue, Oct 20, 2009 at 7:01 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> For the record: the idea was
>
> $ hg clone -u stable thg-stable thg-stable-bug1234
> updating to branch stable
> 297 files updated, 0 files merged, 0 files removed, 0 files unresolved
>
> or
>
> hg clone -u rev src dest
>
> which would checkout revision, tag or branch 'rev'.

That sounds fairly useful.  But I think even a tightly focussed option
would be super useful:

  hg clone --update-to-parent-of-source src dest

or

  hg clone --update-to-branch-of-source src dest

(They are subtly different in case src is at an old changeset on some
named branch: should dest be at that exact changeset, or at the
tipmost changeset on the same branch?  I think the latter.)

Note that I am not seriously proposing either of the above option
names, just their semantics.  --source-branch perhaps?  Either one is
obviously a special case of your "-u" idea, so not strictly
necessary... but darned handy, I think.

Greg



More information about the Mercurial-devel mailing list