Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

I've written a first attempt (tagCtn.py) which seems to operate as intended, but so far has only been tested in a dummy mode where it only says what it will do without actually creating or modifying any tags in CVS.

...

No Format
#a comment
// another sort of comment

 facilities facilities-02-19-02

 xmlUtil xmlUtil-03-04-01

and here is output from when it was used as the value for upgrade_list:

No Format
$ python tagCtn.py ScienceTools --new=HEAD
tagCtn was invoked with argument ScienceTools and options
parent= HEAD
new= HEAD
upgrade_list= upgrade.txt
for_real= False
verbose= False

about to issue command
cvs rlog -b ScienceTools-scons/SConstruct
lastHeadTag is: ScienceTools-HEAD-1-823

about to issue command
cvs rtag -r ScienceTools-HEAD-1-823 ScienceTools-tmphead824 ScienceTools-scons
Just fooling; it wasn't for real

about to issue command
cvs rtag -d ScienceTools-tmphead824 facilities
Just fooling; it wasn't for real

about to issue command
cvs rtag -r facilities-02-19-02 ScienceTools-tmphead824 facilities
Just fooling; it wasn't for real

about to issue command
cvs rtag -r xmlUtil-03-04-01 ScienceTools-tmphead824 xmlUtil
Just fooling; it wasn't for real

about to issue command
cvs rtag -r ScienceTools-tmphead824 HEAD-1-824 ScienceTools-scons
Just fooling; it wasn't for real

about to issue command
cvs rtag -d ScienceTools-tmphead824 ScienceTools-scons
Just fooling; it wasn't for real

If the value of for_real had been True, the cvs commands appearing in the output all would have been executed.  Since it was False for this run, the only cvs command which actually was executed was the first one (cvs rlog ..) since it's a read-only command which does not affect the repository.

The overall strategy in the make-new-HEAD case shown above is

  • make a temporary tag which is identical to the most recent HEAD tag
  • if a package is to be added, issue a cvs rtag command to tag it with the temp tag
  • if a package is to be updated, first remove the temp tag from the module, then add it to the specifed package tag version.
  • make a new tag with the official name (next HEAD) from the temp tag; remove the temp tag

The function to make a release tag from HEAD is much simpler: just issue a cvs command to make the new specified tag from all files bearing the latest HEAD tag.

Still To Do

  • test adequately
  • add ability to make release tags along a branch
  • add as output a file which lists all the packages and their tags belonging to the new tag just created.  The file probably should go at the top level (e.g., in the ScienceTools-scons directory).  One possibility in the new-HEAD case is to create it (information would come from parsing output of a suitable cvs rlog command or commands) after the temp. tag has been made, submit to CVS, move temp tag to the new version, then make the final new HEAD tag. However, if we plan to also support tag collecting from RMViewer, it would have to go through a similar procedure.