git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Can I Insert some Ancient History into a repo?
@ 2020-12-02 10:54 Kerry, Richard
  2020-12-02 11:15 ` Johannes Schindelin
  2020-12-02 15:50 ` Ævar Arnfjörð Bjarmason
  0 siblings, 2 replies; 5+ messages in thread
From: Kerry, Richard @ 2020-12-02 10:54 UTC (permalink / raw)
  To: git@vger.kernel.org

 
The Story
- - - - - - - -
My project, "L", has two branches "L1" and "L2".  It was developed as L1 for a long period, then a branch, L2, was made and further development done on that.  Since the branch there has been further development on L1.
 
A-B-C-D-E-F-G-H
             \
              J-K-L-M
 
(That's supposed to show J branching off D.  I'm writing this with proportional spacing so it may look different on receipt)


The Reality
- - - - - - - - -
L was developed in CVS as its trunk.  That is what I am now referring to as L1.
A-B-C-D-E-F-G-H
 
At some point a snapshot was taken and put into Subversion.  That is what I am now referring to as L2.
It is either 
D-J-K-L-M
Or, more likely, just
J-K-L-M
(If some work was done on the snapshot before it was used to start the new project in SVN, which I think it was)
 
L2 has been converted to git using git's built-in Subversion handling.
I have a backup of the CVS repository for L1 and I can easily convert it to git using cvs2git.
 
What I would like to do is to merge these two branches into a single git repo.  Specifically, to insert L1 into the existing git repo which is currently only L2.

(The subversion server no longer exists, and I don't have easy access to the repository backup, and there may have been work done since the import.  I have a full backup of the CVS repository and I can easily convert it to git using cvs2git, with any extra parameters required.)

I've read up on merging repositories and I can easily get L1 into the same repo as L2, as a separate line of development.  However, merging it is not the right thing to do, as that leaves me with L1 and L2 having separate starting points, with a merge leading to there being only one head.  That's the opposite of what I want - I want to keep one starting point (that of L1), and branch L2 off it (with L2 ending up as master).

cvs2git works by generating fast-import scripts, so I can intercept the result of that and edit the import scripts if necessary.  I can even dump L2 and rebuild everything using fast-import if that's the best option.  Maybe L2 needs to be imported into L1 after generating a tag in L1 to indicate where the branch happens?  That seems to be a more complex work-flow for this task - I would hope to be able to do minor manipulations of branches and only one fast-import (ie L1).


So, I'm still looking to see if I can find any other way of wrangling branches to make this happen, but I'd appreciate anyone else's advice on how to achieve my merger.


Regards,
Richard.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-13 10:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 10:54 Can I Insert some Ancient History into a repo? Kerry, Richard
2020-12-02 11:15 ` Johannes Schindelin
2020-12-02 15:50 ` Ævar Arnfjörð Bjarmason
2021-03-12 15:37   ` Kerry, Richard
2021-03-13  9:59     ` Kerry, Richard

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).