info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: help, doing a CVS import messed up my working dir!?!?!


From: Dave Korn
Subject: RE: help, doing a CVS import messed up my working dir!?!?!
Date: Mon, 22 Aug 2005 18:58:34 +0100

----Original Message----
>From: Mark D. Baushke
>Sent: 22 August 2005 18:37

> Yes, but the VENDOR branch is the default main trunk until such time as
> you introduce local changes. 

  That's the clue I was missing!  I never knew a branch could be mainline!

> When a new RCS file is created outside of the VENDOR branch, 1.1 is the
> first version and the RCS head is 1.1 and there is no 'branch' directive.
> 
> When a new RCS file is created using cvs import, the first version is
> 1.1 as it is always needed, but it is never really used. The 1.1.1.1 is
> created as an exact copy of 1.1, the head is 1.1 but a 'branch 1.1.1' is
> added to the file. This means that any checkout will pick the 1.1.1.x
> version for the largest value of x that is not in the dead state.
> 
> A 'cvs commit' of a change to the main trunk of an imported file will
> create version 1.2 as head and remove the 'branch 1.1.1' indication.

  <sound of pennies dropping, lightbulbs pinging, dawn breaking, one hand
clapping etc.>

  So I guess what I really want (in order to make the whole procedure work
the way I was previously expecting it to) is to use "cvs ci -f" after my
very first import; that way, all the files will have the "branch" tag
removed and r1.1 will be the main line from then on, and when I do imports
later they will generate deltas on the branch but none of my MAIN/HEAD tags
will be dragged over to the branch, so the two trunks will stay separate
until I run a merge-and-commit on the main trunk.  Hooray!

> CVS complained because it saw that the main trun was not using branch
> 1.1.1 and knows that you must merge the differences of the
> 1.1.1.1->1.1.1.2 into the main trunk in order to have a consistent main
> trunk. 

  Yep, this makes sense now.  (Apart from it not making any sense to _me_
why anyone would want to implement it that way, but that's just a matter of
taste, of which there is no disputing....!)

  So, hmmm, if I wanted to patch CVS to avoid this, would it work to do
something like adding an option flag that tells the client to tell the
server to not add the "branch" directive when creating the new RCS files on
a first import?  (It might also need to prevent the server from _adding_ a
branch directive on a subsequent import - if it ever does that when there's
no existing directive in the RCS file and no revisions past 1.1 on mainline
- mightn't it?)

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....





reply via email to

[Prev in Thread] Current Thread [Next in Thread]