How to extract changes from unrevisioned repository

Haszlakiewicz, Eric EHASZLA at transunion.com
Wed Jan 13 11:11:26 CST 2010


>-----Original Message-----
>From: mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com]
>On Behalf Of Kyle Altendorf
>On Mon, Jan 11, 2010 at 2:35 PM, Matt Mackall <mpm at selenic.com> wrote:
>> On Mon, 2010-01-11 at 14:06 -0800, Kyle Altendorf wrote:
>>> There is one person at work that I have been unable to convince to use
>>> Mercurial.  Not only is he not using revision control but the .hg
>>> folder has been deleted from his copies of the project.  I am trying
>>> to bring whatever changes were made in that uncontrolled copy back
>>> into the main repo.  The issue I am having is that as I try to find
>>> the 'parent' I am finding that certain changes have been cherry picked
>>> out of various changesets in the controlled project while ignoring
>>> other changes in the same or intermediate changesets.  The result is
>>> that I am having difficulty picking a single parent from which to try
>>> to merge the uncontrolled copy back in.
>>
>> Wow. Is this going to be an ongoing problem or is he now seeking
>> employment in a non-engineering field?
>
>He might retire (for the fourth time) or he might keep working
>part-time for a long time.  He's been working with (and friends of)
>the CEO for several decades so...  I really need to figure out how to
>get him to give Hg a shot or at least not tromple all over the
>history.

Arguments about how much time you (and anyone else) are wasting dealing with what he breaks, especially when translated into dollar figures, might be persuasive.  If he's friends with the CEO, you're probably going to need to convince the CEO to tell him to get in line. :(

As for actually dealing with merging in his changes, when I've had to do things like this in the past I've found that it can be easier to handle if you split it up into multiple steps, and merge from the "good" source tree into his source tree first.
i.e. assuming you're keeping his code on a separate branch:
1) import the latest version of his code
2) merge over changes from your main development branch into his branch
3) resolve any conflicts, duplicate merges, whatever ...
4) do a diff between his branch and the main development branch and review the changes to make sure they make sense.  Fix up anything that doesn't
5) merge over the fixed up code

By keeping his stuff on a separate branch you can more easily roll back if any particular merge gets AFU.  (just strip the revisions back to whenever and start over)

Good luck.  I hope you don't waste too much time on this.

eric


More information about the Mercurial mailing list