none
TF History /version:TIME_SPAN command line problem

    Question

  • When I issue the "history" command with a version time span close (but not including) to the time that a change set was created at, then the change set shows up in the results of that command. Is there any way to make the history command more stringent on the version time span?

    I have a test project at codeplex, that I have checked in a file to, and the "tf history /formatBig Smileetailed" shows this:
    Changeset: 14533
    User: redsolo_cp
    Date: den 12 juli 2008 22:52:54

    Comment:
    added a new empty file

    Items:
    add $/project/path1/pom2.xml

    As you can see the change set was created 22:52:54. Now if I would like to get the changes from 22:55:00 to 22:59:00, I would NOT expect the above change set to be included in the output. But it does show up, as shown below:

    TF.exe history $/project /noprompt /versionBig Smile2008-07-12T22:55:00~D2008-07-12T22:59:00 /recursive /formatBig Smileetailed
    ---------------------------------------------------------------------------------
    Changeset: 14533
    User: redsolo_cp
    Date: den 12 juli 2008 22:52:54

    Comment:
    added a new empty file

    Items:
    add $/project/path1/pom2.xml


    Could anyone explain to me why the change set is showing up, and if there is anything I can do about it (using the TF command line)???
    Saturday, July 12, 2008 9:33 PM

Answers

  • TFS considers any date that's in the future to be the same as Latest.  So at first, your query is the same as /version:T~T.  After a few minutes, though, 22:15 is no longer in the future and the command works as you expect.  If you pass a date several years from now, you'd get the behavior back.
    Friday, July 25, 2008 12:38 AM
    Moderator

All replies

  • What you're seeing is a little puzzling to me and I can't reproduce it. Maybe someone else will jump in with some other thoughts.

    Monday, July 14, 2008 12:46 PM
  • I cant reproduce it using that old time span, but I can reproduce it easily. It seems that the change set must be newly created.

    Steps to reproduce (command line and output below each step):
    1. Add a new file to the work folder
    TF.exe add readme3.txt /noprompt /loginTongue Tiednd\user,password
    readme3.txt

    2. Check in the change
    TF.exe checkin readme3.txt /noprompt /loginTongue Tiednd\user,password
    Checking in add: readme3.txt

    Changeset #14708 checked in.

    3. Retrieve detailed history about the change set to get the actual time it was checked in.
    TF.exe history /noprompt /loginTongue Tiednd\user,password /versionBig Smile2008-07-13T20:10:00~D2008-07-15T22:19:00 $/project /server:https://tfs02.codeplex.com /recursive /formatBig Smileetailed
    -------------------------------------------------------------------------------------------------------------------------------------------
    Changeset: 14708
    User: user
    Date: den 14 juli 2008 22:15:08

    Comment:

    Items:
      add $/project/readme3.txt


    4. Retrieve detailed history that should exclude the change set.
    TF.exe history /noprompt /loginTongue Tiednd\user,password /versionBig Smile2008-07-14T22:19:00~D2008-07-14T22:30:00 $/project /server:https://tfs02.codeplex.com /recursive /formatBig Smileetailed
    -------------------------------------------------------------------------------------------------------------------------------------------
    Changeset: 14708
    User: user
    Date: den 14 juli 2008 22:15:08

    Comment:

    Items:
      add $/project/readme3.txt


    I would not expect the change set to be included in that history listing as the change set was created "22:15" and the history should display change sets between "22:19" and "22:30".
    Monday, July 14, 2008 8:30 PM
  • TFS considers any date that's in the future to be the same as Latest.  So at first, your query is the same as /version:T~T.  After a few minutes, though, 22:15 is no longer in the future and the command works as you expect.  If you pass a date several years from now, you'd get the behavior back.
    Friday, July 25, 2008 12:38 AM
    Moderator
  • Are you saying that my laptop clock and the TFS server clock are not synced? How can I check the TFS server time? Anyhow, the time I checked in a change is almost correct (give or take 15 seconds). But as Im writing this reply it has past at least 5 minutes between my checkin and "now" when I run the "history" command and I am still getting the check in entry.

    Or have I missunderstod your post?

    In the following example, I have included the output of date and time, to show that the time stamps are not in the future (at least on my machine, and I verified my time on my machine with http://www.thetimenow.com/)

    c:\test>date /T
    2008-07-27
    c:\test>time /T
    00:45
    c:\test>tf history /noprompt  /formatBig Smileetailed /loginTongue Tiednd\user,password /versionBig Smile2008-07-27T00:30:00~D2008-07-27T00:35:00 . /recursive
    --------------------------------------------------------------------------------------------------------------------------------------------

    Changeset: 15440
    User:      user
    Date:      2008-jul-27 00:27:27

    Comment:


    Items:
      add $/project/readme5.txt
    Saturday, July 26, 2008 10:48 PM