Git workflow in Mercurial
Arne Babenhauserheide
arne_bab at web.de
Sat Dec 13 03:17:14 CST 2008
Am Freitag 12 Dezember 2008 19:50:47 schrieb Leslie P. Polzer:
> Hi once more,
>
> a fellow developer proposed this to me:
> > [...] small topic branches. Those are easy to merge, easy to
> > port and easy to separate out, e.g. you can easily point to a bunch of
> > changesets and say "get these to get the new navigation" or something.
> >
> > git lets you do that easily, plus it lets you actually share these
> > topic branches between people. You can say "I want to pull changes from
> > Leslie's topic branch X into my local branch Y", which is very useful,
> > plus it lets me keep all these in a single tree in a single
> > directory. There might be a way to do that with hg (named branches), but
> > I think it isn't as smooth as the git way.
>
> How would we approach this best with hg? Named branches, local branches,
> pbranch?
To get exactly the same workflow I'd use named branches.
But different from git, every developer actualy has all the code in his
repository, so he wouldn't have to have access to the other ones repository to
get the branch; an update to the branch would suffice.
pbranch might be the best way to go here, but I don't know it well enough to
be sure, so I first tried out another way.
I just tried the simple named branch workflow and it seems to work nicely.
I setup a test repo and uploaded it to freehg:
- http://freehg.org/u/ArneBab/hg_test_simple_topic_branches/
Just clone it and run ./test_script.sh
Besides: I recently got bitten quite badly by the git branches, because I
didn't realize that I have to explicitely call the branch from the repository.
Disclaimer: I don't know much about the architecture of git. I just need to
use it and I spent about 2 times as much time for learning it as I needed to
learn all the basic stuff (also branching) of Mercurial.
Due to local branches, even a shared git repository seems to be no longer
really distributed, but rather a strange hybrid, because I don't get all
repository data with a normal fetch (or at least it seems that way to me,
please correct me if I'm wrong!).
In Mercurial a clone has all data, and if I want to see what others work on, I
just switch to the right branch.
But I think that this is a philosophical issue and so it isn't really suited
for a discussion which system is better for the task at hand.
Best wishes,
Arne
--
-- My stuff: http://draketo.de - stories, songs, poems, programs and stuff :)
-- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the
history of free software.
-- Ein Würfel System: http://1w6.org - einfach saubere (Rollenspiel-) Regeln.
-- PGP/GnuPG: http://draketo.de/inhalt/ich/pubkey.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://selenic.com/pipermail/mercurial/attachments/20081213/b3fa54e0/attachment.pgp
More information about the Mercurial
mailing list