GithubHelp home page GithubHelp logo

Comments (15)

spraints avatar spraints commented on July 26, 2024

I haven't used gated checkins, so I don't know much about them. It looks like they're a shelveset that is passed to Team Build. If that's the case, there may be a command-line or other tool that lets you submit any shelveset to a Team Build server as a gated checkin. If that exists, you can use the existing git tfs shelve command to set up the shelveset for gated checkins.

Also, checkintool might already handle gated checkins correctly.

If the above aren't adequate, I'd be happy to accept a patch for this.

from git-tfs.

RobGibbens avatar RobGibbens commented on July 26, 2024

I think there is probably a command line option. Getting into the git-tfs source is on my list of things to do. Hopefully I can figure it out and create the patch. Does git-tfs have a certain spot in the code that it calls tf.exe?

from git-tfs.

spraints avatar spraints commented on July 26, 2024

No. Currently, it uses the .NET APIs only. There's probably an API
equivalent to the tf command, but calling tf isn't that big of a deal.

GitHelpers is where a lot of the git interaction happens, and the
Process-related stuff could be useful as a reference or template for
doing the tf.exe interaction.

On Tue, May 24, 2011 at 10:59 PM, RobGibbens
[email protected]
wrote:

I think there is probably a command line option.  Getting into the git-tfs source is on my list of things to do.  Hopefully I can figure it out and create the patch.  Does git-tfs have a certain spot in the code that it calls tf.exe?

Reply to this email directly or view it on GitHub:
https://github.com/spraints/git-tfs/issues/46#comment_1232913

from git-tfs.

RobGibbens avatar RobGibbens commented on July 26, 2024

It looks like the API supports overriding it. Not sure if it supports actually using it though.

http://blogs.infosupport.com/blogs/manuelr/archive/2010/05/25/override-gated-check-in-using-the-tfs-api.aspx
http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.common.checkinoptions2.aspx

from git-tfs.

spraints avatar spraints commented on July 26, 2024

It looks like there's a "queue for gated checkin" option, too.

http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.client.checkinparameters.queuebuildforgatedcheckin.aspx

On Tue, May 24, 2011 at 11:13 PM, RobGibbens
[email protected]
wrote:

It looks like the API supports overriding it. Not sure if it supports actually using it though.

http://blogs.infosupport.com/blogs/manuelr/archive/2010/05/25/override-gated-check-in-using-the-tfs-api.aspx
http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.common.checkinoptions2.aspx

Reply to this email directly or view it on GitHub:
https://github.com/spraints/git-tfs/issues/46#comment_1232971

from git-tfs.

davidalpert avatar davidalpert commented on July 26, 2024

I used the v0.12.0 tagged version of "git tfs checkintool" against TFS/VS2010 this afternoon. My project has a gated checkin policy in place.

The TFS freestanding dialog appeared as expected, I was able to query work items, associate a work item, etc, and submit the changes.

Then I see a "Team Foundation Error" dialog box stating "The calling thread must be STA, because many UI components require this." with an OK button.

Clicking OK showed the following message on the git-tfs command line:

  Your check-in could not be completed because it affects the following gated build definitions.
    \{path-to-project}\Dev
  To complete your check-in you will need to queue a build of the shelveset Gated_2011-08-18_04.24.45.9521;MYDOMAIN\DavidA.
  Your check-in could not be completed because it affects the following gated build definitions.
    \{path-to-project}\Dev
  To complete your check-in you will need to queue a build of the shelveset Gated_2011-08-18_04.24.45.9521;MYDOMAIN\DavidA.

It appears that this kicks git-tfs out of it's scripted checkin-dance process and leaves the local branch that I just committed from right where it was as it doesn't know how to pick up again when the build and gated merge is complete.

On the bright side, once I manually kicked of my shelfset through VS2010 Team Explorer, waited for the build to pass and get committed, then went back to my tracking branch right where git-tfs had left it, ran 'git tfs pull', I got a "merge made by recursion" just like I had expected:

  $ git tfs pull
  C5178 = 7cc5b869943646f2858dc806603a0dd73bbb6cc5
  Merge made by recursive.

... almost. I suppose that the merge commit might appear to TFS as an extra commit in there? not sure. will update you later on.

from git-tfs.

jbogard avatar jbogard commented on July 26, 2024

David, any additional problems in the history on your side?

from git-tfs.

davidalpert avatar davidalpert commented on July 26, 2024

nope. git-tfs is working like a dream, allowing me to avoid most of tfs as far as source control works.

my local timeline looks like a pair of parallel lines, with one representing my local commits and the other representing changesets in TFS and several merge lines linking them together.

the only friction I still have (coming from git-svn) is the way that git tfs checkintool pools all my commits since the last tfs merge into a single window rather than the way that git-svn naturally batches them in one after the other. means it's more work to check in to TFS several steps in a row rather than one lump of changes, but that's a workflow issue anyhow.

git and git-tfs seem to do a pretty good job of 'merging by recursion' so except for a few rare and mostly avoidable edge cases the tools take care of merging between my parallel lines.

from git-tfs.

jbogard avatar jbogard commented on July 26, 2024

But you still have to pool your shelveset build manually, right?

from git-tfs.

davidalpert avatar davidalpert commented on July 26, 2024

yes. git-tfs will throw the changes into tfs without issue and handle merges fine when there is no gated checkin policy in place.

against a gated checkin, git-tfs checkintool will throw changes over to tfs but when tfs bumps them to a shelfset git-tfs seems to not quite understand what to do. I have to then go into tfs and kick off a manual build of that changeset, checking 'merge changes on successful build' or whatever that checkbox is called, then wait for the build and merge to complete, then back to my bash shell for a 'git tfs pull' and git handles the merge recursively.

my timeline doesn't look quite as clean as I'd like, but way nicer still than hassling the onboard tfs source control tools.

from git-tfs.

jbogard avatar jbogard commented on July 26, 2024

Got a pull request open to fix this issue. Small fix, really

from git-tfs.

ivan-danilov avatar ivan-danilov commented on July 26, 2024

@davidalpert: Could you confirm that issue resolved with this fix? I don't use checkintool, so didn't see the issue in the first place :)
If everything is ok - I will pick it to 0-12 and master.

from git-tfs.

davidalpert avatar davidalpert commented on July 26, 2024

will do, prob. on monday.

On Fri, Aug 26, 2011 at 3:32 PM, ivan-danilov <
[email protected]>wrote:

@davidalpert: Could you confirm that issue resolved with this fix? I don't
use checkintool, so didn't see the issue in the first place :)
If everything is ok - I will pick it to 0-12 and master.

Reply to this email directly or view it on GitHub:
https://github.com/spraints/git-tfs/issues/46#issuecomment-1916682

from git-tfs.

ivan-danilov avatar ivan-danilov commented on July 26, 2024

Any news?

from git-tfs.

ivan-danilov avatar ivan-danilov commented on July 26, 2024

Picked commits from #78.

from git-tfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.