Jump to content

Get files from a specific branch\label without a workspace


Rami

Recommended Posts

Hi,

We are using Hudson in our build server and with version 3 we wrote a script that updated the selector according to the desired build parameters (label\branch name, which folder to fetch from each repository etc.) but with version 4 we are unable to do that since there is no longer support for the mount directive.

For some of our products, we use various folders from multiple repositories. We are trying to make it work using xlinks but it seems difficult.

What we essentially need is a way to pull certain folders from a repository without a workspace (since we are not going to 'checkin' changes.

Something in the lines of:

cm getfile <repository> <branch\label> <folder root> <target_path>

Like

cm getfile repo@server:8087 v1.25 \project1 e:\build\project1

Link to comment
Share on other sites

Hello Rami,

I'm afraid that until the "configurable workspaces" feature is ready what you want to do is not doable.

You can get a file revision and download it using the "cm cat" command but it's not going to download directories.

Link to comment
Share on other sites

  • 3 years later...

You can get a file revision and download it using the "cm cat" command but it's not going to download directories.

 

How can I accomplish this without a working copy? I want to download a file with arbitrary version using this command from anywhere.

Link to comment
Share on other sites

Hi!

 

you can do it as follows: 

X = cm ls --tree=52@Quake@tardis:8087 QW/clean.bat --format={revid}

cm cat revid:X@Quake@tardis:8087

At the example above I'm running the "cm ls" command for the "QW/clean.bat" file, that is going to give me the internal revision id that is later used for the "cm cat" command.

 

If you need to change the version of the "QW/clean.bat" file you just need to change the changeset number at the "cm ls" command, it's the one used for --tree parameter. The example is getting the version of the file loaded at the "52" changeset,

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...