info-cvs
[Top][All Lists]
Advanced

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

Re: How to go back to the branch after mistakenly switching to the trunk


From: Mark D. Baushke
Subject: Re: How to go back to the branch after mistakenly switching to the trunk
Date: Sun, 11 Sep 2005 07:34:46 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ming Kin Lai <address@hidden> writes:

> >Ming Kin Lai writes:
> >
> > > I did not read carefully the documentation on "cvs commit -r REV" and
> > > made a mistake by committing a revision with a specified REV number on
> > > a branch.
> >
> >Mark D. Baushke writes:
> >
> >Yeah, you should NEVER subvert internal cvs revision numbers unless you
> >are an expert... and then, you should know better than to do it.
> 
> I feel I am misled by the cederqvist. On one
> hand, in Section A.10.2.1 of the 1.12.12 manual,
> it says "You can commit to a branch revision
> with the -r option." On the other hand, in
> Section A.10.1 under "-r revision" it says "You
> cannot commit to a specific revision on a
> branch." 

English is subtle and it is perhaps possible that
better wording could be arranged.

You will never be able to commit to a specific
revision that already exists.

You will never be able to commit to a specific
revision that would require a new branch point
be generated.

> Do I misunderstand it or is this a very serious
> bug in the cederqvist?

I do not believe I would categorize this as a
'very serious' bug, at most it is not as
informative as some readers would desire.

Given the command 'cvs commit -r<value> filename' 

  - if <value> is a symbolic name, then that name
    must be the name of a branch that exists in
    the file to allow the commit to proceed.

  - if <value> is a symbolic name that is a not
    found in the file or that is a tag on a
    particular revision that exists in the file,
    then the commit will fail.

Of course, cvs allows you to play with dangerious
toys, so <value> may be a string comprised of
digits and dots. Doing this is NOT recommended...

  - if <value> is a numeric form, then it may be a
    revision number for a revision that does not
    yet exist on its current branch. 

    For example, if the checked out filename is
    revision 1.12 (and also happens to be the HEAD
    of the main trunk), then <value> could be 1.13
    or greater. In general, if you are on a
    branch, you may specify the numeric branch
    prefix of your branch and vary the final
    number with a value that is not presently
    represented in the delta information for the
    filename.

  - if <value> is a numeric form, then it may be
    an unnamed numeric branch revision for which a
    branch point may be created.

    For example, if the checked out filename is
    revision 1.12 (regardless if it is the head of
    the main trunk) AND there is no 1.12.1 branch,
    you could use a <value> of 1.12.1 to create a
    new 1.12.1.1 revision.

    However, it is not possible to use a <value>
    of 1.12.1.1 to create the same revision (which
    is what the documentation was trying to tell
    you under A.10.1).

    You will note that CVS normally is not able to
    create such a revision as all of its branches
    are normally based on even numbers. However,
    it is not generally possible to specify an
    arbitrary branch number, you must choose one
    for which RCS may generate a branch point by
    its rules.

If anyone has a suggested change for the
documentation to make it easier to understand,
please send a patch to address@hidden

        -- Mark


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFDJECGCg7APGsDnFERAtDeAJ4g2Nv91pWJESEPSvnFkhqtWoYRsACfacpL
zYeHWx4kbmWUP5LABJcvTMQ=
=F3ej
-----END PGP SIGNATURE-----




reply via email to

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