Fossil SCM
Abort the update if autosync fails.
Commit
8478bfe27e7733053f324d8c21e0f6f635185277
Parent
21f6dc9571321ad…
1 file changed
+3
-1
+3
-1
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -127,11 +127,13 @@ | ||
| 127 | 127 | capture_case_sensitive_option(); |
| 128 | 128 | db_must_be_within_tree(); |
| 129 | 129 | vid = db_lget_int("checkout", 0); |
| 130 | 130 | user_select(); |
| 131 | 131 | if( !dryRunFlag && !internalUpdate ){ |
| 132 | - autosync(SYNC_PULL + SYNC_VERBOSE*verboseFlag); | |
| 132 | + if( autosync(SYNC_PULL + SYNC_VERBOSE*verboseFlag) ){ | |
| 133 | + fossil_fatal("Autosync failed, cannot update"); | |
| 134 | + } | |
| 133 | 135 | } |
| 134 | 136 | |
| 135 | 137 | /* Create any empty directories now, as well as after the update, |
| 136 | 138 | ** so changes in settings are reflected now */ |
| 137 | 139 | if( !dryRunFlag ) ensure_empty_dirs_created(); |
| 138 | 140 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -127,11 +127,13 @@ | |
| 127 | capture_case_sensitive_option(); |
| 128 | db_must_be_within_tree(); |
| 129 | vid = db_lget_int("checkout", 0); |
| 130 | user_select(); |
| 131 | if( !dryRunFlag && !internalUpdate ){ |
| 132 | autosync(SYNC_PULL + SYNC_VERBOSE*verboseFlag); |
| 133 | } |
| 134 | |
| 135 | /* Create any empty directories now, as well as after the update, |
| 136 | ** so changes in settings are reflected now */ |
| 137 | if( !dryRunFlag ) ensure_empty_dirs_created(); |
| 138 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -127,11 +127,13 @@ | |
| 127 | capture_case_sensitive_option(); |
| 128 | db_must_be_within_tree(); |
| 129 | vid = db_lget_int("checkout", 0); |
| 130 | user_select(); |
| 131 | if( !dryRunFlag && !internalUpdate ){ |
| 132 | if( autosync(SYNC_PULL + SYNC_VERBOSE*verboseFlag) ){ |
| 133 | fossil_fatal("Autosync failed, cannot update"); |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | /* Create any empty directories now, as well as after the update, |
| 138 | ** so changes in settings are reflected now */ |
| 139 | if( !dryRunFlag ) ensure_empty_dirs_created(); |
| 140 |