How do I revert a big change in CVS?

前端 未结 10 562
离开以前
离开以前 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: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...

提交回复
热议问题