interrupting a merge session

Matt Mackall mpm at selenic.com
Thu Jun 14 06:37:34 UTC 2007


On Wed, Jun 13, 2007 at 04:16:52PM -0700, Mike Kupfer wrote:
> For Solaris development it's not unusual for large projects to need to
> merge several files after pulling from the main "gate" repository.  And
> it's not unusual to want to do the merge in multiple sessions.  For
> example, start merging at the office, and finish merging at home.  Or
> have one person do most of the merges, but have a second person do
> particularly tricky merges in his or her area of expertise.
> 
> With Teamware, it's easy to defer merges of specific files: just type
> "skip" at the per-file prompt.  Teamware remembers that the file needs
> to be merged and will ask again with the next merge session.  It seems
> harder to do with Mercurial.  I was playing around with it yesterday,
> and when I bailed out of a merge session, I was told
> 
>   you can redo the full merge using:
>     hg update -C <rev1>
>     hg merge <rev2>
> 
> But as the text says, that's redoing the *full* merge.  I don't want
> that, because it will clobber the files I've already merged.  It looks
> like I can manually merge the remaining files, but there appear to be a
> couple gotchas.
> 
> First gotcha: I have to keep track of which files still need merging.
> 
> Second gotcha: there's no convenient way to do a full 3-way merge.  I
> have to manually extract the ancestor and other head for each file
> (e.g., using "hg cat").
> 
> Am I missing something, or is that pretty much the state of affairs?

There's no reason you actually have to do the hard work at hg merge
time. If your HGEDITOR script simply calls CVS merge and puts in conflict
markers, you can resolve conflicts after the fact. You can go a step
further and have your merge script make a list of files with
unresolved conflicts.

On the other side, you can have your HGEDITOR check that the things
you're checking in don't have conflict markers.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list