locked
Merge / commit not committing all pending changes RRS feed

  • Question

  • Has anybody seen this happen.  You merge a branch (forward integrate in this case), you fix all the conflicts and you check in *everything* from the VS PendingChanges tool window.  The operation completes and you do a refresh in the PendingChanges tool window and there's another item that needs to be checked in.  WTF?  In this particular case it was a directory that was renamed that also had files in it with edits.  The file edits were successfully committed but apparently not the directory rename.  Are there any known cases where a merge can't be completed in a single commit?
    Tuesday, August 8, 2006 5:49 PM

Answers

  • I don't mean to suggest it's a timing issue.  If there's a bug, it's that PendingChanges doesn't handle this type of event (merge+rename pended by Resolve) at all.  We fixed a lot of similar bugs but it wouldn't surprise me if some slipped through.

    I'd recommend hitting Refresh before you checkin anything from the UI.  We think we've gotten PendingChanges to update automatically when expected, but no guarantees.  Meanwhile, "expected" doesn't include a wide range of possibilities: pending changes in another VS window, using the command line or API, etc.  What we do guarantee is that your checkin processes correctly and transactionally.  Making sure that transaction really has what you think it does is the responsibility of every contributor.  This is kinda harsh, but even if there's a minor refresh bug I don't consider the faulty UI checkin any less 'user error' than someone who types tf checkin d:\foo\bar /i /r, forgetting that some dependent files are under d:\foo\baz.
    Tuesday, August 8, 2006 9:50 PM
    Moderator

All replies

  • Are there any known cases where a merge can't be completed in a single commit?

    Yes but let's not go there.

    Did you do a refresh in PendingChanges before the checkin?  The UI does its best to keep up with things that happen in the background but shouldn't be considered authoritative.  My guess is that the event in question (pending a merge-rename via Resolve) never made it to the toolwindow.
    Tuesday, August 8, 2006 7:13 PM
    Moderator
  • I can't say for sure that the rename pend showed up in the PendingChanges tool window.  However I renamed the dir the night before. Then the developer that did this merge had done an update (tf get . /r) and built everything first.  So it wasn't like the rename happened right before the commit and the PendingChanges window just didn't catch the update in time.  Hmmm...

    So is it fair to say that you would recommend hitting Refresh in the PendingChanges tool window before commiting a merge to see if any new pends show up?

    Tuesday, August 8, 2006 8:36 PM
  • I don't mean to suggest it's a timing issue.  If there's a bug, it's that PendingChanges doesn't handle this type of event (merge+rename pended by Resolve) at all.  We fixed a lot of similar bugs but it wouldn't surprise me if some slipped through.

    I'd recommend hitting Refresh before you checkin anything from the UI.  We think we've gotten PendingChanges to update automatically when expected, but no guarantees.  Meanwhile, "expected" doesn't include a wide range of possibilities: pending changes in another VS window, using the command line or API, etc.  What we do guarantee is that your checkin processes correctly and transactionally.  Making sure that transaction really has what you think it does is the responsibility of every contributor.  This is kinda harsh, but even if there's a minor refresh bug I don't consider the faulty UI checkin any less 'user error' than someone who types tf checkin d:\foo\bar /i /r, forgetting that some dependent files are under d:\foo\baz.
    Tuesday, August 8, 2006 9:50 PM
    Moderator
  • FYI, I pended and resolved a merge-rename from Source Control Explorer and it showed up in PendingChanges fine w/o refresh.  To be clear: while I stand by the above recommendation, I'm not assuming what you saw is a UI bug / user error just yet.  If you can reproduce something let me know.
    Tuesday, August 8, 2006 10:02 PM
    Moderator
  • I'll keep an eye on this since this has happened about 3 times now.  After the last merge where this happened the TF server crashed (the machine responped to ping but not to tf queries).  :-(  I hope this has nothing to do with our TCS folks installing SQL Server 2005 SP1 on the TF server machine.

    Tuesday, August 8, 2006 10:40 PM