cvs rollback #basics

cvs -q update -D “2017-07-29” # will remove any file that’s “not in the universe” at that moment in history

The date means beginning of the day in GMT.  Here’s the more precise form:

cvs -q up -D “2017-07-29 00:00:01 GMT”

cvs -q up -D ‘2017/09/15 19:54:25 GMT’ # GMT make a difference. Default is … surprise.

–To verify the rollback

  • cvs log # is confusing and shows commits after the snapshot!
  • cvs stat path/to/file # shows the sticky tag

–To check the commits between two dates:

cvs diff -N -b -D “2017-10-20 22:00:00 GMT” -D “2017-10-20 23:00:00 GMT”

cvs update/checkout a file or dir

–retrieve an old version without sticky

cvs up -p -r1.17 CTFXdpIntgPlugin.C> CTFXdpIntgPlugin.C.1.17

–cvs update a dir or file:

cvs update –dA package/aida/common/script Bring working dir specified up to date with the repository (merge changes made to the repository into the local files).
cvs update –A package/aida/common/script/MakefileAida.sun4
Bring just the named file up-to-date with the repository

–cvs checkout a dir or file:

cvs checkout edu Checks out everything under edu, placing an edu directory, plus all subordinate subdirectories, in the working dir.
cvs checkout app/alh Checks out everything under app/alh placing an app directory in your working directory, but only the alh subdirectory of app.
cvs co package/aida/common/script/MakefileAida.sun4
Checks out only the single file MakefileAida.sun4, creating package/aida/common/script/MakefileAida.sun4 in the working directory, containing that one file.

cvsignore troubleshoot`

gitignore  can be investigated. Git can tell you why a particular file is ignore. CVS doesn’t support that instrumentation.

If you need to confirm a file is explicitly ignored, then you can put a single “!” in ~/.cvsignore (as described in the official manual) to clear the ignore list.

cvs cheatsheet

–top 10 how-to

  1. list modified files — 2 choices
    1. cvs -qn up # shows both untracked and uncommitted
    2. cvs status |grep # doesn’t offer a quick glance
  2. list untracked files in the current dir (git clean -fxd) —
    1. cvs -qn up | grep ‘^?’  # listing only
  3. cvs (git reset –hard)
    1. cvs up -C the/file
  4. checkout a single dir/file. First, cd into the parent dir , then 2 choices
    1. cvs up -d missingDir
    2. cvs co tp/plugins/xtap/missingDir # no leading slash. See http://www.slac.stanford.edu/grp/cd/soft/cvs/cvs_cheatsheet.html for explanation

–Tier 2 (Still useful):

  • cvs -H any command
  • the -l option: -l Local; run only in top of current working directory, rather than recursing through subdirectories. Available with the following commands: checkout, diff, log, status, tag, update..