a "patch tree" instead of a patch queue?

Dan dan at dandrake.org
Wed May 28 08:15:35 CDT 2008


On Wed, 28 May 2008 at 08:39AM -0400, Ted Pavlic wrote:
> > I'm wondering how to do something with Mercurial (or other VC
> > software) that is pretty rare, possibly nonexistent. :)
> 
> How is this any different from creating branches (in any VC)?

I don't know. It probably isn't. I use Mercurial at a very low level,
because that's all I've needed, and the people who talk about branches
use a lot of jargon and I've been too lazy to figure it out.

One possible difference is that I might want to go back to the base
version and make changes to it, and then have those changes reflected in
the journal version and preprint version (possibly with some manual
merging).

> In other words, why do you feel you need to use patches instead of 
> normal changesets?

One reason is that I seem to make "shotgun commits": I make a commit,
then, over the course of the next 15 minutes, make a bunch of tiny
commits adding in tiny bits I've forgotten and fixing dumb mistakes.
With a patch queue, I just keep doing 'qrefresh' and it gathers up all
my work for me.

I also mentioned patch queues because they're pretty lightweight,
flexible, and I understand them.

> Why can't you just create two three branches so that your repo becomes 
> triple headed? For example...
> 
> 	# Tag the root to find it later
> 	hg tag root
> 
> 	# Commit changes you've made to journal version
> 	hg commit -m "Journal version"
> 	hg tag journal
> 
> 	# Go back to root version
> 	hg update -C root
> 
> 	# Commit changes you made to preprint version
> 	hg commit -m "Preprint version"
> 	hg tag preprint
> 
> 	# Go back to journal version
> 	hg update -C journal

I often get confused when I read things about branching and tagging and
so on, but I will look at this.

Looking through the list archives (why didn't I do that before?) I see
that this concept comes up rather frequently. The "Managing independent
queues" thread from last month mentioned multiple patch queues, which is
basically what I was thinking. But having multiple heads might work just
as well for my needs.

Thanks for your help!

Dan

-- 
Ceci n'est pas une .signature.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://selenic.com/pipermail/mercurial/attachments/20080528/11909598/attachment.pgp 


More information about the Mercurial mailing list