Git Product home page Git Product logo

Comments (5)

fschwiet avatar fschwiet commented on May 16, 2024

I made a fix in my branch of git-tfs. A pull request was made.

from git-tfs.

fschwiet avatar fschwiet commented on May 16, 2024

Ok that fix was bad. It turns out there are two issues that cause this to be hit on processing Rename changes. One is where the rename doesn't actually have a delete associated with it (item.DeletionId == 0). As far as I can tell when item.DeletionId == 0, we should not try to clean up the original object (http://blogs.msdn.com/roberthorvick/archive/2006/02/09/528651.aspx).

There is another file that is the result of a rename change where DeleteId != 0 though the previous version of the file cannot be found. I've been looking at the history in various ways and can't figure out where the original is for that file. I couldn't resolve this case. :(

from git-tfs.

iuhh avatar iuhh commented on May 16, 2024

I've ran into this exact problem, and found item.VersionControlServer.GetItem(item.ItemId, item.ChangesetId - 1).ServerItem would throw an exception e.g.

item.VersionControlServer.GetItem(3891301,72192)
{Sep.Git.Tfs.VsCommon.WrapperForItem}
[Sep.Git.Tfs.VsCommon.WrapperForItem]: {Sep.Git.Tfs.VsCommon.WrapperForItem}
ChangesetId: 'item.VersionControlServer.GetItem(3891301,72192).ChangesetId' threw an exception of type 'System.NullReferenceException'
DeletionId: 'item.VersionControlServer.GetItem(3891301,72192).DeletionId' threw an exception of type 'System.NullReferenceException'
ItemId: 'item.VersionControlServer.GetItem(3891301,72192).ItemId' threw an exception of type 'System.NullReferenceException'
ItemType: 'item.VersionControlServer.GetItem(3891301,72192).ItemType' threw an exception of type 'System.NullReferenceException'
ServerItem: 'item.VersionControlServer.GetItem(3891301,72192).ServerItem' threw an exception of type 'System.NullReferenceException'
VersionControlServer: 'item.VersionControlServer.GetItem(3891301,72192).VersionControlServer' threw an exception of type 'System.NullReferenceException'

Changed to item.VersionControlServer.GetItem(item.ItemId, item.ChangesetId ).ServerItem got it going again, but I am not sure what implications this is going to have.

from git-tfs.

olivierdagenais avatar olivierdagenais commented on May 16, 2024

Is this happening when hitting a TFS 2010 server and the changeset where the failure occurs contains a rename? If so, I have proposed a fix to this bug in issue #9.

from git-tfs.

spraints avatar spraints commented on May 16, 2024

This appears to be resolved by the fix in #9.

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.