How do I revert a big change in CVS?

前端 未结 10 545
离开以前
离开以前 2021-02-01 16:49

One of my colleagues has totally messed up the contents of a directory in our main CVS repository. I need to just revert the whole module to the state it was in at the end of l

相关标签:
10条回答
  • 2021-02-01 17:18

    You could look into cvsps. Google it.

    Also, with quilt (or Andrew Morton's patchscripts, which is what quilt started out as) and cvsps, a very close approximation of changesets can be had.

    see http://geocities.com/smcameron/cvs_changesets.html

    0 讨论(0)
  • 2021-02-01 17:21

    I believe your second command should also be a checkout, rather than an update. I can't justify this with logic, since there is no logic in the world of CVS, but it has worked for me. Try this:

    cvs co -P modulename
    cvs co -P -jHEAD -jMAIN:2008-12-30 modulename
    

    If you're reverting a branch other than HEAD, e.g. X, pass the -rX argument in both commands:

    cvs co -P -rX modulename
    cvs co -P -rX -jHEAD -jMAIN:2008-12-30 modulename
    
    0 讨论(0)
  • 2021-02-01 17:21

    Big problem, don't have full answer, just a tip on your scripting to deal with spaces in file names.

    Instead of

    find ... | xargs tar c - | ...
    

    try putting

    find ... | perl -e '@names = <>;' -e 'chomp @names;' -e 'system( "tar", "c", "-", @names);' | ...
    

    that way, your archive creation (or similar operations) won't suffer from spaces in the names, the shell argv parsing gets skipped before tar is called.

    One more thing, on the off chance it actually works: if there is a CVS to SVN utility, use it (I am assuming such a utility would pull deleted files from the "CVS attic"), and if it saves each moment in time as a project level checkpoint (since SVN does that, unlike CVS), use SVN to fetch the right moment in time. Lot of ifs...

    0 讨论(0)
  • 2021-02-01 17:26

    According to http://www.astro.ku.dk/~aake/MHD/docs/CVS.html, the following is what you need:

    cvs update -D "30 Dec 2008 23:59"
    
    0 讨论(0)
提交回复
热议问题