Ask a questionAsk a question
 

AnswerChecking In Unchanged Files in TFS

  • Tuesday, September 25, 2007 4:02 PMFrancois3000 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    When you check in a file, and you have made no changes to it,  TFS warns the user that nothing has been modified and will undo the checkout.  My problem is this warning, how do you suppress this warning?  The reason why i ask is that it is causing my build scripts to fail.  My build script is written in vbs script and I am basing a successful checkin on 0.  However when this warning comes up i get 1.  Is there an option or parameter that can suppress this prompt?

     

    Previously in VSS i had three options

    • Check In. Instructs VSS to record the checkin as a new version, even if no changes to the file are detected.
    • Undo Check Out. Instructs VSS to automatically undo check out on any unchanged file you try to check in.
    • Ask. Instructs VSS to display a dialog box asking what you want to do for each unchanged file.
    • Default. Instructs VSS to depend on the specific initialization file settings for each project. This tells VSS how to determine what to do with unchanged files.

    Does TFS have anything similar to these options?

Answers

  • Tuesday, September 25, 2007 8:49 PMRichard Berg Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    No.  Even if you wrote your own client, the server won't let you checkin unchanged files.

    That said, you should still be able to detect completed checkins based on the exit code.  Successful checkins will return 0 even if some files are undone, so long as at least 1 file has changes (and thus a new changeset is generated).  Exit code 1 means one of two things:
    - there were no pending changes in the workspace
    - all of the pending changes you tried to checkin were undone

All Replies

  • Tuesday, September 25, 2007 8:49 PMRichard Berg Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    No.  Even if you wrote your own client, the server won't let you checkin unchanged files.

    That said, you should still be able to detect completed checkins based on the exit code.  Successful checkins will return 0 even if some files are undone, so long as at least 1 file has changes (and thus a new changeset is generated).  Exit code 1 means one of two things:
    - there were no pending changes in the workspace
    - all of the pending changes you tried to checkin were undone