Jonathan
Jonathan

Reputation: 7551

How to know who checked-in on behalf of another user (using /author)

In TFS2010, one can checkin on behalf of another user (assuming he has permission to do so):

> tf.exe checkin (...) /author:OtherUser

Checkin history shows OtherUser as the user who made the checkin:

> tf history (...) /noprompt
Changeset User              Date       Comment
--------- ----------------- ---------- -----------
1234      OtherUser         (...)

I found a blog post saying "Both your user name and OtherUser are recorded in the changeset data, so that you can always determine who checked in the changes". I presume it's recorded in Changeset.Commiter vs ChangeSet.Owner, but tf history or tf changeset don't display that.

Is there some UI/tool that displays this info?

[edit] Note: Seems that Commiter can mean 2 different things:

  1. User that checked-in on behalf of OtherUser, using tf checkin /author.
  2. User that runs gated checkin (machine account or build user).

In case one made a tf checkin /author into a gated checkin, then meaning 1 wins.

Upvotes: 5

Views: 547

Answers (1)

granth
granth

Reputation: 8939

You are correct, there are two different users involved.

  1. Changeset.Committer - The user who actually performed the check-in (i.e. the user who was authenticated to the server)
  2. Changeset.Owner - The user who the check-in was performed on behalf of (i.e. specified as /author:OtherUser)

The Visual Studio UI will not show you the two different users involved. It will only show you the Owner/Author. (Which makes sense, since it's rare that the committer would be different)

If you want to see both users, you can use the following command-line, with the /noprompt switch to force the output to the console:

C:\code>tf changeset 1234 /noprompt
Changeset: 1234
User: ChangesetOwnerOrAuthorUser
Checked in by: ChangesetCommitterUser
Date: Friday, 1 February 2013 12:00:00 PM

Comment:

Items:
  edit $/project/test/test.txt

Upvotes: 3

Related Questions