Savannah Administration - News: Synchronizing your working copy with the restore repository
Synchronizing your working copy with the restored repository
Item posted by Sylvain Beucler <Beuc> on Fri 16 Mar 2007 12:10:28 AM UTC.
You may be in the situation where you have changes in your CVS working copy that are not committed in the restored Savannah repository anymore. strk suggested the following procedure:
- Get a fresh cvs export from the repository (call it fresh-export)
- Turn your latest working copy into "export" form (remove everything should not be fetched by an export - see below)
- diff -ur fresh-export/ latest-working-copy/ > changes.diff
- Check the diff, if it contains more then it should, goto (2)
- Get a fresh cvs checkout (call it fresh-checkout)
- Apply the diff obtained in step (3) to fresh-checkout/ (with patch)
- 'cvs add' the new stuff (list the new files with "cvs -n update")
- Build & test patched fresh-checkout/
- Cross fingers
- Commit
- Checkout the whole project again, build&test
Note about step (2), or how to turn your latest working copy into "export" form:
$ cd latest-working-copy
# Remove CVS/ and compiled files:
$ find . -name "CVS" | xargs rm -Rf # CVS *dirs*
$ find . -name '.#*' | xargs rm # backup copies
$ make clean distclean
$ find . -name 'Makefile' | xargs rm # if autoconf
$ find . -name 'Makefile.in' | xargs rm # if automake
$ rm -Rf configure autom4te.cache aclocal.m4 # generated stuff
Note: if you perform a 'cvs update' in your working copy, CVS will "go back in time" and revert to the repository version, possibly losing your uncommited changes.
Powered by Savane 3.14-8aba.
Corresponding source code