Skip to contentSkip to conversation

Some more cvsimport

DISCUSSION Rajkumar S 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore

Rajkumar S

author
#0 lore raw

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

#1 lore raw
Quoted 4 lines · Rajkumar S

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. ;-)

Signature · 1 line
Matthias Urlichs
#2 lore raw
Quoted 8 lines · Matthias Urlichs
Quoted 4 lines · Rajkumar S

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