Loading specific files/folders using the CLI in 2.0
(from work item 83312)
You have to specify the name of the component you wish the load rules to run in. eg:
---
scm load "2.0 Test 1 Team Stream Workspace" -r https://<server>:9443/jazz -L "2.0 Test 1 Team Default Component/loadrules.txt" myComponentName
---
As to your general question: You could use load rules to cherry pick individual files, but you can also use relative paths on the commandline (new in 2.0). If you want the remote hierarchy to be preserved, you can use
---
scm load -r l "Build User WS" Component1/path/to/file Component2/path/To/Dir ...
---
If you want to load everything below the same root, you can call the -t argument:
---
scm load -r l "Build User WS" Component1/path/to/file -t local/parent/
scm load -r l "Build User WS" Component2/path/to/dir -t local/parent/
---
(which would create local/parent/file, as well as local/parent/dir/subtree)
Unfortunately, only one remote path may be specified with the --target/-t syntax, meaning that you're stuck invoking the CLI once for each path. If you think this is worth changing, please raise a work item.
e
I've downloaded the RC2 client and server and installed them. Now I'm trying to test extracting files based on a loadrules file. Here is my loadrules file (loadrules.txt):
versionablename=/2.0 Test 1/dir1/file3.txt
"2.0 Test 1" is the root folder in my component, dir1 a sub-directory, and file3.txt a file. "2.0 Test 1 Team Default Component" is my component name.
Here's what I'm invoking on the command line:
scm load "2.0 Test 1 Team Stream Workspace" -r https://<server>:9443/jazz -L "2.0 Test 1 Team Default Component/loadrules.txt"
Problem running 'load':
When specifying load rules, exactly one component must be provided.
rc=256:
Do I have the correct syntax in the loadrules file to select a single file in the component? And what is the correct syntax for the scm tool command?
My ultimate goal is to be able to extract one or more files from one or more components by creating a loadrules file and calling the scm tool once, passing the loadrules file
. Is this posisble? or do I need to call it multiple times, once for each component, listing only the files to be extracted for that component?
Thanks, Brian
You have to specify the name of the component you wish the load rules to run in. eg:
---
---
As to your general question: You could use load rules to cherry pick individual files, but you can also use relative paths on the commandline (new in 2.0). If you want the remote hierarchy to be preserved, you can use
---
---
If you want to load everything below the same root, you can call the -t argument:
---
scm load -r l "Build User WS" Component1
scm load -r l "Build User WS" Component2
---
(which would create local/parent/file, as well as local/parent/dir/subtree)
Unfortunately, only one remote path may be specified with the --target/-t syntax, meaning that you're stuck invoking the CLI once for each path. If you think this is worth changing, please raise a work item.
e
2 answers
Evan, When I try this, I receive the following:
scm load "2.0 Test 1 Team Stream Workspace" -r https://server:9443/jazz -L "loadrules.txt" "2.0 Test 1 Team Default Component"
Root exception:
com.ibm.team.filesystem.client.FileSystemClientException: Status ERROR: com.ibm.team.filesystem.client code=2 Folders to load overlap other contents null childr
en=
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.reportErrorsAsException(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.handleErrors(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation.notifyDilemmaHandler(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation$2.run(Unknown Source)
at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager$1.run(ResourceSharingManager.java:405)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager.runWithinFileSystemLock(ResourceSharingManager.java:417)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation.execute(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(Unknown Source)
at com.ibm.team.filesystem.cli.client.internal.subcommands.LoadCmd.run(LoadCmd.java:202)
at com.ibm.team.filesystem.cli.client.internal.subcommands.LoadCmdLauncher.run(LoadCmdLauncher.java:161)
at com.ibm.team.filesystem.cli.core.internal.Application.run(Unknown Source)
at com.ibm.team.filesystem.cli.core.internal.Application.doStart(Unknown Source)
at com.ibm.team.filesystem.cli.core.internal.Application.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source)
at org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)
at org.eclipse.equinox.launcher.Main.run(Unknown Source)
Contains: /2.0 Test 1/dir1/file3.txt overlaps 1 other folder(s)
Internal error occurred
com.ibm.team.filesystem.client.FileSystemClientException: Status ERROR: com.ibm.team.filesystem.client code=2 Folders to load overlap other contents null childr
en=
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.reportErrorsAsException(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.handleErrors(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation.notifyDilemmaHandler(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation$2.run(Unknown Source)
at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager$1.run(ResourceSharingManager.java:405)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager.runWithinFileSystemLock(ResourceSharingManager.java:417)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation.execute(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(Unknown Source)
at com.ibm.team.filesystem.cli.client.internal.subcommands.LoadCmd.run(LoadCmd.java:202)
at com.ibm.team.filesystem.cli.client.internal.subcommands.LoadCmdLauncher.run(LoadCmdLauncher.java:161)
at com.ibm.team.filesystem.cli.core.internal.Application.run(Unknown Source)
at com.ibm.team.filesystem.cli.core.internal.Application.doStart(Unknown Source)
at com.ibm.team.filesystem.cli.core.internal.Application.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source)
at org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)
at org.eclipse.equinox.launcher.Main.run(Unknown Source)
Contains: /2.0 Test 1/dir1/file3.txt overlaps 1 other folder(s)
Child message: Folders to load overlap other contents
Child message: /2.0 Test 1/dir1/file3.txt overlaps 1 other folder(s)
Problem running 'load':
Internal error occurred
rc=1792:
What does this mean?
Thanks, Brian
scm load "2.0 Test 1 Team Stream Workspace" -r https://server:9443/jazz -L "loadrules.txt" "2.0 Test 1 Team Default Component"
Root exception:
com.ibm.team.filesystem.client.FileSystemClientException: Status ERROR: com.ibm.team.filesystem.client code=2 Folders to load overlap other contents null childr
en=
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.reportErrorsAsException(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.handleErrors(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation.notifyDilemmaHandler(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation$2.run(Unknown Source)
at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager$1.run(ResourceSharingManager.java:405)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager.runWithinFileSystemLock(ResourceSharingManager.java:417)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation.execute(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(Unknown Source)
at com.ibm.team.filesystem.cli.client.internal.subcommands.LoadCmd.run(LoadCmd.java:202)
at com.ibm.team.filesystem.cli.client.internal.subcommands.LoadCmdLauncher.run(LoadCmdLauncher.java:161)
at com.ibm.team.filesystem.cli.core.internal.Application.run(Unknown Source)
at com.ibm.team.filesystem.cli.core.internal.Application.doStart(Unknown Source)
at com.ibm.team.filesystem.cli.core.internal.Application.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source)
at org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)
at org.eclipse.equinox.launcher.Main.run(Unknown Source)
Contains: /2.0 Test 1/dir1/file3.txt overlaps 1 other folder(s)
Internal error occurred
com.ibm.team.filesystem.client.FileSystemClientException: Status ERROR: com.ibm.team.filesystem.client code=2 Folders to load overlap other contents null childr
en=
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.reportErrorsAsException(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.handleErrors(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation.notifyDilemmaHandler(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation$2.run(Unknown Source)
at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager$1.run(ResourceSharingManager.java:405)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager.runWithinFileSystemLock(ResourceSharingManager.java:417)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.LoadOperation.execute(Unknown Source)
at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(Unknown Source)
at com.ibm.team.filesystem.cli.client.internal.subcommands.LoadCmd.run(LoadCmd.java:202)
at com.ibm.team.filesystem.cli.client.internal.subcommands.LoadCmdLauncher.run(LoadCmdLauncher.java:161)
at com.ibm.team.filesystem.cli.core.internal.Application.run(Unknown Source)
at com.ibm.team.filesystem.cli.core.internal.Application.doStart(Unknown Source)
at com.ibm.team.filesystem.cli.core.internal.Application.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source)
at org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)
at org.eclipse.equinox.launcher.Main.run(Unknown Source)
Contains: /2.0 Test 1/dir1/file3.txt overlaps 1 other folder(s)
Child message: Folders to load overlap other contents
Child message: /2.0 Test 1/dir1/file3.txt overlaps 1 other folder(s)
Problem running 'load':
Internal error occurred
rc=1792:
What does this mean?
Thanks, Brian
It looks like you already have the requested item(s) loaded in your sandbox.
(I've submitted bug 84984)
e
(I've submitted bug 84984)
e