Re: Workflow: split repository?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 12, 2007 at 14:21:39 +0200, Jan Wielemaker wrote:
> Hi,
> 
> I've got a big active project, until yesterday managed using CVS. As
> with any distributed academic research project the repository has become
> a nice mess where most files are in the wrong place and there are
> several almost independent sub-projects living in directories.
> 
> The plan is/was to
> 
> 	* Convert everything to GIT (done, through cvs2svn)
> 	* Everyone keeps hacking on their bits, while one is starting
> 	to reorganise the structure by moving files and directories
> 	and changing import headers, and other file references in
> 	a GIT branch.
> 	* Now we merge the continued work and the reorganisation to
> 	end up with a nice clean hierarchy :-)
> 	* Split the big project into multiple projects.  One of the
> 	reasons is that we want to make part of them public.  Others
> 	we cannot publish as they contain copyrighted data.  I understand
> 	we can reunite them using GIT sub modules.
> 
> Does this make sense?

It might make more sense to convert bit by bit, to separate git repositories.
Would save you some git-filter-branch work.

> While splitting we want to *loose* history information for some of the
> projects.  That is easy: simply create a new repository from the current
> files.  For some however we would like to *preserve* the history.  This
> means we would like to pick a hierarchy with its history.  After quite
> a bit of reading, I get the impression this cannot be done.  Am I right?

It can, but you have to be aware of the pitfalls. Git allows you to create
a new history, which is defined modification of the original history. There
is git-filter-branch command, that can create a repository with just
a subtree and such. But it's a new, independent, history. You can't merge
between the old and new one (but you can rebase the few commits someone made
while you were converting) and anyone who has the old history in his repo
will still have it.

> Is the only way to create a GIT repositiory right away from a subset of
> the CVS for which we want to preserve the history?

No, it's not. It will save you work if you can do as much splitting as
possible during the conversion, ie. convert the bits you know will be
separate separately (and combine them using submodules as appropriate).

But if you have bits that will take a lot of work to factor out, you can
convert to git, make the other code ready to use a submodule and than use
git-filter-branch to extract the right bits of history for the submodule.

-- 
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux