Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
iwfilestate
Johnny
win2k 552 SP3.
I found an interesting command line tool by the name of iwfilestate.
It seems give some useful info that would normally need a handful of clt to retrieve.
I couldnt seem to find any reference to it in the clt doc.
I would like to find out more about it, namely the assigned attribute.
Whats the deal.. is this an official clt for customers to use?..
Thanks
John Cuiuli
Sydney, Australia
Find more posts tagged with
Comments
Johnny
Any takers?..............
John Cuiuli
Sydney, Australia
Migrateduser
I've been researching your question. This CLT has been in the source base for a long time (since '99). I also found the man page for it. I'm still getting clarification as to whether it's officially supported or not.
here's the draft doc:
% iwfilestate -h
Usage: iwfilestate [options...] <vpath> [<vpath>...]
Returns various state information for a file
<options>:
-h Display this help information and exit
-v Display version information and exit
-f <fmt> Specifies output format. <fmt> may be one of:
text Human-readable text output (default)
script Terse text output, suitable for parsing
-session <s> Specifies a session string for credentials checks
-i Include user information in output
I am hoping to get closure on the 'supported question' today.
Regards,
lissa
Migrateduser
This CLT is supported. It will be documented in the TS6 manuals.enjoy!
lissa
Migrateduser
I wouldn't be me if I wasn't complaining about something that appears great on the surface, would I? The output of this command is a little funky, especially if you wanted to parse the output in a script. I tried this on one file and it outputs this:
> ~/iw-home/bin/iwfilestate /default/main/intranet/foo/WORKAREA/int/bar.html
/default/main/intranet/foo/WORKAREA/int/bar.html
Conflict: No
Current: Yes
Modified: Yes
Editable: Yes
Not locked
Not assigned
Why does it say
Not locked
instead of
Locked: No
? Same story for
Not assigned
. Why use 2 different ways of reporting yes/no information? Inconsistency is bad. Very bad.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Johnny
While we are on the subject of consistancy ... (and whinging
)
I would like to point out something I noticed on windows.
some clt tools take vpaths', while some take window paths'.
Whats even stranger is that I noticed one (iwgetfilejobs) that looks like a bit of both.
I couldnt get it to work with either a vpath or a window path, but it did work with a vpath using back slashes ( \default\main\branch\..... ).
If they were ALL the same, it would make coding alot easier in windows.
John Cuiuli
Sydney, Australia
johnjamesmarsh
If you want to talk about consistency have a go at iwqueryjobs or iwquerytasks.
JonathonG
Smitty,
For parsing by a script, try the "-f script" option. It's much more friendly:
iwfilestate -f script demo.txt
vpath=demo.txt
conflict=no
current=yes
modified=no
editable=yes
locked=no
assigned=no
Jonathon
Interwoven Architecture Consultant
1100080701.txt
Migrateduser
OK, that's much better output. I'm curious as to why you wouldn't just have the thing output the info in one format. It's not like it's hard to read if you make it consistent. Just wondering what the mindframe was since they apparently realized the standard output was not good for scripting.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
JonathonG
Can't speak to this particular CLT, because I agree, the formats are pretty similar. With some of the TeamXML CLTs, the difference between "script" mode and "user" mode is very significant, the script mode being extremely terse, without any labels on any of the information. And vice versa, the user mode would be next to impossible to parse with a script, but is nice and friendly to a user's eyes. Just a conjecture here, because I'm not in touch with engineering, but maybe there's a standard for all new tools to provide two modes, and this particular one just doesn't really need it. Just a thought.
Jonathon
Interwoven Architecture Consultant
Migrateduser
Fair enough - that's good enough for me. I was thinking maybe when the CLT was originally implemented the output was the inconsistent style and then later on someone realized that it wasn't good for scripting and the easiest way to handle it was to just add a command line flag to allow people to see the output in a more consistent form. Regardless, I can live with it since it does allow me to see output in a nice consistent fashion. I am not familiar with TeamXML, so I can't comment on any other CLTs like that, but I can certainly imagine why you might want 2 different formats depending on how you need to see the data. This might be a good option for many other CLTs as well.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com