none
Preserve pending changes locally with Gated Check-in

    Question

  • Hi,

    We've been experimenting with the new Gated Check-in feature of TFS 2010. We are eager to use this great feature but before we can enable it on our development branches, I have to figure out a way to preserve the pending changes when committing a check-in. The strange thing is, when I check-in a "Gated Check-in" dialog pops up telling me my changes need validation. There is a checkbox in the Options section with label "Preserve my pending changes locally". But it's disabled! How can I enable this option??
    FYI: The second checkbox ("Bypass validation build and.........") is not disabled and can be checked/unchecked.

    Cheers,
    Wouter.

    Monday, September 20, 2010 10:19 AM

Answers

  • Hi wvdpost,

    Sorry for the delayed response!

    The option "Preserve my pending changes locally" is gray because the pending changsets being checked in contain one or more locks.

    The build service cannot unshelve or check in your changes if your local changes are preserved.

    I think your some pending changset had been locked, so the option is disable.

    Hope it helps!

    Best Regards,

    Cathy Kong

     

     

    • Marked as answer by wvdpost Thursday, October 28, 2010 6:46 AM
    Tuesday, October 12, 2010 7:49 AM

All replies

  • Hi wvdpost,

    A gated check-in means that, rather than checking the code in to version control, the code is submitted as a shelveset. The build server then takes the latest code, merges that with the changes contained in your shelveset, and performs the build. If the build is successful, the changes in your shelveset will be checked in automatically on your behalf by the build server.

    A Gated Check-in trigger means that check-ins to the areas of version control covered (workspace) by the build are not allowed by the server until a build has been performed and passed successfully. This means that when users attempt to check in a file, so they are presented with the dialog in which an option "Preserve my pending changes locally", this allows the user to decide whether or not the changes being submitted should be left in the workspace or undone once the ‘Build Changes’ button is clicked. 

    For more information, you can refer to http://blogs.msdn.com/b/patcarna/archive/2009/06/29/an-introduction-to-gated-check-in.aspx

    and

     http://msdn.microsoft.com/en-us/library/dd794776.aspx

    Hope it helps!

    If you have any question, please feel free to let me know!

    Best Regards,

    Cathy Kong

    Thursday, September 23, 2010 7:45 AM
  • Uhm... I'm sorry but I'm well aware of what gated check-in means. Have you read my question?? It's about why the checkbox "Preserve my pending changes locally" is disabled. Not just un-checked, but completely disabled. So impossible to check. If you're a developer, you want to check in the changes you've made and continue working on the project including your changes. And not have to wait for the build server to validate your changes so you can do a "get latest" to download the changes you just checked-in.

    I reckon that's the reason why you've built the option to reconcile your workspace once the gated check-in has succeeded.... right?

    Thursday, September 23, 2010 8:03 AM
  • Hi wvdpost,

    I'm sorry I misunderstood what you meant.

    About the option "Preserve my pending changes locally" is disabled, could you tell me following questions so that we can narrow the scope of the issue?

    1. What version of Visual Studio do you use currently?

    2. If you log in with Administror, do you still have the same issue?

    Hope it helps!

    Best Regards,

    Cathy Kong

     

    Thursday, September 23, 2010 9:24 AM
  • Hi Cathy,

    No problem, I just had the idea that the answer was some kind of auto-generated answer based on some keywords in the subject.

    I'm using Visual Studio 2010 (Version: 10.0.30319.1 RTMRel).

    I'm a local admin on my machine and Visual Studio is always "running as administrator".

    Regards,
    Wouter.

    Thursday, September 23, 2010 10:08 AM
  • Hi Wouter,

    I have tried in the same scenario with yours, however, the option "Preserve my pending changes locally" can be able to select in my machine.

    You said "the answer was some kind of auto-generated answer based on some keywords in the subject". Have you verified it?

    If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and use by other community members having similar questions.

    Thanks and Best Regards,

    Cathy Kong

    Tuesday, September 28, 2010 8:04 AM
  • Hi Cathy,

    Thanks for your reply.

    What should I verify exactly?

    I don't understand why the checkbox is enabled on your machine, can you perhaps ask the Visual Studio team if there is any condition/situation in which that checkbox is disabled?

    I've included a screenshot of the Gated Checkin window.

    Tuesday, September 28, 2010 8:53 AM
  • Hi wvdpost,

    Sorry for the delayed response!

    The option "Preserve my pending changes locally" is gray because the pending changsets being checked in contain one or more locks.

    The build service cannot unshelve or check in your changes if your local changes are preserved.

    I think your some pending changset had been locked, so the option is disable.

    Hope it helps!

    Best Regards,

    Cathy Kong

     

     

    • Marked as answer by wvdpost Thursday, October 28, 2010 6:46 AM
    Tuesday, October 12, 2010 7:49 AM
  • Hi Cathy,

    Thanks for your reply! When we're continuing to test the Gated Checkin feature, I'll make sure to check for any locks. Although it's still kind of weird since I've been testing this in a test branch that is isolated from anyone else in the company :s

    Regards,
    Wouter.

    Tuesday, October 12, 2010 2:47 PM
  • Hi wvdpost,

    Sorry for the delayed response!

    The option "Preserve my pending changes locally" is gray because the pending changsets being checked in contain one or more locks.

    The build service cannot unshelve or check in your changes if your local changes are preserved.

    I think your some pending changset had been locked, so the option is disable.

    Hope it helps!

    Best Regards,

    Cathy Kong

     

     


    I can now confirm this. If you have (for example) any binary files in your changeset, like images, the preserve pending changes locally option is disabled.
    Thursday, October 28, 2010 6:48 AM
  • Hi wvdpost,

    Thanks for sharing the information! 

    We appreciate your efforts!

    Best Regards,

    Cathy Kong

    Thursday, October 28, 2010 8:13 AM
  • Beacuse "exculsive check-out" is enabled on our team project, "Preserve my changes locally" option is disabled on gated checkin screen.
    Tuesday, December 14, 2010 7:50 AM