Collapse extension

Colin Caughie c.caughie at indigovision.com
Sun Apr 5 03:01:21 CDT 2009


There are two important differences:

1. You can collapse even if you're not rebasing. With rebase --collapse you're out of luck if nobody has actually made any changes to the shared repo since you last pulled. (Unless I'm missing something that is.)

2. With rebase --collapse you have to collapse everything from the branch point to your local head; with hg collapse you can collapse any consecutive subset of the revisions on your local branch. This is useful if you want to collapse a set of revisions relating to a particular task, but you've since made several commits for a new task that you don't yet want to collapse.

At my work we need both of these to support our normal working practices (we're in the process of shifting to Mercurial from a commercial tool that supported this kind of thing). I'd be interested to hear if other people find them useful as well.

Colin

> -----Original Message-----
> From: Matt Mackall [mailto:mpm at selenic.com]
> Sent: 04 April 2009 22:48
> To: Colin Caughie
> Cc: mercurial at selenic.com
> Subject: Re: Collapse extension
>
> On Sat, 2009-04-04 at 22:37 +0100, Colin Caughie wrote:
> > Hi,
> >
> > I've just written an extension that adds a "collapse" command to
> > Mercurial. It basically automates the process described at
> >
> http://www.selenic.com/mercurial/wiki/index.cgi/ConcatenatingChanges
> ets, making it a lot simpler and less error prone.
> >
> > If anyone's interested in this, you can find information on it
> here:
> > http://bitbucket.org/ccaughie/hgcollapse/wiki/Home
> >
> > Do be warned, it's very much at an experimental stage, so use at
> your
> > own risk. Any feedback and/or code reviews would be much
> appreciated.
> > I've only just started figuring out how Mercurial works so I've
> > probably done all sorts of things wrong.
>
> How does this compare to 'hg rebase --collapse'?
>
> --
> http://selenic.com : development and support for Mercurial and Linux
>
>
>
> --------------------------------------------------------------------
> ----------------
> scanned for viruses and spam by indigovision
> If you believe this email is spam, please forward to
> spam at emailfiltering.com

Latest News at: http://www.indigovision.com/news2009.php



More information about the Mercurial mailing list