Support Forum


It is currently Thu Apr 17, 2014 12:34 pm




Post new topic Reply to topic  [ 5 posts ] 
 Work Items --> Changesets --> Files via the command line? 
Author Message

Joined: Tue Aug 15, 2006 3:38 pm
Posts: 101
Post Work Items --> Changesets --> Files via the command line?
Hey Teamprise! Long time no see.

A colleague of mine is trying to find a good way to list all the files that are part of a Task. Through the GUI we can get the changesets, but then the user has to click on each changeset to see the files. This is fine if there are two changesets, but how about if there are 100?

TFS Power Tools has a cool command called workitem. With the workitem command you can get back Links. With a script (e.g. Power Shell) you can get the changeset details using the tf changeset command.

Do you know if there is a similar way to solve this problem via the Teamprise command line tools? I think if there was a "workitem" command and "changeset", then we could write a shell script to solve the problem via Teamprise, which this particular user would need as he's a Linux user.

Any help or ideas would be appreciated.


Mon Jan 05, 2009 3:06 pm
Profile

Joined: Wed Mar 15, 2006 4:07 pm
Posts: 288
Post Re: Work Items --> Changesets --> Files via the command line?
Hi Mac,

Great to hear from you again!

We've already had requests to add the changeset command to the CLC and it's scheduled to be completed in the 3.2 release. However, I'm not real familiar with the workitem command available with TFS Power Tools so I'm going to discuss this with our lead CLC developer. He might have some suggestions that may help you out until these commands can be implemented.

I'll get back in touch with you tomorrow!

Tonya


Mon Jan 05, 2009 4:45 pm
Profile

Joined: Wed Mar 15, 2006 4:07 pm
Posts: 288
Post Re: Work Items --> Changesets --> Files via the command line?
Hello Mac,

I have an update for you. As you already know, Teamprise 3.1 does not support the changeset command, which would make the second half of the process straightforward, but the "history" command may suffice for your script. Teamprise 3.2 will support the changeset command. For now, the "wit" program that comes with the Teamprise Command Line Client can be used to list links in a work item, and the history command (with "detailed" or "xml" output) may be used to list the changes for each changeset.

The following "wit" command would show the work item "1234", including any changeset links (the login and server options may be omitted if the current working directory is mapped):

wit -login:user@domain,pass -server:http://foo.bar:8080 get 1234

The output is a human-readable table. Add the "-skipresolvelinks"
option to make the wit command include the URI style link information, which would be more precise for identifying changesets. and easier to parse with a script. For example:

wit -login:user@domain,pass -server:http://foo.bar:8080 get -skipresolvelinks 1234

The script could look for "vstfs://" URI sections, and pull the changeset numbers off the end (it could also handle other links).

Once it has the changeset numbers, it could call "tfs history" with the changeset as the version, "stopafter" set to 1 to just get one changeset's information, specifying the "detailed" or "xml" formats, depending on how much information it needs about changes. For example (listing changeset 5555):

tf history -recursive -version:5555 -format:detailed -stopafter:1 $/

or:

tf history -recursive -version:5555 -format:xml -stopafter:1 $/

Please let me know if this suggestion meets your needs.

Thanks again,

Tonya


Tue Jan 06, 2009 11:52 am
Profile

Joined: Tue Aug 15, 2006 3:38 pm
Posts: 101
Post Re: Work Items --> Changesets --> Files via the command line?
Thanks Tonya! I actually didin't know about the wit command! I need to get back into some TFS sutff!

Anyway, I gave those commands a try and I think we can solve our problem now with a simply script. Thanks again!


Wed Jan 07, 2009 10:52 am
Profile

Joined: Fri Jan 27, 2006 9:26 pm
Posts: 252
Location: Microsoft
Post Re: Work Items --> Changesets --> Files via the command line?
Interestingly we shipped the wit command line client before Microsoft introduced their workitem command line power tool. At the time we shipped Work Item functionality in our GUI clients we considered it important to also support our customers who want to talk to TFS from machines that do not always have a GUI.

We have a work item on our backlog to go back and see what we can do about shipping a version of the command that is more compatible with the Microsoft power tool syntax so make script portability easier - but until now we were not sure of the demand so other things got higher priority.

In the meantime, let us know how you get on with the wit command. Even if we do introduce a new command that is more compatible with the tfpt syntax, we'll keep the wit commands around for backwards compatibility so your script investment should be protected.

Good to hear from you again Mac. Hope Santa brought you something nice.

M.

_________________
http://www.teamprise.com/


Thu Jan 08, 2009 9:07 am
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © phpBB Group.
Based on style by Vjacheslav Trushkin for Free Forums/DivisionCore.