Advocacy vs. git

Martin Geisler mg at lazybytes.net
Mon Apr 27 18:33:17 CDT 2009


Hans Meine <meine at informatik.uni-hamburg.de> writes:

> On Saturday 25 April 2009 16:22:34 Augie Fackler wrote:
>> If you want to do more (reorder changes, drop some changes), you can
>> also take a look at my histedit extension [1] which is directly
>> inspired by Git's interactive rebase. Word of warning: it doesn't yet
>> play nice with mq. Then again, it's replaced most of my uses of mq,
>> so I don't care about that as much as I thought I would.
>>
>> [1] http://bitbucket.org/durin42/histedit/
>
> It would be great if there were some docs. Alas, the above repo does
> not contain a README, and while
> http://www.selenic.com/mercurial/wiki/index.cgi/HisteditExtension
> exists, it's more or less useless.

You could search for 'git rebase --interactive' -- you'll find hundreds
of pages that explain what it is -- it seems to be one of the most
popular Git commands.

> Motivation: I do not know git rebase --interactive, so I do not know
> what histedit does at all.

The histedit extension allows you to quickly decide on the fate of a
bunch of changesets by editing a text file in your editor. You make some
commits

  [a] --- [b] --- [c] --- [d]

and then decide to rework changesets b, c, and d:

  hg histedit b

This drops you into your editor with a file that looks like this:

  pick 655c435efe92 b
  pick c47d17a27e19 c
  pick b04d79f9e2dd d

  # Edit history between 30 and b04d79f9e2dd
  #
  # Commands:
  #  p, pick = use commit
  #  e, edit = use commit, but stop for amending
  #  f, fold = use commit, but fold into previous commit
  #  d, drop = remove commit from history
  #

And as the instructions say, you can now edit this file to edit the
history. When you save and exit the editor the actions are performed.

So it exposes functionality similar to what you could get using MQ, but
in a more convenient way.

See also the tests here:

  http://bitbucket.org/durin42/histedit/src/tip/tests/

The files without '.out' contain the commands, the corresponding file
'.out' file is the output of running the commands (standard Mercurial
test suite setup).

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20090428/6fd95761/attachment.pgp 


More information about the Mercurial mailing list