Fossil SCM

Change the merge conflict marks to identify which part is original content and which part is the content merged in.

drh 2010-12-15 01:36 trunk
Commit 76ae862ec9ee2be80a88efb8a2c871f002420469
2 files changed +1 -1 +6 -3
+1 -1
--- src/merge.c
+++ src/merge.c
@@ -349,11 +349,11 @@
349349
blob_read_from_file(&v, zFullPath);
350350
if( isBinary ){
351351
rc = -1;
352352
blob_zero(&r);
353353
}else{
354
- rc = blob_merge(&p, &m, &v, &r);
354
+ rc = blob_merge(&p, &v, &m, &r);
355355
}
356356
if( rc>=0 ){
357357
if( !nochangeFlag ){
358358
blob_write_to_file(&r, zFullPath);
359359
}
360360
--- src/merge.c
+++ src/merge.c
@@ -349,11 +349,11 @@
349 blob_read_from_file(&v, zFullPath);
350 if( isBinary ){
351 rc = -1;
352 blob_zero(&r);
353 }else{
354 rc = blob_merge(&p, &m, &v, &r);
355 }
356 if( rc>=0 ){
357 if( !nochangeFlag ){
358 blob_write_to_file(&r, zFullPath);
359 }
360
--- src/merge.c
+++ src/merge.c
@@ -349,11 +349,11 @@
349 blob_read_from_file(&v, zFullPath);
350 if( isBinary ){
351 rc = -1;
352 blob_zero(&r);
353 }else{
354 rc = blob_merge(&p, &v, &m, &r);
355 }
356 if( rc>=0 ){
357 if( !nochangeFlag ){
358 blob_write_to_file(&r, zFullPath);
359 }
360
+6 -3
--- src/merge3.c
+++ src/merge3.c
@@ -151,13 +151,16 @@
151151
int *aC2; /* Changes from pPivot to pV2 */
152152
int i1, i2; /* Index into aC1[] and aC2[] */
153153
int nCpy, nDel, nIns; /* Number of lines to copy, delete, or insert */
154154
int limit1, limit2; /* Sizes of aC1[] and aC2[] */
155155
int nConflict = 0; /* Number of merge conflicts seen so far */
156
- static const char zBegin[] = "<<<<<<< BEGIN MERGE CONFLICT\n";
157
- static const char zMid[] = "============================\n";
158
- static const char zEnd[] = ">>>>>>> END MERGE CONFLICT\n";
156
+ static const char zBegin[] =
157
+ "<<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<\n";
158
+ static const char zMid[] =
159
+ "======= original content above; merged content below =======\n";
160
+ static const char zEnd[] =
161
+ ">>>>>>> END MERGE CONFLICT: merged content last >>>>>>>>>>>>\n";
159162
160163
blob_zero(pOut); /* Merge results stored in pOut */
161164
162165
/* Compute the edits that occur from pPivot => pV1 (into aC1)
163166
** and pPivot => pV2 (into aC2). Each of the aC1 and aC2 arrays is
164167
--- src/merge3.c
+++ src/merge3.c
@@ -151,13 +151,16 @@
151 int *aC2; /* Changes from pPivot to pV2 */
152 int i1, i2; /* Index into aC1[] and aC2[] */
153 int nCpy, nDel, nIns; /* Number of lines to copy, delete, or insert */
154 int limit1, limit2; /* Sizes of aC1[] and aC2[] */
155 int nConflict = 0; /* Number of merge conflicts seen so far */
156 static const char zBegin[] = "<<<<<<< BEGIN MERGE CONFLICT\n";
157 static const char zMid[] = "============================\n";
158 static const char zEnd[] = ">>>>>>> END MERGE CONFLICT\n";
 
 
 
159
160 blob_zero(pOut); /* Merge results stored in pOut */
161
162 /* Compute the edits that occur from pPivot => pV1 (into aC1)
163 ** and pPivot => pV2 (into aC2). Each of the aC1 and aC2 arrays is
164
--- src/merge3.c
+++ src/merge3.c
@@ -151,13 +151,16 @@
151 int *aC2; /* Changes from pPivot to pV2 */
152 int i1, i2; /* Index into aC1[] and aC2[] */
153 int nCpy, nDel, nIns; /* Number of lines to copy, delete, or insert */
154 int limit1, limit2; /* Sizes of aC1[] and aC2[] */
155 int nConflict = 0; /* Number of merge conflicts seen so far */
156 static const char zBegin[] =
157 "<<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<\n";
158 static const char zMid[] =
159 "======= original content above; merged content below =======\n";
160 static const char zEnd[] =
161 ">>>>>>> END MERGE CONFLICT: merged content last >>>>>>>>>>>>\n";
162
163 blob_zero(pOut); /* Merge results stored in pOut */
164
165 /* Compute the edits that occur from pPivot => pV1 (into aC1)
166 ** and pPivot => pV2 (into aC2). Each of the aC1 and aC2 arrays is
167

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button