[Top][All Lists]

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

Re: have finished reading howev

From: Stuart Cooper
Subject: Re: have finished reading however, ..
Date: Tue, 31 May 2005 12:37:28 +1000

Hi Alex,

> My reading comprehension of it must be < 100%, because
> when I tried the following,
> 1. edit hello.c, add some experimental stuff
> 2. do a cvs commit of above, it tells me version is now 1.2 from 1.1
> 3. I revert back to non-experimental version of hello.c like so,
> cvs update -r 1.1 hello.c

You've got a concept of "experimental", CVS hasn't. From the point
of view of CVS, 1.1 and 1.2 are both good versions.

If you want to get heavily into experimental and stable you'll need
to look into branching.
> 4. put some normal non-experimental stuff into hello.c
> 5. *attempt* to check in, expecting to get 1.3 of hello.c:
> $ cvs ci -m"sendersname" hello.c
> Instead I get,
> cvs server: sticky tag `1.2' <--may have said 1.1 I'm not sure
>  for file `hello.c' is not a branch
>  cvs [server aborted]: correct above errors first!
> when I try to make it happy by removing sticky tag like so,
> cvs update -A hello.c
> it messes up my working copy of hello.c! 

Yes, update -A brings your working version into line with the head of
the repository,
making hello.c the latest 1.2 again.

> Lucky I made a backup of it,
> so I was able to
> cp hello.c.orig hello.c
> and
> cvs ci -m"blah" hello.c
> Which it then accepted.
> Question is, what would have been the "correct" way to handle the
> above situation?
How you ended up doing it was quite correct. The other way of doing this would
be the two -j cvs update trick, something like

cvs update -j 1.2 -j 1.1 hello.c
which reads "merge the differences from 1.2 to 1.1 into my hello.c"

(the order of the -j flags is important, you like the 1.1 version +
your new changes
so you're putting the 1.2 -> 1.1 changes and then into your working hello.c).

but this is a bit tricky, so making copies, doing cvs update -A and
then moving the
copies over and then checking in is perfectly acceptable.

Have fun,

reply via email to

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