[new-extension] hg breakout

Essien Ita Essien me at essienitaessien.com
Sat Sep 1 17:05:51 CDT 2007


Guido Ostkamp wrote:
> Hello,
> 
>> Essien Ita Essien wrote:
>>> Guido Ostkamp wrote:
>>>> To be useful, I would have expected that your extension scans the 
>>>> old repositories changesets to generate new changesets in the new 
>>>> repository that contain just changes to files in the selected 
>>>> directory, possibly by replaying those changes.
>>>
>>> The bo-cut does just this, and bo-explode does this for all sub 
>>> directories under the root of the repo.
>>
>> Actually, I re-read what you wrote here, and that's not quite what the 
>> cut operation does. It actually inits a _new_ repo with the contents 
>> of the _source_ directory. So the new repo 'broken out' actually has a 
>> pristine history.
> 
> That's exactly the problem.
> 
> If I were the maintainer of a project, and I needed to split up a 
> repository because it becomes hard to maintain due to its huge size, 
> then the requirements would be to convert into a number of much smaller 
> repositories but of course without loosing my history records.
> 

I see what you mean, infact, that's why the first thing I implemented 
when doing my personal proof of concept was the "copy" operation. I 
realized the size problem you mentioned earlier and decided to implement 
a "cut" also, that aggressively solves the problem (over aggressive? :) ).

Anyways... I won't pretend to be a guru on the source control domain, so 
i'm not exactly sure how this would work out. This is the rough idea 
floating around my head after reading what you described above.

1. Everyfile has its history, which contains changesets that list it as 
an affected file.

2. The breakout extension should carry along _only_ the changesets that 
affect _all_ the files that fall _under_ the subdirectory being processed.

Does this sound right?

If that sounds about right... the only remaining problem will be 
actually finding out how to get that done :)

cheers,
Essien
> Regards,
> 
> Guido
> 



More information about the Mercurial-devel mailing list