Fossil SCM

Fix the handling of manifest files for the "tag" and "amend" commands.

drh 2022-10-19 17:22 branch-1.37
Commit a23356042452172818be862ce0676c55000b62508db07f92b4e979d99a9e5bb9
+3
--- src/info.c
+++ src/info.c
@@ -3016,6 +3016,9 @@
30163016
if( fHide && !fHasHidden ) hide_branch();
30173017
if( fClose && !fHasClosed ) close_leaf(rid);
30183018
if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
30193019
apply_newtags(&ctrl, rid, zUuid);
30203020
show_common_info(rid, "uuid:", 1, 0);
3021
+ if( g.localOpen ){
3022
+ manifest_to_disk(rid);
3023
+ }
30213024
}
30223025
--- src/info.c
+++ src/info.c
@@ -3016,6 +3016,9 @@
3016 if( fHide && !fHasHidden ) hide_branch();
3017 if( fClose && !fHasClosed ) close_leaf(rid);
3018 if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
3019 apply_newtags(&ctrl, rid, zUuid);
3020 show_common_info(rid, "uuid:", 1, 0);
 
 
 
3021 }
3022
--- src/info.c
+++ src/info.c
@@ -3016,6 +3016,9 @@
3016 if( fHide && !fHasHidden ) hide_branch();
3017 if( fClose && !fHasClosed ) close_leaf(rid);
3018 if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
3019 apply_newtags(&ctrl, rid, zUuid);
3020 show_common_info(rid, "uuid:", 1, 0);
3021 if( g.localOpen ){
3022 manifest_to_disk(rid);
3023 }
3024 }
3025
+3
--- src/info.c
+++ src/info.c
@@ -3016,6 +3016,9 @@
30163016
if( fHide && !fHasHidden ) hide_branch();
30173017
if( fClose && !fHasClosed ) close_leaf(rid);
30183018
if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
30193019
apply_newtags(&ctrl, rid, zUuid);
30203020
show_common_info(rid, "uuid:", 1, 0);
3021
+ if( g.localOpen ){
3022
+ manifest_to_disk(rid);
3023
+ }
30213024
}
30223025
--- src/info.c
+++ src/info.c
@@ -3016,6 +3016,9 @@
3016 if( fHide && !fHasHidden ) hide_branch();
3017 if( fClose && !fHasClosed ) close_leaf(rid);
3018 if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
3019 apply_newtags(&ctrl, rid, zUuid);
3020 show_common_info(rid, "uuid:", 1, 0);
 
 
 
3021 }
3022
--- src/info.c
+++ src/info.c
@@ -3016,6 +3016,9 @@
3016 if( fHide && !fHasHidden ) hide_branch();
3017 if( fClose && !fHasClosed ) close_leaf(rid);
3018 if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
3019 apply_newtags(&ctrl, rid, zUuid);
3020 show_common_info(rid, "uuid:", 1, 0);
3021 if( g.localOpen ){
3022 manifest_to_disk(rid);
3023 }
3024 }
3025
+4 -1
--- src/tag.c
+++ src/tag.c
@@ -359,11 +359,13 @@
359359
}else{
360360
nrid = content_put(&ctrl);
361361
manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS);
362362
}
363363
assert( blob_is_reset(&ctrl) );
364
- manifest_to_disk(rid);
364
+ if( g.localOpen ){
365
+ manifest_to_disk(rid);
366
+ }
365367
}
366368
367369
/*
368370
** COMMAND: tag
369371
**
@@ -616,10 +618,11 @@
616618
Blob value;
617619
char *zUuid;
618620
int dryRun = 0;
619621
620622
if( find_option("dryrun","n",0)!=0 ) dryRun = TAG_ADD_DRYRUN;
623
+ db_find_and_open_repository(0, 0);
621624
db_find_and_open_repository(0, 0);
622625
verify_all_options();
623626
if( g.argc<4 ){
624627
usage("reparent [OPTIONS] PARENT ...");
625628
}
626629
--- src/tag.c
+++ src/tag.c
@@ -359,11 +359,13 @@
359 }else{
360 nrid = content_put(&ctrl);
361 manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS);
362 }
363 assert( blob_is_reset(&ctrl) );
364 manifest_to_disk(rid);
 
 
365 }
366
367 /*
368 ** COMMAND: tag
369 **
@@ -616,10 +618,11 @@
616 Blob value;
617 char *zUuid;
618 int dryRun = 0;
619
620 if( find_option("dryrun","n",0)!=0 ) dryRun = TAG_ADD_DRYRUN;
 
621 db_find_and_open_repository(0, 0);
622 verify_all_options();
623 if( g.argc<4 ){
624 usage("reparent [OPTIONS] PARENT ...");
625 }
626
--- src/tag.c
+++ src/tag.c
@@ -359,11 +359,13 @@
359 }else{
360 nrid = content_put(&ctrl);
361 manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS);
362 }
363 assert( blob_is_reset(&ctrl) );
364 if( g.localOpen ){
365 manifest_to_disk(rid);
366 }
367 }
368
369 /*
370 ** COMMAND: tag
371 **
@@ -616,10 +618,11 @@
618 Blob value;
619 char *zUuid;
620 int dryRun = 0;
621
622 if( find_option("dryrun","n",0)!=0 ) dryRun = TAG_ADD_DRYRUN;
623 db_find_and_open_repository(0, 0);
624 db_find_and_open_repository(0, 0);
625 verify_all_options();
626 if( g.argc<4 ){
627 usage("reparent [OPTIONS] PARENT ...");
628 }
629
+4 -1
--- src/tag.c
+++ src/tag.c
@@ -359,11 +359,13 @@
359359
}else{
360360
nrid = content_put(&ctrl);
361361
manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS);
362362
}
363363
assert( blob_is_reset(&ctrl) );
364
- manifest_to_disk(rid);
364
+ if( g.localOpen ){
365
+ manifest_to_disk(rid);
366
+ }
365367
}
366368
367369
/*
368370
** COMMAND: tag
369371
**
@@ -616,10 +618,11 @@
616618
Blob value;
617619
char *zUuid;
618620
int dryRun = 0;
619621
620622
if( find_option("dryrun","n",0)!=0 ) dryRun = TAG_ADD_DRYRUN;
623
+ db_find_and_open_repository(0, 0);
621624
db_find_and_open_repository(0, 0);
622625
verify_all_options();
623626
if( g.argc<4 ){
624627
usage("reparent [OPTIONS] PARENT ...");
625628
}
626629
--- src/tag.c
+++ src/tag.c
@@ -359,11 +359,13 @@
359 }else{
360 nrid = content_put(&ctrl);
361 manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS);
362 }
363 assert( blob_is_reset(&ctrl) );
364 manifest_to_disk(rid);
 
 
365 }
366
367 /*
368 ** COMMAND: tag
369 **
@@ -616,10 +618,11 @@
616 Blob value;
617 char *zUuid;
618 int dryRun = 0;
619
620 if( find_option("dryrun","n",0)!=0 ) dryRun = TAG_ADD_DRYRUN;
 
621 db_find_and_open_repository(0, 0);
622 verify_all_options();
623 if( g.argc<4 ){
624 usage("reparent [OPTIONS] PARENT ...");
625 }
626
--- src/tag.c
+++ src/tag.c
@@ -359,11 +359,13 @@
359 }else{
360 nrid = content_put(&ctrl);
361 manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS);
362 }
363 assert( blob_is_reset(&ctrl) );
364 if( g.localOpen ){
365 manifest_to_disk(rid);
366 }
367 }
368
369 /*
370 ** COMMAND: tag
371 **
@@ -616,10 +618,11 @@
618 Blob value;
619 char *zUuid;
620 int dryRun = 0;
621
622 if( find_option("dryrun","n",0)!=0 ) dryRun = TAG_ADD_DRYRUN;
623 db_find_and_open_repository(0, 0);
624 db_find_and_open_repository(0, 0);
625 verify_all_options();
626 if( g.argc<4 ){
627 usage("reparent [OPTIONS] PARENT ...");
628 }
629

Keyboard Shortcuts

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