RE: cvs2git master branch empty - can't find trunk anywhere

Mark Hedges <[email protected]> Wed, 9 Apr 2014 19:07:44 +0000
Newsgroups gmane.comp.version-control.subversion.cvs2svn.user
Message-ID <55EEF0B3C5BF2744B2248754D717EE4C337C37@USASHEXMB03.LYV.LiveNation.com>
Create a remote repo on gitlab or something.

Clone that remote repo to a local workspace.  Add a file, delete a file as =
a test.

CVS repo has some branches but most work is on CVS HEAD.

Run cvs2git.  fast-import into the local workspace.

No files in master.

Sorry that was not more clear.

Mark

-----Original Message-----
From: Michael Haggerty [mailto:[email protected]]=20
Sent: Wednesday, April 09, 2014 7:22 AM
To: Mark Hedges; [email protected]
Subject: Re: cvs2git master branch empty - can't find trunk anywhere

On 04/08/2014 08:20 PM, Mark Hedges wrote:
> Yeah, there seems to be some kind of bug. They've developed in CVS
> HEAD for the last few years and it is far from empty.
>=20
> master was already checked out when I ran fast-import. In this test,
> I added a new file to CVS HEAD and created a branch of the top directory
> called 'gitimporttest'. It worked fine.
>=20
> -----------------------------------
> 2014-04-08 11:15:06 Tue $ git checkout gitimporttest
> Checking out files: 100% (9160/9160), done.
> Switched to branch 'gitimporttest'
>=20
> 2014-04-08 11:18:48 Tue $ ls NTF/starship-enterprise.txt
> NTF/starship-enterprise.txt
>=20
> 2014-04-08 11:18:51 Tue $ git ls-tree refs/heads/gitimporttest
> 040000 tree 22a6ad46268df8d9547c211efb68db93cb74923e    NTF
>=20
> 2014-04-08 11:19:19 Tue $ git log refs/heads/gitimporttest --oneline | wc
>    5654   49527  311551
>=20
> 2014-04-08 11:09:25 Tue $ git checkout master
> Checking out files: 100% (9160/9160), done.
> Switched to branch 'master'
> Your branch is up-to-date with 'origin/master'.

The above lines don't make any sense to me.  What is the
"refs/heads/gitimporttest" branch and where did it come from?  Why does
your repository have a "refs/remotes/origin/master" reference?

It seems to me that you have done a bunch of steps that you haven't told
us about, and you expect us to help you by guessing the missing parts of
the story.

What does "git for-each-refs" output?

> 2014-04-08 11:14:50 Tue $ ls
>=20
> 2014-04-08 11:14:53 Tue $ git ls-tree refs/heads/master
>=20
> 2014-04-08 11:15:00 Tue $ git log refs/heads/master
> commit 582e4fc64b551e6ac79c826803f66841825d95b3
> Author: Mark Hedges <[email protected]>
> Date:   Fri Apr 4 11:08:30 2014 -0700
>=20
>     foo
>=20
> commit 5b8051eedb3e52f2cf27078ce1c41642b213cee0
> Author: Mark Hedges <[email protected]>
> Date:   Mon Mar 31 18:08:18 2014 -0700
>=20
>     foo
> -----------------------------------
>=20
> Could this be because I'm importing into a non-bare repository? I
> planned to push master to origin master after the import.

No, it should work just fine to import into a non-bare repository.

> When we do it for real, it seems like if I create a CVS branch
> called 'master' that it would be imported to git master.

If there is a CVS branch called "master", that might confuse cvs2git.
It might not realize that both CVS HEAD and CVS branch "master" are
slated to be converted to the same Git reference, refs/heads/master.
Does your CVS repo have a branch called "master"?

If that's not the answer, then please report your problem as described
in the FAQ, with all the necessary information including a reproducible
test case if possible.  As you can probably imagine, we would have
noticed a bug that caused cvs2git to fail to convert master in common
scenarios, so there is likely something unusual in your CVS repo or in
how you are running cvs2git that is triggering your problem.

Michael

--=20
Michael Haggerty
[email protected]
http://softwareswirl.blogspot.com/

------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=3D1670&dsMessageId=3D=
3076234

To unsubscribe from this discussion, e-mail: [[email protected]=
ris.org].