Re: Command line alternative to the "Save revision as.."feature in History
"Glen Starrett" <glen.starrett-qn/[email protected]> Thu, 20 Jan 2011 03:43:58 +1100
| Newsgroups | gmane.comp.version-control.cvs.tortoisecvs.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Hanaa, The "save as" command in Tortoise is a big time saver for me -- one of those things that I go back to the GUI from a CLI just to do because it's so much more convenient from TCVS than CLI. Command line equivalent of what Tortoise is doing can be figured form the command dialogs. It is: -- Creating a temp directory -- Checkout the single file you want (e.g. cvs -d ... co -r REV PATH/TO/FILE) -- rename and move file to your original sandbox -- Cleanup the temp directory Assuming you mean "cvs up -r REV FILENAME" then it would overwrite your sandbox file with the version specified. If you did "cvs co -p -r REV FILENAME" then it's going to dump it to STDOUT and might get mashed. Better to do the temp directory method, or something like this: -- CD to sandbox PATH/TO -- Rename existing sandbox FILE to FILE.0 -- "cvs up -r REV FILE" -- Rename FILE to new name -- "cvs up -C FILE" (to clear the sticky tag - have to use other syntax if you're in a branch/other tag) -- del FILE -- Rename FILE.0 back to FILE Doesn't use all the temp directories, but still more cumbersome than TCVS. Could always write a script to handle that at the CLI if you're doing it often, or purchase CVS Suite and put in a request to the support team. Our new product features are largely driven from customer requests. It sounds like for the 'unix sandbox', you're using the old (deprecated) switch that only works for /that individual/ command (TCVS does this with a preference setting). There's a file expansion option that will let you check out the file with UNIX line endings that you should use instead. See the kopt "L". CLI help for this at "cvs up -k?". Regards, Glen Starrett Technical Account Manager, North America March Hare Software, LLC http://march-hare.com/cvspro/ <http://march-hare.com/cvspro/> 800-653-1501 x803 From: Hanaa Musa [mailto:[email protected]] Sent: Wednesday, January 19, 2011 6:49 AM To: tortoisecvs-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Subject: [TortoiseCVS] Command line alternative to the "Save revision as.."feature in History Hello, I need to retrieve all older revisions of a binary file. The "Save revision as" option is exactly what I want. Is there a cmmand line alternative for that? I googled for a whole day, all I saw was this command cvs -p -r <revision-number> <filename> And then pipe it to another file. Not only do I get a bad new file, it also corrupts the original file in my checkout. Can anyone please shed light on why this happened? When I first tried the GUI, save revision as option, I saw the same error, and I had to set the Sandbox type to UNIX in CVS preferences. So my questions are : 1) What is the command line alternative for the "Save revision as" option we see in CVS history. 2) Does not the sandbox type setting apply to command line as well? If not, how can I get the same setting while running commands? 3) Why is the update command corrupting the original file too? Thanks a lot, Hana. ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ tortoisecvs-users mailing list tortoisecvs-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/tortoisecvs-users