Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hello,
when calling si viewproject -R, all members and sub-projects are shown with indentation. Now I'm using --fields=memberarchive to get the entire path of the member instead of indetation, but this does not work for sub-projects. Is it possible to recursively Show all sub-projects with full path names and the Information whether and how it's shared?
Kind regards,
CHristian
I haven't found a way to do this yet with viewproject. It would be a very helpful idea.
The closest you can come is using a sandbox - viewsandbox does give the full path to the subproject files. You could then replace the sandbox path with the project path to get the correct subproject path.
Any shared subproject will show as with "shared" , but the subproject of the shared subproject don't have this indicator (unless they are also shared)
However, if the subproject is moved, then there's no way to see this, unless you look at the member archive locations.
You can get a list of just subprojects by adding a filter that will not return any members, for example "--filter=file:onlysubs"
For example:
Viewproject output:
D:/private/sandboxes/12/almsoln>si viewproject --recurse --nofilterSubs --filter=file:onlysubs new/project.pj shared-subproject sub_feb/project.pj shared-subproject test/project.pj subproject watch/project.pj subproject blue/project.pj subproject red/project.pj subproject lilac/project.pj subproject purple/project.pj subproject
Viewsandbox output:
D:/private/sandboxes/12/almsoln>si viewsandbox --recurse --nofilterSubs --filter=file:onlysubs d:\private\sandboxes\12\almsoln\new\project.pj shared-subsandbox d:\private\sandboxes\12\almsoln\new\sub_feb\project.pj shared-subsandbox d:\private\sandboxes\12\almsoln\new\test\project.pj subsandbox d:\private\sandboxes\12\almsoln\watch\project.pj subsandbox d:\private\sandboxes\12\almsoln\watch\blue\project.pj subsandbox d:\private\sandboxes\12\almsoln\watch\blue\red\project.pj subsandbox d:\private\sandboxes\12\almsoln\watch\blue\red\lilac\project.pj subsandbox d:\private\sandboxes\12\almsoln\watch\blue\red\purple\project.pj subsandbox
That's ok.
My task is to add the shares of one project to a new project. So I'm calling
si viewproject ... | grep shared-subproject | sed ...
With sed I build sharesubproject commands, put it into a file and execute it afterwards. But now the source location of a share is missing and I have to modify it manually before executing my sharesubproject script.
To improve this, is it possible to get the source location of a shared subproject inline with viewsandbox?
Brainstorm:::
Maybe wishful thinking could help 🙂
If you had a member project.pj.DUMMY in every of your shared subprojects
si rlog -R --revision=:member --noHeaderFormat --noTrailerFormat --fields=archivename --filter=file:project.pj.DUMMY
This gives you the archivenames of all project.pj.DUMMY which usually should only differ
to the project location by the extension .DUMMY
...
HTH Juergen