cvs importing a forked project

7 messages, 3 authors, 2016-06-15 · open the first message on its own page

cvs importing a forked project

From: Eric Frederich <hidden>
Date: 2016-06-15 22:49:40

Hello,

I have a project (several actually) where development was done in cvs
for 10 years.  Then, about 5 years ago, a copy of the latest was made
and development continued in a new project.
Development in the old project stopped for the most part.

Is there any way where I can combine these two projects in git?
Basically, take the newer project's first commit and make its parent
the the last commit of the older project.
Development was pretty linear.

Thanks,
~Eric

Re: cvs importing a forked project

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:40

On Fri, Oct 1, 2010 at 17:38, Eric Frederich [off-list ref] wrote:
I have a project (several actually) where development was done in cvs
for 10 years.  Then, about 5 years ago, a copy of the latest was made
and development continued in a new project.
Development in the old project stopped for the most part.

Is there any way where I can combine these two projects in git?
Basically, take the newer project's first commit and make its parent
the the last commit of the older project.
Development was pretty linear.
Sure, you import them both into git with cvs2git (or something like
that), then you fetch all the commits into a single git repository.

Then it becomes a problem of merging two git histories, something
that's widely documented and well understood.

Re: cvs importing a forked project

From: Brandon Casey <hidden>
Date: 2016-06-15 22:49:40

On 10/01/2010 12:38 PM, Eric Frederich wrote:
Hello,

I have a project (several actually) where development was done in cvs
for 10 years.  Then, about 5 years ago, a copy of the latest was made
and development continued in a new project.
Development in the old project stopped for the most part.

Is there any way where I can combine these two projects in git?
Basically, take the newer project's first commit and make its parent
the the last commit of the older project.
Development was pretty linear.
You can do this very easily using grafts.

   https://git.wiki.kernel.org/index.php/GraftPoint

filter-branch can be used to rewrite the history and make the grafts
permanent.

-Brandon

Re: cvs importing a forked project

From: Eric Frederich <hidden>
Date: 2016-06-15 22:49:42

Interesting.  Looks easy to use except I can't figure out how to get
the two projects imported to the same git project.

If I run the following...

$ git cvsimport -C myproject -d /some/vault projects/foo_old
$ git cvsimport -C myproject -d /some/vault projects/foo_new

... then the projects look to be merged at some arbitrary point in
time based on date.
I'm not even sure if the entire history of foo_new is imported.
This is just based off of what gitk is showing me but it seems to take
the entire history of foo_old but when importing foo_new but it looks
like only commits made after the last commit of foo_old are imported.

Obviously this isn't even using grafts since there is no grafts file.
How do I get these two projects imported in their entirety into a
single git repository so that I can create my own grafts file?
Also, once I have my two projects imported into the same grafts file
they should be completely independent right?... how do I switch
between them then or even know what the SHA-1's are if they're not
connected at all?

Thanks,
~Eric

On Fri, Oct 1, 2010 at 1:57 PM, Brandon Casey
[off-list ref] wrote:
On 10/01/2010 12:38 PM, Eric Frederich wrote:
quoted
Hello,

I have a project (several actually) where development was done in cvs
for 10 years.  Then, about 5 years ago, a copy of the latest was made
and development continued in a new project.
Development in the old project stopped for the most part.

Is there any way where I can combine these two projects in git?
Basically, take the newer project's first commit and make its parent
the the last commit of the older project.
Development was pretty linear.
You can do this very easily using grafts.

  https://git.wiki.kernel.org/index.php/GraftPoint

filter-branch can be used to rewrite the history and make the grafts
permanent.

-Brandon

Re: cvs importing a forked project

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:42

On Tue, Oct 5, 2010 at 18:38, Eric Frederich [off-list ref] wrote:
Interesting.  Looks easy to use except I can't figure out how to get
the two projects imported to the same git project.

If I run the following...

$ git cvsimport -C myproject -d /some/vault projects/foo_old
$ git cvsimport -C myproject -d /some/vault projects/foo_new
Either switch to a new parentless branch between the two (I don't know
cvsimport), or import them in two distinct git repositories. Then when
that's finished do:

    git init the-merge &&
    cd the-merge &&
    git remote add ~/cvs-repo-1 &&
    git remote add ~/cvs-repo-2 &&
    git remote update

And you'll have all those commits / branches / tags from both of them
to work with.

Re: cvs importing a forked project

From: Eric Frederich <hidden>
Date: 2016-06-15 22:49:43

Thanks a bunch.
That set of commands seemed to work except the "git remote add"
commands needed a name.
After doing that I saw both disconnected trees in gitk.  I created my
.git/info/grafts file and it looked good.
I removed the two remotes afterwards and had to manually create a master branch.

I wanted to try to "switch to a new parentless branch" but don't know how.
How can I create / switch to a new empty parentless branch?


On Tue, Oct 5, 2010 at 3:20 PM, Ævar Arnfjörð Bjarmason
[off-list ref] wrote:
On Tue, Oct 5, 2010 at 18:38, Eric Frederich [off-list ref] wrote:
quoted
Interesting.  Looks easy to use except I can't figure out how to get
the two projects imported to the same git project.

If I run the following...

$ git cvsimport -C myproject -d /some/vault projects/foo_old
$ git cvsimport -C myproject -d /some/vault projects/foo_new
Either switch to a new parentless branch between the two (I don't know
cvsimport), or import them in two distinct git repositories. Then when
that's finished do:

   git init the-merge &&
   cd the-merge &&
   git remote add ~/cvs-repo-1 &&
   git remote add ~/cvs-repo-2 &&
   git remote update

And you'll have all those commits / branches / tags from both of them
to work with.

Re: cvs importing a forked project

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:43

On Wed, Oct 6, 2010 at 14:51, Eric Frederich [off-list ref] wrote:
I wanted to try to "switch to a new parentless branch" but don't know how.
How can I create / switch to a new empty parentless branch?
    git checkout --orphan parentless-branch-name-here
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help