Fossil SCM

Allow multiple --tag options on the "commit" commandline. Change the meaning of the --bgcolor option to only change the background color for the single commit. The new --branchcolor option changes the background color persistently, as --bgcolor used to do. <b>Command-line compatibility break</b>.

drh 2012-03-20 14:44 trunk
Commit c4dc635e6b80e237cabef4b4b6d4dc793c0a0b7e
1 file changed +55 -17
+55 -17
--- src/checkin.c
+++ src/checkin.c
@@ -632,12 +632,13 @@
632632
int verifyDate, /* Verify that child is younger */
633633
Blob *pCksum, /* Repository checksum. May be 0 */
634634
const char *zDateOvrd, /* Date override. If 0 then use 'now' */
635635
const char *zUserOvrd, /* User override. If 0 then use g.zLogin */
636636
const char *zBranch, /* Branch name. May be 0 */
637
- const char *zBgColor, /* Background color. May be 0 */
638
- const char *zTag, /* Tag to apply to this check-in */
637
+ const char *zColor, /* One-time gackground color. May be 0 */
638
+ const char *zBrClr, /* Persistent branch color. May be 0 */
639
+ const char **azTag, /* Tags to apply to this check-in */
639640
int *pnFBcard /* Number of generated B- and F-cards */
640641
){
641642
char *zDate; /* Date of the check-in */
642643
char *zParentUuid; /* UUID of parent check-in */
643644
Blob filename; /* A single filename */
@@ -645,10 +646,11 @@
645646
Stmt q; /* Query of files changed */
646647
Stmt q2; /* Query of merge parents */
647648
Blob mcksum; /* Manifest checksum */
648649
ManifestFile *pFile; /* File from the baseline */
649650
int nFBcard = 0; /* Number of B-cards and F-cards */
651
+ int i; /* Loop counter */
650652
651653
assert( pBaseline==0 || pBaseline->zBaseline==0 );
652654
assert( pBaseline==0 || zBaselineUuid!=0 );
653655
blob_zero(pOut);
654656
zParentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid);
@@ -756,23 +758,31 @@
756758
757759
blob_appendf(pOut, "\n");
758760
if( pCksum ) blob_appendf(pOut, "R %b\n", pCksum);
759761
if( zBranch && zBranch[0] ){
760762
/* Set tags for the new branch */
761
- if( zBgColor && zBgColor[0] ){
762
- blob_appendf(pOut, "T *bgcolor * %F\n", zBgColor);
763
+ if( zBrClr && zBrClr[0] ){
764
+ zColor = 0;
765
+ blob_appendf(pOut, "T *bgcolor * %F\n", zBrClr);
763766
}
764767
blob_appendf(pOut, "T *branch * %F\n", zBranch);
765768
blob_appendf(pOut, "T *sym-%F *\n", zBranch);
766769
}
770
+ if( zColor && zColor[0] ){
771
+ /* One-time background color */
772
+ blob_appendf(pOut, "T +bgcolor * %F\n", zColor);
773
+ }
767774
if( g.markPrivate ){
768775
/* If this manifest is private, mark it as such */
769776
blob_appendf(pOut, "T +private *\n");
770777
}
771
- if( zTag && zTag[0] ){
772
- /* Add a symbolic tag to this check-in */
773
- blob_appendf(pOut, "T +sym-%F *\n", zTag);
778
+ if( azTag ){
779
+ for(i=0; azTag[i]; i++){
780
+ /* Add a symbolic tag to this check-in. The tag names have already
781
+ ** been sorted and converted using the %F format */
782
+ blob_appendf(pOut, "T +sym-%s *\n", azTag[i]);
783
+ }
774784
}
775785
if( zBranch && zBranch[0] ){
776786
/* For a new branch, cancel all prior propagating tags */
777787
Stmt q;
778788
db_prepare(&q,
@@ -781,12 +791,12 @@
781791
" AND tagtype==2 AND tagname GLOB 'sym-*'"
782792
" AND tagname!='sym-'||%Q"
783793
" ORDER BY tagname",
784794
vid, zBranch);
785795
while( db_step(&q)==SQLITE_ROW ){
786
- const char *zTag = db_column_text(&q, 0);
787
- blob_appendf(pOut, "T -%F *\n", zTag);
796
+ const char *zBrTag = db_column_text(&q, 0);
797
+ blob_appendf(pOut, "T -%F *\n", zBrTag);
788798
}
789799
db_finalize(&q);
790800
}
791801
blob_appendf(pOut, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
792802
md5sum_blob(pOut, &mcksum);
@@ -844,10 +854,19 @@
844854
}
845855
blob_reset(&ans);
846856
blob_reset(&fname);
847857
}
848858
}
859
+
860
+/*
861
+** qsort() comparison routine for an array of pointers to strings.
862
+*/
863
+static int tagCmp(const void *a, const void *b){
864
+ char **pA = (char**)a;
865
+ char **pB = (char**)b;
866
+ return fossil_strcmp(pA[0], pB[0]);
867
+}
849868
850869
/*
851870
** COMMAND: ci*
852871
** COMMAND: commit
853872
**
@@ -877,12 +896,13 @@
877896
**
878897
** the --tag option applies the symbolic tag name to the check-in.
879898
**
880899
** Options:
881900
** --baseline use a baseline manifest in the commit process
882
-** --bgcolor COLOR apply given COLOR to the branch
901
+** --bgcolor COLOR apply COLOR to this one check-in only
883902
** --branch NEW-BRANCH-NAME check in to this new branch
903
+** --branchcolor COLOR apply given COLOR to the branch
884904
** --comment|-m COMMENT-TEXT use COMMENT-TEXT as commit comment
885905
** --delta use a delta manifest in the commit process
886906
** --force|-f allow forking with this commit
887907
** --message-file|-M FILE read the commit comment from given file
888908
** --nosign do not attempt to sign this commit with gpg
@@ -908,15 +928,18 @@
908928
char *zManifestFile; /* Name of the manifest file */
909929
int useCksum; /* True if checksums should be computed and verified */
910930
int outputManifest; /* True to output "manifest" and "manifest.uuid" */
911931
int testRun; /* True for a test run. Debugging only */
912932
const char *zBranch; /* Create a new branch with this name */
913
- const char *zBgColor; /* Set background color when branching */
933
+ const char *zBrClr; /* Set background color when branching */
934
+ const char *zColor; /* One-time check-in color */
914935
const char *zDateOvrd; /* Override date string */
915936
const char *zUserOvrd; /* Override user name */
916937
const char *zComFile; /* Read commit message from this file */
917
- const char *zTag; /* Symbolic tag to apply to this check-in */
938
+ int nTag = 0; /* Number of --tag arguments */
939
+ const char *zTag; /* A single --tag argument */
940
+ const char **azTag = 0;/* Array of all --tag arguments */
918941
Blob manifest; /* Manifest in baseline form */
919942
Blob muuid; /* Manifest uuid */
920943
Blob cksum1, cksum2; /* Before and after commit checksums */
921944
Blob cksum1b; /* Checksum recorded in the manifest */
922945
int szD; /* Size of the delta manifest */
@@ -931,26 +954,39 @@
931954
}
932955
testRun = find_option("test",0,0)!=0;
933956
zComment = find_option("comment","m",1);
934957
forceFlag = find_option("force", "f", 0)!=0;
935958
zBranch = find_option("branch","b",1);
936
- zBgColor = find_option("bgcolor",0,1);
937
- zTag = find_option("tag",0,1);
959
+ zColor = find_option("bgcolor",0,1);
960
+ zBrClr = find_option("branchcolor",0,1);
961
+ while( (zTag = find_option("tag",0,1))!=0 ){
962
+ if( zTag[0]==0 ) continue;
963
+ azTag = fossil_realloc(azTag, sizeof(char*)*(nTag+2));
964
+ azTag[nTag++] = zTag;
965
+ azTag[nTag] = 0;
966
+ }
938967
zComFile = find_option("message-file", "M", 1);
939968
if( find_option("private",0,0) ){
940969
g.markPrivate = 1;
941970
if( zBranch==0 ) zBranch = "private";
942
- if( zBgColor==0 ) zBgColor = "#fec084"; /* Orange */
971
+ if( zBrClr==0 && zColor==0 ) zBrClr = "#fec084"; /* Orange */
943972
}
944973
zDateOvrd = find_option("date-override",0,1);
945974
zUserOvrd = find_option("user-override",0,1);
946975
db_must_be_within_tree();
947976
noSign = db_get_boolean("omitsign", 0)|noSign;
948977
if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
949978
useCksum = db_get_boolean("repo-cksum", 1);
950979
outputManifest = db_get_boolean("manifest", 0);
951980
verify_all_options();
981
+
982
+ /* Escape special characters in tags and put all tags in sorted order */
983
+ if( nTag ){
984
+ int i;
985
+ for(i=0; i<nTag; i++) azTag[i] = mprintf("%F", azTag[i]);
986
+ qsort((void*)azTag, nTag, sizeof(azTag[0]), tagCmp);
987
+ }
952988
953989
/* So that older versions of Fossil (that do not understand delta-
954990
** manifest) can continue to use this repository, do not create a new
955991
** delta-manifest unless this repository already contains one or more
956992
** delta-manifets, or unless the delta-manifest is explicitly requested
@@ -1126,11 +1162,12 @@
11261162
if( forceDelta ){
11271163
blob_zero(&manifest);
11281164
}else{
11291165
create_manifest(&manifest, 0, 0, &comment, vid,
11301166
!forceFlag, useCksum ? &cksum1 : 0,
1131
- zDateOvrd, zUserOvrd, zBranch, zBgColor, zTag, &szB);
1167
+ zDateOvrd, zUserOvrd, zBranch, zColor, zBrClr,
1168
+ azTag, &szB);
11321169
}
11331170
11341171
/* See if a delta-manifest would be more appropriate */
11351172
if( !forceBaseline ){
11361173
const char *zBaselineUuid;
@@ -1146,11 +1183,12 @@
11461183
}
11471184
if( pBaseline ){
11481185
Blob delta;
11491186
create_manifest(&delta, zBaselineUuid, pBaseline, &comment, vid,
11501187
!forceFlag, useCksum ? &cksum1 : 0,
1151
- zDateOvrd, zUserOvrd, zBranch, zBgColor, zTag, &szD);
1188
+ zDateOvrd, zUserOvrd, zBranch, zColor, zBrClr,
1189
+ azTag, &szD);
11521190
/*
11531191
** At this point, two manifests have been constructed, either of
11541192
** which would work for this checkin. The first manifest (held
11551193
** in the "manifest" variable) is a baseline manifest and the second
11561194
** (held in variable named "delta") is a delta manifest. The
11571195
--- src/checkin.c
+++ src/checkin.c
@@ -632,12 +632,13 @@
632 int verifyDate, /* Verify that child is younger */
633 Blob *pCksum, /* Repository checksum. May be 0 */
634 const char *zDateOvrd, /* Date override. If 0 then use 'now' */
635 const char *zUserOvrd, /* User override. If 0 then use g.zLogin */
636 const char *zBranch, /* Branch name. May be 0 */
637 const char *zBgColor, /* Background color. May be 0 */
638 const char *zTag, /* Tag to apply to this check-in */
 
639 int *pnFBcard /* Number of generated B- and F-cards */
640 ){
641 char *zDate; /* Date of the check-in */
642 char *zParentUuid; /* UUID of parent check-in */
643 Blob filename; /* A single filename */
@@ -645,10 +646,11 @@
645 Stmt q; /* Query of files changed */
646 Stmt q2; /* Query of merge parents */
647 Blob mcksum; /* Manifest checksum */
648 ManifestFile *pFile; /* File from the baseline */
649 int nFBcard = 0; /* Number of B-cards and F-cards */
 
650
651 assert( pBaseline==0 || pBaseline->zBaseline==0 );
652 assert( pBaseline==0 || zBaselineUuid!=0 );
653 blob_zero(pOut);
654 zParentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid);
@@ -756,23 +758,31 @@
756
757 blob_appendf(pOut, "\n");
758 if( pCksum ) blob_appendf(pOut, "R %b\n", pCksum);
759 if( zBranch && zBranch[0] ){
760 /* Set tags for the new branch */
761 if( zBgColor && zBgColor[0] ){
762 blob_appendf(pOut, "T *bgcolor * %F\n", zBgColor);
 
763 }
764 blob_appendf(pOut, "T *branch * %F\n", zBranch);
765 blob_appendf(pOut, "T *sym-%F *\n", zBranch);
766 }
 
 
 
 
767 if( g.markPrivate ){
768 /* If this manifest is private, mark it as such */
769 blob_appendf(pOut, "T +private *\n");
770 }
771 if( zTag && zTag[0] ){
772 /* Add a symbolic tag to this check-in */
773 blob_appendf(pOut, "T +sym-%F *\n", zTag);
 
 
 
774 }
775 if( zBranch && zBranch[0] ){
776 /* For a new branch, cancel all prior propagating tags */
777 Stmt q;
778 db_prepare(&q,
@@ -781,12 +791,12 @@
781 " AND tagtype==2 AND tagname GLOB 'sym-*'"
782 " AND tagname!='sym-'||%Q"
783 " ORDER BY tagname",
784 vid, zBranch);
785 while( db_step(&q)==SQLITE_ROW ){
786 const char *zTag = db_column_text(&q, 0);
787 blob_appendf(pOut, "T -%F *\n", zTag);
788 }
789 db_finalize(&q);
790 }
791 blob_appendf(pOut, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
792 md5sum_blob(pOut, &mcksum);
@@ -844,10 +854,19 @@
844 }
845 blob_reset(&ans);
846 blob_reset(&fname);
847 }
848 }
 
 
 
 
 
 
 
 
 
849
850 /*
851 ** COMMAND: ci*
852 ** COMMAND: commit
853 **
@@ -877,12 +896,13 @@
877 **
878 ** the --tag option applies the symbolic tag name to the check-in.
879 **
880 ** Options:
881 ** --baseline use a baseline manifest in the commit process
882 ** --bgcolor COLOR apply given COLOR to the branch
883 ** --branch NEW-BRANCH-NAME check in to this new branch
 
884 ** --comment|-m COMMENT-TEXT use COMMENT-TEXT as commit comment
885 ** --delta use a delta manifest in the commit process
886 ** --force|-f allow forking with this commit
887 ** --message-file|-M FILE read the commit comment from given file
888 ** --nosign do not attempt to sign this commit with gpg
@@ -908,15 +928,18 @@
908 char *zManifestFile; /* Name of the manifest file */
909 int useCksum; /* True if checksums should be computed and verified */
910 int outputManifest; /* True to output "manifest" and "manifest.uuid" */
911 int testRun; /* True for a test run. Debugging only */
912 const char *zBranch; /* Create a new branch with this name */
913 const char *zBgColor; /* Set background color when branching */
 
914 const char *zDateOvrd; /* Override date string */
915 const char *zUserOvrd; /* Override user name */
916 const char *zComFile; /* Read commit message from this file */
917 const char *zTag; /* Symbolic tag to apply to this check-in */
 
 
918 Blob manifest; /* Manifest in baseline form */
919 Blob muuid; /* Manifest uuid */
920 Blob cksum1, cksum2; /* Before and after commit checksums */
921 Blob cksum1b; /* Checksum recorded in the manifest */
922 int szD; /* Size of the delta manifest */
@@ -931,26 +954,39 @@
931 }
932 testRun = find_option("test",0,0)!=0;
933 zComment = find_option("comment","m",1);
934 forceFlag = find_option("force", "f", 0)!=0;
935 zBranch = find_option("branch","b",1);
936 zBgColor = find_option("bgcolor",0,1);
937 zTag = find_option("tag",0,1);
 
 
 
 
 
 
938 zComFile = find_option("message-file", "M", 1);
939 if( find_option("private",0,0) ){
940 g.markPrivate = 1;
941 if( zBranch==0 ) zBranch = "private";
942 if( zBgColor==0 ) zBgColor = "#fec084"; /* Orange */
943 }
944 zDateOvrd = find_option("date-override",0,1);
945 zUserOvrd = find_option("user-override",0,1);
946 db_must_be_within_tree();
947 noSign = db_get_boolean("omitsign", 0)|noSign;
948 if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
949 useCksum = db_get_boolean("repo-cksum", 1);
950 outputManifest = db_get_boolean("manifest", 0);
951 verify_all_options();
 
 
 
 
 
 
 
952
953 /* So that older versions of Fossil (that do not understand delta-
954 ** manifest) can continue to use this repository, do not create a new
955 ** delta-manifest unless this repository already contains one or more
956 ** delta-manifets, or unless the delta-manifest is explicitly requested
@@ -1126,11 +1162,12 @@
1126 if( forceDelta ){
1127 blob_zero(&manifest);
1128 }else{
1129 create_manifest(&manifest, 0, 0, &comment, vid,
1130 !forceFlag, useCksum ? &cksum1 : 0,
1131 zDateOvrd, zUserOvrd, zBranch, zBgColor, zTag, &szB);
 
1132 }
1133
1134 /* See if a delta-manifest would be more appropriate */
1135 if( !forceBaseline ){
1136 const char *zBaselineUuid;
@@ -1146,11 +1183,12 @@
1146 }
1147 if( pBaseline ){
1148 Blob delta;
1149 create_manifest(&delta, zBaselineUuid, pBaseline, &comment, vid,
1150 !forceFlag, useCksum ? &cksum1 : 0,
1151 zDateOvrd, zUserOvrd, zBranch, zBgColor, zTag, &szD);
 
1152 /*
1153 ** At this point, two manifests have been constructed, either of
1154 ** which would work for this checkin. The first manifest (held
1155 ** in the "manifest" variable) is a baseline manifest and the second
1156 ** (held in variable named "delta") is a delta manifest. The
1157
--- src/checkin.c
+++ src/checkin.c
@@ -632,12 +632,13 @@
632 int verifyDate, /* Verify that child is younger */
633 Blob *pCksum, /* Repository checksum. May be 0 */
634 const char *zDateOvrd, /* Date override. If 0 then use 'now' */
635 const char *zUserOvrd, /* User override. If 0 then use g.zLogin */
636 const char *zBranch, /* Branch name. May be 0 */
637 const char *zColor, /* One-time gackground color. May be 0 */
638 const char *zBrClr, /* Persistent branch color. May be 0 */
639 const char **azTag, /* Tags to apply to this check-in */
640 int *pnFBcard /* Number of generated B- and F-cards */
641 ){
642 char *zDate; /* Date of the check-in */
643 char *zParentUuid; /* UUID of parent check-in */
644 Blob filename; /* A single filename */
@@ -645,10 +646,11 @@
646 Stmt q; /* Query of files changed */
647 Stmt q2; /* Query of merge parents */
648 Blob mcksum; /* Manifest checksum */
649 ManifestFile *pFile; /* File from the baseline */
650 int nFBcard = 0; /* Number of B-cards and F-cards */
651 int i; /* Loop counter */
652
653 assert( pBaseline==0 || pBaseline->zBaseline==0 );
654 assert( pBaseline==0 || zBaselineUuid!=0 );
655 blob_zero(pOut);
656 zParentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid);
@@ -756,23 +758,31 @@
758
759 blob_appendf(pOut, "\n");
760 if( pCksum ) blob_appendf(pOut, "R %b\n", pCksum);
761 if( zBranch && zBranch[0] ){
762 /* Set tags for the new branch */
763 if( zBrClr && zBrClr[0] ){
764 zColor = 0;
765 blob_appendf(pOut, "T *bgcolor * %F\n", zBrClr);
766 }
767 blob_appendf(pOut, "T *branch * %F\n", zBranch);
768 blob_appendf(pOut, "T *sym-%F *\n", zBranch);
769 }
770 if( zColor && zColor[0] ){
771 /* One-time background color */
772 blob_appendf(pOut, "T +bgcolor * %F\n", zColor);
773 }
774 if( g.markPrivate ){
775 /* If this manifest is private, mark it as such */
776 blob_appendf(pOut, "T +private *\n");
777 }
778 if( azTag ){
779 for(i=0; azTag[i]; i++){
780 /* Add a symbolic tag to this check-in. The tag names have already
781 ** been sorted and converted using the %F format */
782 blob_appendf(pOut, "T +sym-%s *\n", azTag[i]);
783 }
784 }
785 if( zBranch && zBranch[0] ){
786 /* For a new branch, cancel all prior propagating tags */
787 Stmt q;
788 db_prepare(&q,
@@ -781,12 +791,12 @@
791 " AND tagtype==2 AND tagname GLOB 'sym-*'"
792 " AND tagname!='sym-'||%Q"
793 " ORDER BY tagname",
794 vid, zBranch);
795 while( db_step(&q)==SQLITE_ROW ){
796 const char *zBrTag = db_column_text(&q, 0);
797 blob_appendf(pOut, "T -%F *\n", zBrTag);
798 }
799 db_finalize(&q);
800 }
801 blob_appendf(pOut, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
802 md5sum_blob(pOut, &mcksum);
@@ -844,10 +854,19 @@
854 }
855 blob_reset(&ans);
856 blob_reset(&fname);
857 }
858 }
859
860 /*
861 ** qsort() comparison routine for an array of pointers to strings.
862 */
863 static int tagCmp(const void *a, const void *b){
864 char **pA = (char**)a;
865 char **pB = (char**)b;
866 return fossil_strcmp(pA[0], pB[0]);
867 }
868
869 /*
870 ** COMMAND: ci*
871 ** COMMAND: commit
872 **
@@ -877,12 +896,13 @@
896 **
897 ** the --tag option applies the symbolic tag name to the check-in.
898 **
899 ** Options:
900 ** --baseline use a baseline manifest in the commit process
901 ** --bgcolor COLOR apply COLOR to this one check-in only
902 ** --branch NEW-BRANCH-NAME check in to this new branch
903 ** --branchcolor COLOR apply given COLOR to the branch
904 ** --comment|-m COMMENT-TEXT use COMMENT-TEXT as commit comment
905 ** --delta use a delta manifest in the commit process
906 ** --force|-f allow forking with this commit
907 ** --message-file|-M FILE read the commit comment from given file
908 ** --nosign do not attempt to sign this commit with gpg
@@ -908,15 +928,18 @@
928 char *zManifestFile; /* Name of the manifest file */
929 int useCksum; /* True if checksums should be computed and verified */
930 int outputManifest; /* True to output "manifest" and "manifest.uuid" */
931 int testRun; /* True for a test run. Debugging only */
932 const char *zBranch; /* Create a new branch with this name */
933 const char *zBrClr; /* Set background color when branching */
934 const char *zColor; /* One-time check-in color */
935 const char *zDateOvrd; /* Override date string */
936 const char *zUserOvrd; /* Override user name */
937 const char *zComFile; /* Read commit message from this file */
938 int nTag = 0; /* Number of --tag arguments */
939 const char *zTag; /* A single --tag argument */
940 const char **azTag = 0;/* Array of all --tag arguments */
941 Blob manifest; /* Manifest in baseline form */
942 Blob muuid; /* Manifest uuid */
943 Blob cksum1, cksum2; /* Before and after commit checksums */
944 Blob cksum1b; /* Checksum recorded in the manifest */
945 int szD; /* Size of the delta manifest */
@@ -931,26 +954,39 @@
954 }
955 testRun = find_option("test",0,0)!=0;
956 zComment = find_option("comment","m",1);
957 forceFlag = find_option("force", "f", 0)!=0;
958 zBranch = find_option("branch","b",1);
959 zColor = find_option("bgcolor",0,1);
960 zBrClr = find_option("branchcolor",0,1);
961 while( (zTag = find_option("tag",0,1))!=0 ){
962 if( zTag[0]==0 ) continue;
963 azTag = fossil_realloc(azTag, sizeof(char*)*(nTag+2));
964 azTag[nTag++] = zTag;
965 azTag[nTag] = 0;
966 }
967 zComFile = find_option("message-file", "M", 1);
968 if( find_option("private",0,0) ){
969 g.markPrivate = 1;
970 if( zBranch==0 ) zBranch = "private";
971 if( zBrClr==0 && zColor==0 ) zBrClr = "#fec084"; /* Orange */
972 }
973 zDateOvrd = find_option("date-override",0,1);
974 zUserOvrd = find_option("user-override",0,1);
975 db_must_be_within_tree();
976 noSign = db_get_boolean("omitsign", 0)|noSign;
977 if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
978 useCksum = db_get_boolean("repo-cksum", 1);
979 outputManifest = db_get_boolean("manifest", 0);
980 verify_all_options();
981
982 /* Escape special characters in tags and put all tags in sorted order */
983 if( nTag ){
984 int i;
985 for(i=0; i<nTag; i++) azTag[i] = mprintf("%F", azTag[i]);
986 qsort((void*)azTag, nTag, sizeof(azTag[0]), tagCmp);
987 }
988
989 /* So that older versions of Fossil (that do not understand delta-
990 ** manifest) can continue to use this repository, do not create a new
991 ** delta-manifest unless this repository already contains one or more
992 ** delta-manifets, or unless the delta-manifest is explicitly requested
@@ -1126,11 +1162,12 @@
1162 if( forceDelta ){
1163 blob_zero(&manifest);
1164 }else{
1165 create_manifest(&manifest, 0, 0, &comment, vid,
1166 !forceFlag, useCksum ? &cksum1 : 0,
1167 zDateOvrd, zUserOvrd, zBranch, zColor, zBrClr,
1168 azTag, &szB);
1169 }
1170
1171 /* See if a delta-manifest would be more appropriate */
1172 if( !forceBaseline ){
1173 const char *zBaselineUuid;
@@ -1146,11 +1183,12 @@
1183 }
1184 if( pBaseline ){
1185 Blob delta;
1186 create_manifest(&delta, zBaselineUuid, pBaseline, &comment, vid,
1187 !forceFlag, useCksum ? &cksum1 : 0,
1188 zDateOvrd, zUserOvrd, zBranch, zColor, zBrClr,
1189 azTag, &szD);
1190 /*
1191 ** At this point, two manifests have been constructed, either of
1192 ** which would work for this checkin. The first manifest (held
1193 ** in the "manifest" variable) is a baseline manifest and the second
1194 ** (held in variable named "delta") is a delta manifest. The
1195

Keyboard Shortcuts

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