1

I know that I can use the CLI command si viewrevision to get the content of a versioned file. Downside is that this file must not be dropped.

Does anyone know a way (other than addfromarchive) to get the content when knowing the archive?

VeikkoW
  • 817
  • 7
  • 12
  • Just tried using `projectco` w/o luck. If the member is dropped, you need to know the last checkpoint when the member still existed – VeikkoW Aug 26 '14 at 10:48

2 Answers2

1

I don't believe this is possible

si projectco is documented as "checks out members of a project into working files". If you drop the member from the project, it is no longer part of the project.

At first blush, si viewrevision doesn't explicitly state in the documentation that it requires a project, but if you try to run the command without a project (or a sandbox, which implies a project), you will be prompted for one. Failing to provide one at the prompt exits the command with the message 'A value for "--project" is required.' I tried doing this specifying a change package ID which the member was part of, and that still doesn't work.

Your si addfromarchive option is the only published way to do this.

Disclosure: I am a PTC employee.

mlizak__PTC
  • 301
  • 1
  • 7
0

Why not use add from archive?

You could also use a temporary server location (S:/Server/prj_tmp/project.pj) as destination and the member will stay dropped in the original project.

(Ok, ok, someone could create a sandbox from S:/Server/prj_tmp/project.pj and generate new versions in the archive of the dropped member, ad/delete labels ...)

There might be another possibility if your project has a checkpoint where the file was not yet dropped.

Just create a build sandbox with the project revision of that checkpoint and then:

C:\BuildSandboxes\prjA\src> si viewrevision .....  :)

.

You might also use something like

C:\Sandboxes\prjA\src> si configuresubproject --subprojectRevision=1.2 --type=build project.pj

view your revision and then go back with

C:\Sandboxes\prjA\src> si configuresubproject --type=default project.pj

but this might affect user that are currently working on the project. (eg. they would not be able to check in while the subproject is configured as build)

grenix
  • 623
  • 7
  • 15