Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Basically it is easy to get the list of files Out of Sync Members using the filer in the IMS client + check box "Hide empty sandboxes"
I wonder if I can reproduce this filter using SI CLI, so far I tried with
si viewsanbox
but this command lists all files in the selected folder or project. I would like to have only those with the filter mentioned above.
Thanks.
Solved! Go to Solution.
si print seems to use si rlog internally
Unfortunatly when you try to configure the output of si print you might fall into the trap
that it behaves like the si rlog command which by default outputs all revisions.
So then it is better to use the more complicated si rlog directly.
You might use the following as template to achieve what you want:
si rlog --recurse --revision=:member --filter=changed:sync --format="MN:\"\{membername}\" \t MR:{memberrev} \t WR:{workingrev}\n" --noHeaderFormat --noTrailerFormat |
The output here looks like
MN:"release\README.txt" MR:1.1 WR:1.1 (The fields are also separated by TABs)
Note that WR:... may be empty if there is no working file or the revision is unknown in your sandbox.
The main trick to prevent si rlog from ouputtting multiple lines for a certain member (one for each revision)
is to use the option --revision=:member
Extraxt from the CLI Reference for Configuration Management
--format options use the same values as --fields, but similar to a JAVA MessageFormat string (that is, it requires { } to surround
each field). The --fields option automatically adds a newline on the end, but you must supply the newline for formats with a \n
...
Regards
Jürgen
Hi Jorge Guzman,
Try si viewsandbox --filtersubs. The --filtersubs argument hides empty projects on my system. That argument should also work with si viewproject.
Reference: si viewsandbox
Regards,
Kael
Edits:
2016-10-07EDT1108: Added Reference link to si viewsandbox
If you're just out for the location of the files files and dont need subproject/subsandbox info at all
you could also have a more compact view and try
si print --recurse --filter=changed:sync
For a better parseable format that also adresses whitespace in filenames its a little more complicated:
si rlog--recurse --revision=:member --filter=changed:sync --format="\"\{membername}\" \t {memberrev}\n" --noHeaderFormat --noTrailerFormat
Regards,
Jürgen
Hello Klaus,
I tried the si print and it works partially. For my sandbox the cmd
si print --recurse --filter=changed:sync
returns all out-of-sync files in the project. This is exactly want I wanted as filter. The results looks like this:
project_folder\myFile.c 1.2 archive
Where 1.2 is the member revision. I been trying to see if the output of the command also prints the working revision. So I see both, member and current working rev in the project sbx.
Any idea how can be achieved?
I tried this:
si print --recurse --filter=changed:sync --revision=:working
But did not worked, command still shows the member revision only.
Thanks, Regards,
Jorge
si print seems to use si rlog internally
Unfortunatly when you try to configure the output of si print you might fall into the trap
that it behaves like the si rlog command which by default outputs all revisions.
So then it is better to use the more complicated si rlog directly.
You might use the following as template to achieve what you want:
si rlog --recurse --revision=:member --filter=changed:sync --format="MN:\"\{membername}\" \t MR:{memberrev} \t WR:{workingrev}\n" --noHeaderFormat --noTrailerFormat |
The output here looks like
MN:"release\README.txt" MR:1.1 WR:1.1 (The fields are also separated by TABs)
Note that WR:... may be empty if there is no working file or the revision is unknown in your sandbox.
The main trick to prevent si rlog from ouputtting multiple lines for a certain member (one for each revision)
is to use the option --revision=:member
Extraxt from the CLI Reference for Configuration Management
--format options use the same values as --fields, but similar to a JAVA MessageFormat string (that is, it requires { } to surround
each field). The --fields option automatically adds a newline on the end, but you must supply the newline for formats with a \n
...
Regards
Jürgen
Hello Jorge Guzman,
Did the above information get you to a resolution? If so, could you mark the key post as Correct Answer by clicking on that button at the bottom of the respective post? If not, can you let us know how far you've come, and if you're still stuck?
Thanks,
Kael