From: Grzegorz J. <ja...@he...> - 2003-03-15 14:09:51
|
Alexandre Tolmos writes: > I'm not expert at using Cvs and I see no command to do a rollback; can > you help? Wow, it is harder that I thougt (or maybe I am missing something). This is what I came up with: (1) Check out working copy cvs co opencxx cd opencxx [sticky tag: none, sticky date: none] (2) Use 'cvs log' on one of files that need rollback to find out to what date you want to roll back. [sticky tag: none, sticky date: none] (3) Go back to the rollback date, e.g. cvs update -D'2003/03/15 12:07:26 UTC' WARNING: Remember to specify "UTC". 'cvs status' give you times in UTC, but other commands accept date in your local time, unless you specify UTC. [sticky tag: none, sticky date: 2003.03.15.12.07.26] (3) Tag the rollback point: cvs tag sandbox_USERID_rollback_point [sticky tag: none, sticky date: 2003.03.15.12.07.26] (4) Get head revision in your working dir cvs update -A [sticky tag: none, sticky date: none] (5) Branch out a sandbox cvs tag -b sandbox_USERID_rollback_result [sticky tag: none, sticky date: none] (6) Switch to sandbox cvs update -r sandbox_USERID_rollback_result [sticky tag: sandbox_USERID_rollback_result, sticky date: none] (7) Merge reversed changes from rollback point to rollback result into rollback_result branch cvs update \ -jsandbox_USERID_rollback_result \ -jsandbox_USERID_rollback_point WARNING: Order of '-j' options is essential! [sticky tag: sandbox_USERID_rollback_result, sticky date: none] (8) Commit rolled-back version to your sandbox branch cvs commit [sticky tag: sandbox_USERID_rollback_result, sticky date: none] (9) Test branch 'sandbox_USERID_rollback_result' or verify by other means, that you have correct, compilable version in working dir If you discover, that you rolled back to wrong date: (9.1) remove tags cvs tag -d sandbox_USERID_rollback_point cvs tag -d sandbox_USERID_rollback_result (9.2) goto (1) and figure out proper date (10) Update your working directory to head revision cvs update -A [sticky tag: none, sticky date: none] (11) Merge the difference between rolled-back revision and head into head cvs update -jsandbox_USERID_rollback_result [sticky tag: none, sticky date: none] (12) Commit your changes cvs commit -m 'rollback to 2003/03/15 12:07:26' If you get "up-do-date check failed" it means that someone is checking something at the same time. Use webcvs or 'cvs status' to find out who is it and contact him/her, because your rollback will rollback his/her changes. [sticky tag: none, sticky date: none] (13) Rollback is complete, clean up (remove tags): cvs rtag -d sandbox_USERID_rollback_point opencxx cvs rtag -d sandbox_USERID_rollback_result opencxx REMARKS: It is possible to add a script to CVS which after each commit tries to build and test in order to tag the last correct revision. Then rollback procedure can be made into a script, because one does not have to figure out the date and later verify if the rollback point is correct. Best regards Grzegorz PS: I will put the above procedure on the website, once we have one (hopefully soon). PPS: As for STL --- I know that there are problems, but this can be eventually worked out. Possibly some code in 'exp_templates' branch can be merged into main trunk to fix it. I would suggest that we focus on MacOS X port first, and once it works, we can move to your problems with STL, step by step (as we already succesfully did with gcc-3.1 compatibility). G. |