# "git cvsimport" with branches?

7 messages from 2005-07-17 to 2005-07-17. Participants: Wolfgang Denk, Alexey Nezhdanov, Matthias Urlichs.
Thread: https://gitlist.dev/t/1267

## Wolfgang Denk, 2005-07-17 08:40

Subject: "git cvsimport" with branches?
Message-ID: <20050717084053.94D603525D1@atlas.denx.de>
URL: https://gitlist.dev/e/20050717084053.94D603525D1%40atlas.denx.de

```
Is there a way to make "git cvsimport" create branches in git for any
branches it encounters in the CVS repository?

All my imports so far show just a linear line of development, and CVS
branch information seems lost.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Little known fact about Middle Earth:   The Hobbits had a very sophi-
sticated computer network!   It was a Tolkien Ring...

```

## Alexey Nezhdanov, 2005-07-17 08:57

Subject: Re: "git cvsimport" with branches?
Message-ID: <200507171257.59384.snake@penza-gsm.ru>
URL: https://gitlist.dev/e/200507171257.59384.snake%40penza-gsm.ru
In-Reply-To: <20050717084053.94D603525D1@atlas.denx.de>

```
В сообщении от Воскресенье 17 Июль 2005 12:40 Wolfgang Denk написал(a):
> Is there a way to make "git cvsimport" create branches in git for any
> branches it encounters in the CVS repository?
Heh. I was just preparing mail about the same problem.
It seems that git-cvsimport-script really don't likes branches in CVS.
I have attached simple script that demonstrates this.
On my machine it gives:
=============================
snake@home2:/tmp$ ./testscript
cvs checkout: Updating project
cvs add: scheduling file `a' for addition
cvs add: use `cvs commit' to add this file permanently
/tmp/20050717125452/cvsroot/project/a,v  <--  a
initial revision: 1.1
cvs tag: Tagging .
T a
/tmp/20050717125452/cvsroot/project/a,v  <--  a
new revision: 1.2; previous revision: 1.1
cvs update: Updating .
U a
/tmp/20050717125452/cvsroot/project/a,v  <--  a
new revision: 1.1.2.1; previous revision: 1.1
cvs rlog: Logging project
New a: 2 bytes.
Tree ID 2ce1eef76631e82282e0f7f0cf9e6f3e9a4a0b1e
Committed patch 1 (origin)
Committing initial tree 2ce1eef76631e82282e0f7f0cf9e6f3e9a4a0b1e
Commit ID f7030e1c361f94b8847ef6ad88248a675c7ce5a9
Update a: 4 bytes.
Tree ID 9d3d025fff2e43c6a7b837056632b436c8e31dfe
Parent ID f7030e1c361f94b8847ef6ad88248a675c7ce5a9
Committed patch 2 (origin)
Commit ID 67889434ca9623ad91f8e81e6143fed9c4115a86
Switching from origin to branch1
usage: git-read-tree (<sha> | -m [-u] <sha1> [<sha2> [<sha3>]])
read-tree failed: 256
snake@home2:/tmp$
=============================
Is it a planned behaivoir or cvsimport script were just recently broken?

-- 
Respectfully
Alexey Nezhdanov


#!/bin/sh
dirname=`date +"%Y%m%d%H%M%S"`
mkdir /tmp/$dirname
cd /tmp/$dirname
mkdir cvsroot
declare -x CVSROOT=/tmp/$dirname/cvsroot
cvs init
mkdir cvsroot/project
cvs co project
cd project
echo 1 >a
cvs add a
cvs ci -m 1 a
cvs tag -b branch1
echo 2 >>a
cvs ci -m 2 a
cvs update -r branch1
echo 3 >>a
cvs ci -m 3 a
git-cvsimport-script -v

```

## Matthias Urlichs, 2005-07-17 09:37

Subject: Re: "git cvsimport" with branches?
Message-ID: <pan.2005.07.17.09.37.58.463540@smurf.noris.de>
URL: https://gitlist.dev/e/pan.2005.07.17.09.37.58.463540%40smurf.noris.de
In-Reply-To: <20050717084053.94D603525D1@atlas.denx.de>

```
Hi, Wolfgang Denk wrote:

> Is there a way to make "git cvsimport" create branches in git for any
> branches it encounters in the CVS repository?
> 
That's what it does.

> All my imports so far show just a linear line of development, and CVS
> branch information seems lost.

Umm, exactly what did you do to visualize that? "gitk origin" obvioously
shows only one branch, because CVS doesn't have merge infe. Use
"gitk $(cat .git/revs/heads/*)" to show everything.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
"Any body of men who believe in hell will
 persecute whenever they have the power."
  [Joseph McCabe, "What Gods Cost Men"]

```

## Wolfgang Denk, 2005-07-17 10:15

Subject: Re: "git cvsimport" with branches?
Message-ID: <20050717101559.579C93525D1@atlas.denx.de>
URL: https://gitlist.dev/e/20050717101559.579C93525D1%40atlas.denx.de
In-Reply-To: <pan.2005.07.17.09.37.58.463540@smurf.noris.de>

```
In message <pan.2005.07.17.09.37.58.463540@smurf.noris.de> you wrote:
>
> > All my imports so far show just a linear line of development, and CVS
> > branch information seems lost.
> 
> Umm, exactly what did you do to visualize that? "gitk origin" obvioously
> shows only one branch, because CVS doesn't have merge infe. Use
> "gitk $(cat .git/revs/heads/*)" to show everything.

s/v/f/

I see. Thanks for pointing out. Umm... is there  a  way  to  manually
adjust  this  later?  I  can  identify the specific PatchSet(s) which
merge my CVS branches back into the trunk.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Either one of us, by himself, is expendable.  Both of us are not.
	-- Kirk, "The Devil in the Dark", stardate 3196.1

```

## Alexey Nezhdanov, 2005-07-17 10:48

Subject: Re: "git cvsimport" with branches?
Message-ID: <200507171448.09049.snake@penza-gsm.ru>
URL: https://gitlist.dev/e/200507171448.09049.snake%40penza-gsm.ru
In-Reply-To: <pan.2005.07.17.09.37.58.463540@smurf.noris.de>

```
Sunday, 17 July 2005 13:37 Matthias Urlichs wrote:
> Hi, Wolfgang Denk wrote:
> > Is there a way to make "git cvsimport" create branches in git for any
> > branches it encounters in the CVS repository?
>
> That's what it does.
But it does not, at least in some cases.
See my previous mail:
http://marc.theaimsgroup.com/?l=git&m=112159075029007&w=2
It have simple script attached that reproduces the problem.

-- 
Respectfully
Alexey Nezhdanov

```

## Alexey Nezhdanov, 2005-07-17 12:33

Subject: Re: "git cvsimport" with branches?
Message-ID: <200507171633.17667.snake@penza-gsm.ru>
URL: https://gitlist.dev/e/200507171633.17667.snake%40penza-gsm.ru
In-Reply-To: <200507171448.09049.snake@penza-gsm.ru>

```
Sunday, 17 July 2005 14:48 Alexey Nezhdanov wrote:
> Sunday, 17 July 2005 13:37 Matthias Urlichs wrote:
> > Hi, Wolfgang Denk wrote:
> > > Is there a way to make "git cvsimport" create branches in git for any
> > > branches it encounters in the CVS repository?
> >
> > That's what it does.
>
> But it does not, at least in some cases.
> See my previous mail:
> http://marc.theaimsgroup.com/?l=git&m=112159075029007&w=2
> It have simple script attached that reproduces the problem.
Ouch. It was all me. I have lost -A flag.
Sorry for noise. 

-- 
Respectfully
Alexey Nezhdanov

```

## Alexey Nezhdanov, 2005-07-17 18:02

Subject: [offtopic]Re: "git cvsimport" with branches?
Message-ID: <200507172202.48642.snake@penza-gsm.ru>
URL: https://gitlist.dev/e/200507172202.48642.snake%40penza-gsm.ru
In-Reply-To: <200507171633.17667.snake@penza-gsm.ru>

```
Sorry for noise again.
I have found two bugs in cvsps that results in the wrong import to git.
I tried to contact developer but it seems that his mail have no mailserver 
ATM. Since he has made some changes for git already - probably someone on 
this list have his new contact. Please tell me it or forward my mail to him. 
Thanks.

For the curious, here are the bugs:
1) some branches fork off too late - cvsps shifts brahches starts forward to 
the future
Example:
http://www.penza-gsm.ru/snake/testscript

2) some branches are not detected at all, not recorded as patchsets and 
consequently not imported into git.
Example (branch "old"):
http://www.penza-gsm.ru/snake/simplexml.py,v


-- 
Respectfully
Alexey Nezhdanov

```
