locked
Merge says "no changes" but files *ARE* different RRS feed

  • Question

  • Hi, I have a .csproj file in a Development branch which was branched from a Staging branch (just our names for them).

    The Development version had several .cs files excluded and looking at the files in a Textpad (and comparing them) I can see the differences in the files.

    However when I go to merge that file (any of the changesets that contain the difference) into the Staging version TFS tells me that there are no changes to be merged. 

    Clearly it's not comparing the files directly... what steps can I take to troubleshoot/rememdy this?

     

    Thanks

    Richard Lowe

    Wednesday, November 29, 2006 11:22 PM

Answers

  • There's no problem.  I'm just explaining where the "branch" changetype came from.

    Changeset 595 was a reverse integration (RI) from Development to Staging.  You edited the file after pending the RI.  Thus, when you checked in, TFS detected that the file had different contents -- new contents that have not been merged to Development -- and so 595 is now a candidate for a FI from Staging -> Development.

    Not sure which change you want to take from Dev to Staging.  At the moment, you've already merged all of them.  If you want to re-merge one of them (undoing the extraneous edit you made in 595), you'll need to use /force as described above.
    Monday, December 4, 2006 5:56 PM
    Moderator

All replies

  • Please report the output of these commands:
    tf history $/teamproject/Development/file.cs /i
    tf history $/teamproject/Staging/file.cs /i
    tf merges $/teamproject/Staging/file.cs

    Then we'll know what happened.
    Thursday, November 30, 2006 12:36 AM
    Moderator
  • Thanks Richard, here's the output, I'm confused why 505 would say 'branch', but otherwise I think this represents what (should have) happened.

    C:\Program Files\Microsoft Visual Studio 8\VC
    >tf history "$/Licensing and Billing/Development/Transfer Service Client/Transfer Service/Common/TransferService.Common.csproj" /i
    Changeset Change               User          Date       Comment
    --------- -------------------- ------------- ---------- -----------------------------------------------
    590       edit                 rlowe         11/29/2006
    579       edit                 rlowe         11/28/2006 shelve
    545       edit                 rlowe         11/10/2006 Huge step towards complete.
    511       edit                 rlowe         11/2/2006
    505       branch               rlowe         11/2/2006  Check-in with the major known pending features

    C:\Program Files\Microsoft Visual Studio 8\VC
    >tf history "$/Licensing and Billing/Staging/Transfer Service Client/Transfer Service/Common/TransferService.Common.csproj" /i
    Changeset Change               User          Date       Comment
    --------- -------------------- ------------- ---------- -----------------------------------------------
    595       merge, edit          rlowe         11/29/2006
    478       branch               rlowe         10/25/2006

    E:\IntDev\Applications\Licensing and Billing\Staging
    >tf merges /server:chitfs01 "$/Licensing and Billing/Staging/Transfer Service Client/Transfer Service/Common/TransferService.Common.csproj"
    Changeset Merged in Changeset Author                           Date
    --------- ------------------- -------------------------------- ----------
         326*                 478 rlowe                            10/25/2006
         338*                 478 rlowe                            10/25/2006
         399*                 478 rlowe                            10/25/2006
         477*                 478 rlowe                            10/25/2006
         511*                 595 rlowe                            11/29/2006
         545*                 595 rlowe                            11/29/2006
         579*                 595 rlowe                            11/29/2006
         590*                 595 rlowe                            11/29/2006

    Thursday, November 30, 2006 3:49 PM
  • 505 is the changeset where you created the Development branch, from what I can tell.  The first entry in an item's history will always be either 'add', 'branch', or 'merge, branch'. 

    Apparently the Staging branch is also a child of a 3rd branch.  You can see the complete tree using tf branches or the Branches pane of the Properties dialog in Source Control Explorer.

    To answer your question, Merge says there's nothing to do because of changeset 595.  You've already merged all those edits into Staging.  If the file contents are different then you must have edited the file after pending the merge but before checking in.  You can verify this by running:

    tf merge "$/Licensing and Billing/Staging/Transfer Service Client/Transfer Service/Common/TransferService.Common.csproj" "$/Licensing and Billing/Development/Transfer Service Client/Transfer Service/Common/TransferService.Common.csproj" /candidate


    I'll bet it says that 595 is a candidate to merge to Development.  If so, and you want to undo your edit, the simplest way would be:

    1. tf merge  "$/Licensing and Billing/Development/Transfer Service Client/Transfer Service/Common/TransferService.Common.csproj" "$/Licensing and Billing/Staging/Transfer Service Client/Transfer Service/Common/TransferService.Common.csproj" /force /version:590~590
    2. resolve AcceptTheirs
    3. checkin
    4. tf merge "$/Licensing and Billing/Staging/Transfer Service Client/Transfer Service/Common/TransferService.Common.csproj" "$/Licensing and Billing/Development/Transfer Service Client/Transfer Service/Common/TransferService.Common.csproj" [this will pend an edit, but should be a no-op]
    5. checkin

    Thursday, November 30, 2006 10:12 PM
    Moderator
  • Thanks Richard, yes, it's setup like so I created a Trunk, then branched that to Staging then branched staging to Development.  Is this a problem? Is there a better way to have a 3-branch development/staging and trunk(production) setup in TFS?

    Ok 595 is a candidate to merge from Staging to Development.  I don't understand why - isn't that a reverse merge?

    So to take my change from Dev to Staging, I now have to manually do it outside TFS Merge, correct?

    Thanks,

    Richard

    Monday, December 4, 2006 5:01 PM
  • There's no problem.  I'm just explaining where the "branch" changetype came from.

    Changeset 595 was a reverse integration (RI) from Development to Staging.  You edited the file after pending the RI.  Thus, when you checked in, TFS detected that the file had different contents -- new contents that have not been merged to Development -- and so 595 is now a candidate for a FI from Staging -> Development.

    Not sure which change you want to take from Dev to Staging.  At the moment, you've already merged all of them.  If you want to re-merge one of them (undoing the extraneous edit you made in 595), you'll need to use /force as described above.
    Monday, December 4, 2006 5:56 PM
    Moderator