Fossil SCM
Use the preferred case for the destination name in the "fossil mv" command.
Commit
859b00b77698c436a2ccd5a9338ec2c7332e37ae067510396e3088b966213e64
Parent
abb54cb0cf1ee96…
1 file changed
+2
-1
+2
-1
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -1057,11 +1057,11 @@ | ||
| 1057 | 1057 | fossil_fatal("no check-out in which to rename files"); |
| 1058 | 1058 | } |
| 1059 | 1059 | if( g.argc<4 ){ |
| 1060 | 1060 | usage("OLDNAME NEWNAME"); |
| 1061 | 1061 | } |
| 1062 | - zDest = g.argv[g.argc-1]; | |
| 1062 | + zDest = file_case_preferred_name(".",g.argv[g.argc-1]); | |
| 1063 | 1063 | db_begin_transaction(); |
| 1064 | 1064 | if( g.argv[1][0]=='r' ){ /* i.e. "rename" */ |
| 1065 | 1065 | moveFiles = 0; |
| 1066 | 1066 | }else if( softFlag ){ |
| 1067 | 1067 | moveFiles = 0; |
| @@ -1143,14 +1143,15 @@ | ||
| 1143 | 1143 | } |
| 1144 | 1144 | db_finalize(&q); |
| 1145 | 1145 | undo_reset(); |
| 1146 | 1146 | db_end_transaction(0); |
| 1147 | 1147 | if( moveFiles ) process_files_to_move(dryRunFlag); |
| 1148 | + fossil_free(zDest); | |
| 1148 | 1149 | } |
| 1149 | 1150 | |
| 1150 | 1151 | /* |
| 1151 | 1152 | ** Function for stash_apply to be able to restore a file and indicate |
| 1152 | 1153 | ** newly ADDED state. |
| 1153 | 1154 | */ |
| 1154 | 1155 | int stash_add_files_in_sfile(int vid){ |
| 1155 | 1156 | return add_files_in_sfile(vid); |
| 1156 | 1157 | } |
| 1157 | 1158 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -1057,11 +1057,11 @@ | |
| 1057 | fossil_fatal("no check-out in which to rename files"); |
| 1058 | } |
| 1059 | if( g.argc<4 ){ |
| 1060 | usage("OLDNAME NEWNAME"); |
| 1061 | } |
| 1062 | zDest = g.argv[g.argc-1]; |
| 1063 | db_begin_transaction(); |
| 1064 | if( g.argv[1][0]=='r' ){ /* i.e. "rename" */ |
| 1065 | moveFiles = 0; |
| 1066 | }else if( softFlag ){ |
| 1067 | moveFiles = 0; |
| @@ -1143,14 +1143,15 @@ | |
| 1143 | } |
| 1144 | db_finalize(&q); |
| 1145 | undo_reset(); |
| 1146 | db_end_transaction(0); |
| 1147 | if( moveFiles ) process_files_to_move(dryRunFlag); |
| 1148 | } |
| 1149 | |
| 1150 | /* |
| 1151 | ** Function for stash_apply to be able to restore a file and indicate |
| 1152 | ** newly ADDED state. |
| 1153 | */ |
| 1154 | int stash_add_files_in_sfile(int vid){ |
| 1155 | return add_files_in_sfile(vid); |
| 1156 | } |
| 1157 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -1057,11 +1057,11 @@ | |
| 1057 | fossil_fatal("no check-out in which to rename files"); |
| 1058 | } |
| 1059 | if( g.argc<4 ){ |
| 1060 | usage("OLDNAME NEWNAME"); |
| 1061 | } |
| 1062 | zDest = file_case_preferred_name(".",g.argv[g.argc-1]); |
| 1063 | db_begin_transaction(); |
| 1064 | if( g.argv[1][0]=='r' ){ /* i.e. "rename" */ |
| 1065 | moveFiles = 0; |
| 1066 | }else if( softFlag ){ |
| 1067 | moveFiles = 0; |
| @@ -1143,14 +1143,15 @@ | |
| 1143 | } |
| 1144 | db_finalize(&q); |
| 1145 | undo_reset(); |
| 1146 | db_end_transaction(0); |
| 1147 | if( moveFiles ) process_files_to_move(dryRunFlag); |
| 1148 | fossil_free(zDest); |
| 1149 | } |
| 1150 | |
| 1151 | /* |
| 1152 | ** Function for stash_apply to be able to restore a file and indicate |
| 1153 | ** newly ADDED state. |
| 1154 | */ |
| 1155 | int stash_add_files_in_sfile(int vid){ |
| 1156 | return add_files_in_sfile(vid); |
| 1157 | } |
| 1158 |