Search code examples
plasticscm

Apply local move using 'cm'


Using the PlasticSCM command line cm tool how do I "apply" a local move detected by cm status --localmoved?

By "apply" I mean "change the items status from localmoved to moved so that a subsequent cm ci -c "moved some files" will commit the move.

Things I've tried:

  • cm co newfile which complains that the file is private.
  • cm co oldfile which complains that the file does not exist.
  • cm add newfile which "breaks" the move and turns it into an add and a local delete.
  • cm mv oldfile newfile which complains that the file does not exist.

Solution

  • Unfortunately there is not a command line option to apply a local moved, but there is a hacker option in the move command that could help here:

    cm mv src dst --nomoveondisk
    

    This switch just move the file in the source control, but not on disk. Then your item should appear as moved. Hope it helps.

    Update

    If you want to checkin that changes, you might use the documented option --applychanges in the checkin command:

    cm ci --all --applychanged
    

    This option will apply local changes first, and then will checkin changes to Plastic SCM server.