brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Downer <rich...@apache.org>
Subject Re: Repository splitting script
Date Tue, 08 Dec 2015 22:47:41 GMT
Tony,

Thanks for the link - I hadn't seen that particular method before.

Unfortunately the split we're trying to do isn't as simple as "this
directory goes here, and that directory goes there" - some of the
splits involve several directories, that are at different depths in
the tree, and I'm trying to avoid a rename (which hides the history,
at least a little bit). And also a fellow committer who wants the
result to look as smooth as possible :-)

But the key ingredient in both your linked blog post and mine is `git
filter-branch` which is a great - but complex - tool for bulk
processing on a repository.

Richard.


On 6 December 2015 at 00:18, Tony Su <tonysu@su-networking.com> wrote:
> An interesting project (porting and splitting a git repo including history).
>
> If you haven't found the following article, it might be helpful. Looks
> like what he's doing is simpler than your code (although may or may
> not be better)
>
> http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/
>
> Tony
>
> On Sat, Dec 5, 2015 at 3:46 PM, Richard Downer <richard@apache.org> wrote:
>> All,
>>
>> Per the recent vote on this list, we have decided to split the
>> Brooklyn repository into a number of smaller modules.
>>
>> With some of my colleagues, I've been working on a script to do this,
>> which preserves as much of the existing history, branches and tags as
>> possible.
>>
>> You can find the script here:
>> https://github.com/rdowner/brooklyn-repo-split/tree/master
>>
>> And the result of running the script:
>> https://github.com/rdowner/TEMP-brooklyn-dist
>> https://github.com/rdowner/TEMP-brooklyn-docs
>> https://github.com/rdowner/TEMP-brooklyn-library
>> https://github.com/rdowner/TEMP-brooklyn-server
>> https://github.com/rdowner/TEMP-brooklyn-ui
>>
>> I'd be interested in your feedback!
>>
>> --
>>
>> One limitation of this script occurs when files are moved between
>> locations that turn into different repositories after the split. My
>> expectation is that files would suddenly appear in the new repository
>> without history.
>>
>> Alex Heneveld has suggested a pre-processing phase which examines all
>> the files currently in each proposed subrepo, and then examines the
>> history to determine every filename that they have previously been
>> known as, and uses that in the whitelist for selecting the contents of
>> each subrepo. This would preserve history (although the subrepo
>> history would look a bit odd, as the early history of the repo would
>> have isolated files in random locations).
>>
>> I haven't implemented Alex's suggestion, but the design of this script
>> would easily allow the results of the pre-processing phase to be
>> integrated.
>>
>>
>> Cheers
>> Richard.

Mime
View raw message