Fossil SCM
Print description of conflict when 'stash apply' cannot merge a symlink and a regular file.
Commit
bca6924e5ff67a5ffa89517a81a357d0b4cef024
Parent
73443aa7f8665b0…
1 file changed
+3
-3
+3
-3
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -232,17 +232,17 @@ | ||
| 232 | 232 | }else{ |
| 233 | 233 | int rc; |
| 234 | 234 | if( isLink || isNewLink ){ |
| 235 | 235 | rc = -1; |
| 236 | 236 | blob_zero(&b); /* because we reset it later */ |
| 237 | - //TODO(dchest): write something to disk? | |
| 237 | + fossil_print("***** Cannot merge symlink %s\n", zNew); | |
| 238 | 238 | }else{ |
| 239 | 239 | rc = merge_3way(&a, zOPath, &b, &out); |
| 240 | 240 | blob_write_to_file(&out, zNPath); |
| 241 | - //blob_reset(&out); //XXX(dchest): Need this? | |
| 241 | + blob_reset(&out); | |
| 242 | + file_setexe(zNPath, isExec); | |
| 242 | 243 | } |
| 243 | - file_setexe(zNPath, isExec); | |
| 244 | 244 | if( rc ){ |
| 245 | 245 | fossil_print("CONFLICT %s\n", zNew); |
| 246 | 246 | nConflict++; |
| 247 | 247 | }else{ |
| 248 | 248 | fossil_print("MERGE %s\n", zNew); |
| 249 | 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 | //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 |