It's all about the answers!

Ask a question

Equivalent of "svn update" using command line?

Ryan Kersh (736) | asked Sep 13 '12, 2:07 p.m.
I'm more familiar with Subversion than I am with RTC at this point.  What's the equivalent command to "svn update" using the scm command line tool?

To be specific, with Subversion, if I have a "working copy" and I delete a file (a local delete not a "svn rm") and then I do a "svn update", it will not only update my working copy with any changes that have been made to the server-side repository, but it will also bring back that file that I deleted.

Using scm, if I load a workspace and then locally delete a file in the workspace (without checking it in), what do I do to accomplish the same thing that was done with Subversion above?

My guess is that I'd have to do a "scm status" to see what's missing, then do a "scm undo" on the exact file, and then do a "scm accept".  This seems pretty laborious....  Is there a better way?

We depend on the "svn update" functionality on our continuous integration server, not to say that it can't be scripted a different way, but I'd like to try to reproduce the functionality as close as I can.

Accepted answer

permanent link
Takehiko Amano (1.3k3741) | answered Sep 13 '12, 8:55 p.m.
How about "force options (-f) in load" ?  For example, if I want to recover Sample folder in ROOT component, run like:

%lscm load -f -r BUILD ROOT/Sample

Note, edited files will be overridden.

Ryan Kersh selected this answer as the correct answer

Ryan Kersh commented Sep 14 '12, 11:41 a.m.

This solution crossed my mind. The problem is that this would also incur the cost of pulling down everything else in the Sample folder too, wouldn't it? It also requires that you know what to pull down (i.e., the Sample folder). Perhaps, this is as close as we get to the Subversion functionality using RTC....

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.