# Some more cvsimport

3 messages from 2006-03-08 to 2006-03-11. Participants: Rajkumar S, Matthias Urlichs, Junio C Hamano.
Thread: https://gitlist.dev/t/3597

## Rajkumar S, 2006-03-08 08:49

Subject: Some more cvsimport
Message-ID: <440E9AA8.2020605@asianetindia.com>
URL: https://gitlist.dev/e/440E9AA8.2020605%40asianetindia.com

```
Hi all,

Thanks every one for replying to my previous mails and to Smurf for his helpful replies 
and patch.

The cvs project I am trying to track has 2 branchs. One head and another for releng_1. The 
upstream cvs tree gets updated on both branchs. I also make modifications to both. When I 
normally do cvsimport, the releng_1 tree gets updated automatically, but if I have checked 
out the releng_1 branch in my local git repository when cvsimport happens the files do not 
get updated.  I can fix this by checking out the master branch just before cvsimport and 
then switching back.

I am attaching a test script to simulate the problem and the fix is commented out.

raj

```

## Matthias Urlichs, 2006-03-11 06:34

Subject: Re: Some more cvsimport
Message-ID: <pan.2006.03.11.06.34.26.200002@smurf.noris.de>
URL: https://gitlist.dev/e/pan.2006.03.11.06.34.26.200002%40smurf.noris.de
In-Reply-To: <440E9AA8.2020605@asianetindia.com>

```
Hi, Rajkumar S wrote:

> When I normally do cvsimport, the releng_1
> tree gets updated automatically, but if I have checked out the releng_1
> branch in my local git repository when cvsimport happens the files do not
> get updated.

Don't Do That.

I just removed the "update checked-out tree" logic because it has too many
corner cases.

I could conceivably add a check for HEAD pointing to the CVS branch I'm
just checking out, but on second thought I'd rather wait for the
refs/remotes/ work to show up, and then simply s/heads/remotes/g. ;-)

-- 
Matthias Urlichs

```

## Junio C Hamano, 2006-03-11 07:00

Subject: Re: Some more cvsimport
Message-ID: <7vacbxxy7h.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vacbxxy7h.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <pan.2006.03.11.06.34.26.200002@smurf.noris.de>

```
Matthias Urlichs <smurf@smurf.noris.de> writes:

> Hi, Rajkumar S wrote:
>
>> When I normally do cvsimport, the releng_1
>> tree gets updated automatically, but if I have checked out the releng_1
>> branch in my local git repository when cvsimport happens the files do not
>> get updated.
>
> Don't Do That.

I tend to agree with this.

Think of foreign SCM imports, especially the ones that do not
use working tree files, just like tracking foreign branch heads
using "git fetch".  You do not fetch into the current branch,
nor you check out and do your work tracking branch.  You use
them to keep track of other people's work, and if you want to
use it you pull that into your branch, typically but not
necessarily "master".

```
