threads / discuss / 3597

Some more cvsimport

Subject: Some more cvsimport

## tl;dr

3 messages between Mar 8, 2006 and Mar 11, 2006.

replies: 2people: 3as markdown or json

Rajkumar S· Mar 8, 2006, 08:49 UTC · lore
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· Mar 11, 2006, 06:34 UTC · re: Rajkumar S · lore

Re: Some more cvsimport

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· Mar 11, 2006, 07:00 UTC · re: Matthias Urlichs · lore

Re: Some more cvsimport

Matthias Urlichs <smurf@smurf.noris.de> writes:
Show 8 quoted lines
> 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".

← back to recent threads