How to extract changes from unrevisioned repository

Kyle Altendorf kyle.altendorf at gmail.com
Wed Jan 13 10:44:37 CST 2010


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.

>
>> Is there some method for resolving this issue other than double
>> checking every difference?  I could imagine a tool that would reverse
>> every hunk in the repository and try to apply it to the uncontrolled
>> copy to identify which changes had been applied but I assume that
>> there would be numerous problems with that.  Any comments would be
>> appreciated.
>
> I've done this about half a dozen times with a copy of the Linux kernel
> and about 3-10MB of local delta pulled out of useless incoherent CVS
> histories. I pull a giant project-wide diff into a diff-aware editor
> like Emacs and manually chop it into smaller patches. Then I drop them
> all into mq, push them one by one, and throw out the ones that are
> already in the tree. This tends to work well with the kernel as changes
> are pretty well localized to drivers, filesystems, and architectures,
> but for other trees, I'm sure it's a nightmare.

Somehow I've managed to not learn Emacs and all it's features despite
having learned (sort of) VI about 15 years ago.  Maybe I should be the
one looking for a non-technical position.  :]  Thanks for the
suggestion and excuse to finally give Emacs a try.

>
> A while back, I posted a script to find the version of a file in history
> that most nearly corresponded to a given file contents. You might find
> it useful. Not sure how to find it though.

A quick search of the list history didn't seem to show it but if I
find it I'll repost it in this thread.

Thanks,
-kyle

>
> --
> http://selenic.com : development and support for Mercurial and Linux
>
>
>


More information about the Mercurial mailing list