Is it possible to have remote named or local branches in HG?

Sean Kelley svk.sweng at gmail.com
Sat Jul 7 21:54:21 CDT 2007


On 7/6/07, Sean Kelley <svk.sweng at gmail.com> wrote:
> For example:
>
> With GIT I can have a remote added.  I can then create a branch
> locally that maps to that remote.
>
> Is there something similar to this?
>
> git clone git://mysite.com/data/git/linux-devel linux-devel
>
> cd linux-devel
>
> git remote add linux-stable git://mysite.com/data/git/linux-stable
>
> git checkout --track -b local-stable linux-stable/master

My solution for this workflow question seems to be the following.  Let
me know if there is a better way:

hg clone ssh://mercurial@hg.mysite.com/hg/montana/kernel/linux-stable.hg
MT-stable
hg clone ssh://mercurial@hg.mysite.com/hg/montana/kernel/linux-devel.hg MT-devel

cd MT-devel
hg rm Test  (removed a file)
hg commit
hg out
comparing with ssh://mercurial@hg.mysite.com/hg/montana/kernel/linux-devel.hg
searching for changes
changeset:   459:93ef2fa5749a
tag:         tip
user:        Sean  Kelley
date:        Fri Jul 06 17:28:07 2007 -0500
summary:     Removed test file

hg push (now sending to remote)
pushing to ssh://mercurial@hg.mysite.com/hg/montana/kernel/linux-devel.hg
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 0 changes to 0 files

cd ../MT-stable

hg in ../MT-devel (let's see what's different)

Yikes a whole bunch of stuff...

Hmm, I only want changeset 459 from above.

hg transplant --log -s ../MT-devel 459
searching for changes
applying 93ef2fa5749a
93ef2fa5749a transplanted to d528526f4d0c

hg out (let's see what change this will do to the remote stable)
comparing with ssh://mercurial@hg.mysite.com/hg/montana/kernel/linux-stable.hg
searching for changes
changeset:   459:d528526f4d0c
tag:         tip
user:        Sean  Kelley
date:        Fri Jul 06 17:28:07 2007 -0500
summary:     Removed test file

Nice.  Let's push.

hg push
pushing to ssh://mercurial@hg.mysite.com/hg/montana/kernel/linux-stable.hg
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 0 changes to 0 files


Thanks,

Sean




>
>
>
> Thanks,
>
>
> Sean
>


More information about the Mercurial mailing list