DCSIMG
Disabled merge options in TFS Source Control - Guy Ronen's Blog

Guy Ronen's Blog

Lets talk about secs

Disabled merge options in TFS Source Control

אני עדיין לא סגור על איך להחליט מה לפרסם כאן ומה לא. בעיקר מהשיקול של "האם לא כתבו על זה קודם איפשהוא באינטרנט? הייתכן שאני הראשון שכותב על זה!?"
מעבר לזה, אני פרפקציוניסט, אז אני נוטה לא להתחיל כלום בלי שאני יודע שהוא יסתיים פרפקט :)

את הפוסט הזה החלטתי לכתוב משתי סיבות:
1. זה העסיק אותי במשך שלושה ימים (ברוטו). היה קשה למצוא לזה את הפיתרון.
2. לא מצאתי לזה תשובה בשום מקום באינטרנט. רק אחרי התכתבות עם בריאן, ראש הצוות שפיתח את ה- TFS ופרסום הודעות בכמה פורומים קיבלתי תשובה (דווקא בריאן וציוותו לא עלו על הבעיה!).

אתמצת בעברית ואח"כ אפרט באנגלית:
הבעיה:
אחרי ביצוע Branch לפרוייקט ב- Source Control (אתם רואים כמה זה מעצבן לכתוב POST טכני בעברית?!), שינויים בשני הענפים ונסיון לביצוע Merge (שכמובן מכיל Conflicts), הכפתור "Auto Merge All" במסך Resolve Conflicts לא פעיל, ובמסך הבא (שמופיע אחרי לחיצה על כפתור Resolve) שתי האפשרויות הראשונות לא פעילות אף הן. (בקיצור, אין אפשרות לבצע merge בשום דרך).

הפיתרון:
מסתבר שהאופציה File Merging עבור קבצים מסוג cs. (ובמקרה שלנו, עבור כל סוגי הקבצים) הייתה במצב disabled. כדי לשנות מצב זה:

VS 2005 Main Menu -> Team -> Team Foundation Server Settings -> Source Control File Types

Now in english:

The problem:
After creating a branch for a project, modifying a file in both branches, check-in, then comming to perform a merge from the branch to the original source, both the "Auto Merge All" butto, the "Merge changes for me" and the "Merge changes in merge tool" where disabled :(
Bottom line, no merge capabilities in the TFS were enabled, which practically means: No branching can effectively be done in the source control.

The following dialog appears when you come to merge and there are conflicts (say in the program.cs file):

When you click on the "Resolve..." button, the following dialog appears:

The solution:
Enable "File Merging" options for the relevant file types:
VS 2005 Main Menu -> Team -> Team Foundation Server Settings -> Source Control File Types...



Comments

Asher said:

how did u get to the state where you had this kind of settings?? this is not the default ? did some1 explicitly modified it or was it modified as a result from something else ?

# February 12, 2007 9:58 PM

Guy Ronen said:

Good question.

I don't know for sure, but I think that some1 did change those settings intentionly long time ago.

I think he was looking for a way to prevent multiple checkouts (non-exclusive) and he didn't know about the check box in the other dialog.

We once wanted to disable non-exclusive checkouts and this is probabaly the way he thought it can be done.

He doesnt work with us anymore so I didnt have the chance to ask him :)

# February 12, 2007 11:06 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: