Jump to content

Is there any way to clone only particular folder/files in the plastic SCM instead of entire branch?

Rohit kethwas

Recommended Posts

Hi, You can use the following command to download individual files:

C:\Users\albaz>cm getfile --help
Downloads the content of a given revision.


    cm getfile | cat <revspec> [--file=<output_file>] [--debug]
                     [--symlink] [--raw]

    revspec           Object specification. (Use 'cm help objectspec' to learn
                      more about specs.)


    --file            File to save the output. By default, it is printed on the
                      standard output.
    --debug           When a directory specification is used, the command
                      shows all the items in the directory, its revision id
                      and file system protection.
    --symlink         Applies the operation to the symlink and not to the
    --raw             Displays the raw data of the file.


    cm cat myfile.txt#br:/main
    (Obtains the last revision in branch 'br:/main' of 'myfile.txt'.)

    cm getfile myfile.txt#cs:3 --file=tmp.txt
    (Obtains the changeset 3 of 'myfile.txt' and write it to file 'tmp.txt'.)

    cm cat serverpath:/src/foo.c#br:/main/task003@myrepo
    (Obtains the contents of '/src/foo.c' at the last changeset of branch
    '/main/task003' in repository 'myrepo'.)

    cm cat revid:1230@rep:myrep@repserver:myserver:8084
    (Obtains the revision with id 1230.)

    cm getfile rev:info\ --debug
    (Obtains all revisions in the 'info' directory.)

You can use Gluon to configure a Plastic workspace and select the specific files you want to download.




  • Like 1
Link to comment
Share on other sites

Hi ,

I have ran this cmd:

cm cat testing\#br:"/main"

where testing is the folder that I want to clone from main branch,
when I am running the cmd, it is printing the content of the "testing" folder on the console  but not downloading the content.

Any suggestion?


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...