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

Mark Hedges <[email protected]> Tue, 8 Apr 2014 18:20:59 +0000
Newsgroups gmane.comp.version-control.subversion.cvs2svn.user
Message-ID <55EEF0B3C5BF2744B2248754D717EE4C333C1B@USASHEXMB03.LYV.LiveNation.com>
Yeah, there seems to be some kind of bug.  They've developed in CVS HEAD fo=
r the last few years and it is far from empty.

master was already checked out when I ran fast-import.  In this test, I add=
ed 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'

2014-04-08 11:18:48 Tue $ ls NTF/starship-enterprise.txt
NTF/starship-enterprise.txt

2014-04-08 11:18:51 Tue $ git ls-tree refs/heads/gitimporttest
040000 tree 22a6ad46268df8d9547c211efb68db93cb74923e    NTF

2014-04-08 11:19:19 Tue $ git log refs/heads/gitimporttest --oneline | wc
   5654   49527  311551

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'.

2014-04-08 11:14:50 Tue $ ls

2014-04-08 11:14:53 Tue $ git ls-tree refs/heads/master

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

    foo

commit 5b8051eedb3e52f2cf27078ce1c41642b213cee0
Author: Mark Hedges <[email protected]>
Date:   Mon Mar 31 18:08:18 2014 -0700

    foo
-----------------------------------

Could this be because I'm importing into a non-bare repository?  I planned =
to push master to origin master after the import.

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

Mark


-----Original Message-----
From: Michael Haggerty [mailto:[email protected]]=20
Sent: Monday, April 07, 2014 8:52 PM
To: Mark Hedges; [email protected]
Subject: Re: cvs2git master branch empty - can't find trunk anywhere

On 04/08/2014 01:37 AM, Mark Hedges wrote:
> Hi.  I'm trying to use cvs2git to convert a CVS repository into a
> non-bare git repository.
>=20
> It sort of works - I end up seeing a bunch of branches.  Except there is
> no branch called TAG.FIXUP like the documentation refers to.=20
> (http://cvs2svn.tigris.org/cvs2git.html)  And the master branch ends up
> empty.
>=20
> I created a new file in trunk in the CVS repo and ran again, then
> exhaustively searched every resulting git branch for the file.  It's not
> there.
>=20
> Would it be better to convert to a bare repo?  If so, how do I then
> merge the contents of that bare repo into an existing remote repo?
>=20
> Thanks for any insight people might be able to share.

You haven't really provided enough information to permit us to help you.

* The TAG.FIXUP branch is of secondary importance.

* The master branch should not end up empty unless all files were
deleted on CVS HEAD and you developed only on branches.  Are you sure
the branch was empty, or was it just that the working copy was empty
because you forgot the step

    git checkout master

?  Try running "git show-ref" in the repository directory and see if it
lists "refs/heads/master".  If it does, try commands like

    git ls-tree refs/heads/master
    git log refs/heads/master

The main reason to convert to a bare repo would be that you plan to put
the Git repository on a server somewhere (repos on servers should
usually be bare).  If the repo is just for your own private use then it
is OK to convert to a non-bare repo.

Michael

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

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

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