Fossil SCM

Print description of conflict when 'stash apply' cannot merge a symlink and a regular file.

dmitry 2011-09-02 10:34 symlinks
Commit bca6924e5ff67a5ffa89517a81a357d0b4cef024
1 file changed +3 -3
+3 -3
--- src/stash.c
+++ src/stash.c
@@ -232,17 +232,17 @@
232232
}else{
233233
int rc;
234234
if( isLink || isNewLink ){
235235
rc = -1;
236236
blob_zero(&b); /* because we reset it later */
237
- //TODO(dchest): write something to disk?
237
+ fossil_print("***** Cannot merge symlink %s\n", zNew);
238238
}else{
239239
rc = merge_3way(&a, zOPath, &b, &out);
240240
blob_write_to_file(&out, zNPath);
241
- //blob_reset(&out); //XXX(dchest): Need this?
241
+ blob_reset(&out);
242
+ file_setexe(zNPath, isExec);
242243
}
243
- file_setexe(zNPath, isExec);
244244
if( rc ){
245245
fossil_print("CONFLICT %s\n", zNew);
246246
nConflict++;
247247
}else{
248248
fossil_print("MERGE %s\n", zNew);
249249
--- src/stash.c
+++ src/stash.c
@@ -232,17 +232,17 @@
232 }else{
233 int rc;
234 if( isLink || isNewLink ){
235 rc = -1;
236 blob_zero(&b); /* because we reset it later */
237 //TODO(dchest): write something to disk?
238 }else{
239 rc = merge_3way(&a, zOPath, &b, &out);
240 blob_write_to_file(&out, zNPath);
241 //blob_reset(&out); //XXX(dchest): Need this?
 
242 }
243 file_setexe(zNPath, isExec);
244 if( rc ){
245 fossil_print("CONFLICT %s\n", zNew);
246 nConflict++;
247 }else{
248 fossil_print("MERGE %s\n", zNew);
249
--- src/stash.c
+++ src/stash.c
@@ -232,17 +232,17 @@
232 }else{
233 int rc;
234 if( isLink || isNewLink ){
235 rc = -1;
236 blob_zero(&b); /* because we reset it later */
237 fossil_print("***** Cannot merge symlink %s\n", zNew);
238 }else{
239 rc = merge_3way(&a, zOPath, &b, &out);
240 blob_write_to_file(&out, zNPath);
241 blob_reset(&out);
242 file_setexe(zNPath, isExec);
243 }
 
244 if( rc ){
245 fossil_print("CONFLICT %s\n", zNew);
246 nConflict++;
247 }else{
248 fossil_print("MERGE %s\n", zNew);
249

Keyboard Shortcuts

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