"Batteries Included" windows installer

Steve Borho steve at borho.org
Wed Aug 29 18:56:10 CDT 2007


On Thu, 2007-08-30 at 08:33 +1000, Bela Babik wrote:
> > * I tried to use csdiff but I couldn't figure out how to make it do a three
> > way merge or the "change selection" feature that qct needs.  TortoiseMerge
> > can perform both tasks, if a bit clumsily.
> 
> What is this change selection function?
> kdiff3 can do automatic merges if that's what you need:
> help: kdiff3 -h
> merge:  -m
> no gui if there are no conflicts: --auto

In qct you can right-click on a 'M' status file and chose 'Select
changes to commit' (this option is only available if you've configured a
2way merge tool in the preferences dialog).  This performs a "poor
man's" darcs record.

Say the file you're selecting changes from is named foo.c.  It first
moves your working copy (modified) foo.c to .qct/foo.c, then runs 'hg
cat foo.c' to get the unmodified parent revision back in it's original
location.  It then spawns a merge tool that allows you to selectively
merge your changes from .qct/foo.c back to foo.c.  After you commit the
file with partial changes, qct moves .qct/foo.c over the top of foo.c.
This has the effect of replacing the remaining (uncommitted) changes
back in your working copy.

It's even handy at times to move changes out of a MQ patch (qrefresh
with selected changes) so that you can place them elsewhere, though it's
a bit clunky.

I did this a while before the record extension was available.

The "Batteries Included" installer configures qct to use kdiff3 to do
this selected merge of the changes back into the original.  It basically
does this: kdiff3 .qct/foo.c foo.c -o foo.c -L1 modified -L2 original

-- 
Steve Borho <steve at borho.org>



More information about the Mercurial mailing list