Fossil SCM

Merged uuid-to-hash branch down, causing all public interfaces except for those exceptions now documented in www/hashes.md to use something other than "UUID" to mean "artifact hash" or one of its more specific derivative terms. (e.g. Commit ID)

wyoung 2020-05-28 19:52 trunk merge
Commit 8ad5e4690854a81a4666fa67a6b2d4b0790d0a6b488e87926649a11a7adee4d1
--- skins/blitz/ticket.txt
+++ skins/blitz/ticket.txt
@@ -1,8 +1,8 @@
11
<h4>$<title></h4>
22
<table class="tktDsp">
3
-<tr><td class="tktDspLabel">Ticket&nbsp;UUID</td>
3
+<tr><td class="tktDspLabel">Ticket&nbsp;Hash</td>
44
<th1>
55
if {[info exists tkt_uuid]} {
66
if {[hascap s]} {
77
html "<td class='tktDspValue' colspan='3'>$tkt_uuid "
88
html "($tkt_id)</td></tr>\n"
99
--- skins/blitz/ticket.txt
+++ skins/blitz/ticket.txt
@@ -1,8 +1,8 @@
1 <h4>$<title></h4>
2 <table class="tktDsp">
3 <tr><td class="tktDspLabel">Ticket&nbsp;UUID</td>
4 <th1>
5 if {[info exists tkt_uuid]} {
6 if {[hascap s]} {
7 html "<td class='tktDspValue' colspan='3'>$tkt_uuid "
8 html "($tkt_id)</td></tr>\n"
9
--- skins/blitz/ticket.txt
+++ skins/blitz/ticket.txt
@@ -1,8 +1,8 @@
1 <h4>$<title></h4>
2 <table class="tktDsp">
3 <tr><td class="tktDspLabel">Ticket&nbsp;Hash</td>
4 <th1>
5 if {[info exists tkt_uuid]} {
6 if {[hascap s]} {
7 html "<td class='tktDspValue' colspan='3'>$tkt_uuid "
8 html "($tkt_id)</td></tr>\n"
9
--- skins/blitz_no_logo/ticket.txt
+++ skins/blitz_no_logo/ticket.txt
@@ -1,8 +1,8 @@
11
<h4>$<title></h4>
22
<table class="tktDsp">
3
-<tr><td class="tktDspLabel">Ticket&nbsp;UUID</td>
3
+<tr><td class="tktDspLabel">Ticket&nbsp;Hash</td>
44
<th1>
55
if {[info exists tkt_uuid]} {
66
if {[hascap s]} {
77
html "<td class='tktDspValue' colspan='3'>$tkt_uuid "
88
html "($tkt_id)</td></tr>\n"
99
--- skins/blitz_no_logo/ticket.txt
+++ skins/blitz_no_logo/ticket.txt
@@ -1,8 +1,8 @@
1 <h4>$<title></h4>
2 <table class="tktDsp">
3 <tr><td class="tktDspLabel">Ticket&nbsp;UUID</td>
4 <th1>
5 if {[info exists tkt_uuid]} {
6 if {[hascap s]} {
7 html "<td class='tktDspValue' colspan='3'>$tkt_uuid "
8 html "($tkt_id)</td></tr>\n"
9
--- skins/blitz_no_logo/ticket.txt
+++ skins/blitz_no_logo/ticket.txt
@@ -1,8 +1,8 @@
1 <h4>$<title></h4>
2 <table class="tktDsp">
3 <tr><td class="tktDspLabel">Ticket&nbsp;Hash</td>
4 <th1>
5 if {[info exists tkt_uuid]} {
6 if {[hascap s]} {
7 html "<td class='tktDspValue' colspan='3'>$tkt_uuid "
8 html "($tkt_id)</td></tr>\n"
9
+19 -15
--- src/attach.c
+++ src/attach.c
@@ -23,19 +23,22 @@
2323
2424
/*
2525
** WEBPAGE: attachlist
2626
** List attachments.
2727
**
28
-** tkt=TICKETUUID
28
+** tkt=HASH
2929
** page=WIKIPAGE
30
+** technote=HASH
31
+**
32
+** At most one of technote=, tkt= or page= may be supplied.
33
+**
34
+** If none are given, all attachments are listed. If one is given, only
35
+** attachments for the designated technote, ticket or wiki page are shown.
3036
**
31
-** At most one of technote=, tkt= or page= are supplied.
32
-** If none is given, all attachments are listed. If one is given,
33
-** only attachments for the designated technote, ticket or wiki page
34
-** are shown. TECHNOTEUUID and TICKETUUID may be just a prefix of the
35
-** relevant technical note or ticket, in which case all attachments
36
-** of all technical notes or tickets with the prefix will be listed.
37
+** HASH may be just a prefix of the relevant technical note or ticket
38
+** artifact hash, in which case all attachments of all technical notes or
39
+** tickets with the prefix will be listed.
3740
*/
3841
void attachlist_page(void){
3942
const char *zPage = P("page");
4043
const char *zTkt = P("tkt");
4144
const char *zTechNote = P("technote");
@@ -152,15 +155,16 @@
152155
** WEBPAGE: attachdownload
153156
** WEBPAGE: attachimage
154157
** WEBPAGE: attachview
155158
**
156159
** Download or display an attachment.
160
+**
157161
** Query parameters:
158162
**
159
-** tkt=TICKETUUID
163
+** tkt=HASH
160164
** page=WIKIPAGE
161
-** technote=TECHNOTEUUID
165
+** technote=HASH
162166
** file=FILENAME
163167
** attachid=ID
164168
**
165169
*/
166170
void attachview_page(void){
@@ -250,11 +254,11 @@
250254
/*
251255
** Commit a new attachment into the repository
252256
*/
253257
void attach_commit(
254258
const char *zName, /* The filename of the attachment */
255
- const char *zTarget, /* The artifact uuid to attach to */
259
+ const char *zTarget, /* The artifact hash to attach to */
256260
const char *aContent, /* The content of the attachment */
257261
int szContent, /* The length of the attachment */
258262
int needModerator, /* Moderate the attachment? */
259263
const char *zComment /* The comment for the attachment */
260264
){
@@ -305,13 +309,13 @@
305309
306310
/*
307311
** WEBPAGE: attachadd
308312
** Add a new attachment.
309313
**
310
-** tkt=TICKETUUID
314
+** tkt=HASH
311315
** page=WIKIPAGE
312
-** technote=TECHNOTEUUID
316
+** technote=HASH
313317
** from=URL
314318
**
315319
*/
316320
void attachadd_page(void){
317321
const char *zPage = P("page");
@@ -420,14 +424,14 @@
420424
*/
421425
void ainfo_page(void){
422426
int rid; /* RID for the control artifact */
423427
int ridSrc; /* RID for the attached file */
424428
char *zDate; /* Date attached */
425
- const char *zUuid; /* UUID of the control artifact */
429
+ const char *zUuid; /* Hash of the control artifact */
426430
Manifest *pAttach; /* Parse of the control artifact */
427431
const char *zTarget; /* Wiki, ticket or tech note attached to */
428
- const char *zSrc; /* UUID of the attached file */
432
+ const char *zSrc; /* Hash of the attached file */
429433
const char *zName; /* Name of the attached file */
430434
const char *zDesc; /* Description of the attached file */
431435
const char *zWikiName = 0; /* Wiki page name when attached to Wiki */
432436
const char *zTNUuid = 0; /* Tech Note ID when attached to tech note */
433437
const char *zTktUuid = 0; /* Ticket ID when attached to a ticket */
@@ -763,11 +767,11 @@
763767
}
764768
blob_read_from_file(&content, zFile, ExtFILE);
765769
user_select();
766770
attach_commit(
767771
zFile, /* The filename of the attachment */
768
- zTarget, /* The artifact uuid to attach to */
772
+ zTarget, /* The artifact hash to attach to */
769773
blob_buffer(&content), /* The content of the attachment */
770774
blob_size(&content), /* The length of the attachment */
771775
0, /* No need to moderate the attachment */
772776
"" /* Empty attachment comment */
773777
);
774778
--- src/attach.c
+++ src/attach.c
@@ -23,19 +23,22 @@
23
24 /*
25 ** WEBPAGE: attachlist
26 ** List attachments.
27 **
28 ** tkt=TICKETUUID
29 ** page=WIKIPAGE
 
 
 
 
 
 
30 **
31 ** At most one of technote=, tkt= or page= are supplied.
32 ** If none is given, all attachments are listed. If one is given,
33 ** only attachments for the designated technote, ticket or wiki page
34 ** are shown. TECHNOTEUUID and TICKETUUID may be just a prefix of the
35 ** relevant technical note or ticket, in which case all attachments
36 ** of all technical notes or tickets with the prefix will be listed.
37 */
38 void attachlist_page(void){
39 const char *zPage = P("page");
40 const char *zTkt = P("tkt");
41 const char *zTechNote = P("technote");
@@ -152,15 +155,16 @@
152 ** WEBPAGE: attachdownload
153 ** WEBPAGE: attachimage
154 ** WEBPAGE: attachview
155 **
156 ** Download or display an attachment.
 
157 ** Query parameters:
158 **
159 ** tkt=TICKETUUID
160 ** page=WIKIPAGE
161 ** technote=TECHNOTEUUID
162 ** file=FILENAME
163 ** attachid=ID
164 **
165 */
166 void attachview_page(void){
@@ -250,11 +254,11 @@
250 /*
251 ** Commit a new attachment into the repository
252 */
253 void attach_commit(
254 const char *zName, /* The filename of the attachment */
255 const char *zTarget, /* The artifact uuid to attach to */
256 const char *aContent, /* The content of the attachment */
257 int szContent, /* The length of the attachment */
258 int needModerator, /* Moderate the attachment? */
259 const char *zComment /* The comment for the attachment */
260 ){
@@ -305,13 +309,13 @@
305
306 /*
307 ** WEBPAGE: attachadd
308 ** Add a new attachment.
309 **
310 ** tkt=TICKETUUID
311 ** page=WIKIPAGE
312 ** technote=TECHNOTEUUID
313 ** from=URL
314 **
315 */
316 void attachadd_page(void){
317 const char *zPage = P("page");
@@ -420,14 +424,14 @@
420 */
421 void ainfo_page(void){
422 int rid; /* RID for the control artifact */
423 int ridSrc; /* RID for the attached file */
424 char *zDate; /* Date attached */
425 const char *zUuid; /* UUID of the control artifact */
426 Manifest *pAttach; /* Parse of the control artifact */
427 const char *zTarget; /* Wiki, ticket or tech note attached to */
428 const char *zSrc; /* UUID of the attached file */
429 const char *zName; /* Name of the attached file */
430 const char *zDesc; /* Description of the attached file */
431 const char *zWikiName = 0; /* Wiki page name when attached to Wiki */
432 const char *zTNUuid = 0; /* Tech Note ID when attached to tech note */
433 const char *zTktUuid = 0; /* Ticket ID when attached to a ticket */
@@ -763,11 +767,11 @@
763 }
764 blob_read_from_file(&content, zFile, ExtFILE);
765 user_select();
766 attach_commit(
767 zFile, /* The filename of the attachment */
768 zTarget, /* The artifact uuid to attach to */
769 blob_buffer(&content), /* The content of the attachment */
770 blob_size(&content), /* The length of the attachment */
771 0, /* No need to moderate the attachment */
772 "" /* Empty attachment comment */
773 );
774
--- src/attach.c
+++ src/attach.c
@@ -23,19 +23,22 @@
23
24 /*
25 ** WEBPAGE: attachlist
26 ** List attachments.
27 **
28 ** tkt=HASH
29 ** page=WIKIPAGE
30 ** technote=HASH
31 **
32 ** At most one of technote=, tkt= or page= may be supplied.
33 **
34 ** If none are given, all attachments are listed. If one is given, only
35 ** attachments for the designated technote, ticket or wiki page are shown.
36 **
37 ** HASH may be just a prefix of the relevant technical note or ticket
38 ** artifact hash, in which case all attachments of all technical notes or
39 ** tickets with the prefix will be listed.
 
 
 
40 */
41 void attachlist_page(void){
42 const char *zPage = P("page");
43 const char *zTkt = P("tkt");
44 const char *zTechNote = P("technote");
@@ -152,15 +155,16 @@
155 ** WEBPAGE: attachdownload
156 ** WEBPAGE: attachimage
157 ** WEBPAGE: attachview
158 **
159 ** Download or display an attachment.
160 **
161 ** Query parameters:
162 **
163 ** tkt=HASH
164 ** page=WIKIPAGE
165 ** technote=HASH
166 ** file=FILENAME
167 ** attachid=ID
168 **
169 */
170 void attachview_page(void){
@@ -250,11 +254,11 @@
254 /*
255 ** Commit a new attachment into the repository
256 */
257 void attach_commit(
258 const char *zName, /* The filename of the attachment */
259 const char *zTarget, /* The artifact hash to attach to */
260 const char *aContent, /* The content of the attachment */
261 int szContent, /* The length of the attachment */
262 int needModerator, /* Moderate the attachment? */
263 const char *zComment /* The comment for the attachment */
264 ){
@@ -305,13 +309,13 @@
309
310 /*
311 ** WEBPAGE: attachadd
312 ** Add a new attachment.
313 **
314 ** tkt=HASH
315 ** page=WIKIPAGE
316 ** technote=HASH
317 ** from=URL
318 **
319 */
320 void attachadd_page(void){
321 const char *zPage = P("page");
@@ -420,14 +424,14 @@
424 */
425 void ainfo_page(void){
426 int rid; /* RID for the control artifact */
427 int ridSrc; /* RID for the attached file */
428 char *zDate; /* Date attached */
429 const char *zUuid; /* Hash of the control artifact */
430 Manifest *pAttach; /* Parse of the control artifact */
431 const char *zTarget; /* Wiki, ticket or tech note attached to */
432 const char *zSrc; /* Hash of the attached file */
433 const char *zName; /* Name of the attached file */
434 const char *zDesc; /* Description of the attached file */
435 const char *zWikiName = 0; /* Wiki page name when attached to Wiki */
436 const char *zTNUuid = 0; /* Tech Note ID when attached to tech note */
437 const char *zTktUuid = 0; /* Ticket ID when attached to a ticket */
@@ -763,11 +767,11 @@
767 }
768 blob_read_from_file(&content, zFile, ExtFILE);
769 user_select();
770 attach_commit(
771 zFile, /* The filename of the attachment */
772 zTarget, /* The artifact hash to attach to */
773 blob_buffer(&content), /* The content of the attachment */
774 blob_size(&content), /* The length of the attachment */
775 0, /* No need to moderate the attachment */
776 "" /* Empty attachment comment */
777 );
778
+4 -4
--- src/bundle.c
+++ src/bundle.c
@@ -530,19 +530,19 @@
530530
blob_reset(&h1);
531531
bag_remove(&busy, blobid);
532532
db_finalize(&q);
533533
}
534534
535
-/* fossil bundle cat BUNDLE UUID...
535
+/* fossil bundle cat BUNDLE HASH...
536536
**
537537
** Write elements of a bundle on standard output
538538
*/
539539
static void bundle_cat_cmd(void){
540540
int i;
541541
Blob x;
542542
verify_all_options();
543
- if( g.argc<5 ) usage("cat BUNDLE UUID...");
543
+ if( g.argc<5 ) usage("cat BUNDLE HASH...");
544544
bundle_attach_file(g.argv[3], "b1", 1);
545545
blob_zero(&x);
546546
for(i=4; i<g.argc; i++){
547547
int blobid = db_int(0,"SELECT blobid FROM bblob WHERE uuid LIKE '%q%%'",
548548
g.argv[i]);
@@ -725,11 +725,11 @@
725725
** fossil bundle append BUNDLE FILE...
726726
**
727727
** Add files named on the command line to BUNDLE. This subcommand has
728728
** little practical use and is mostly intended for testing.
729729
**
730
-** fossil bundle cat BUNDLE UUID...
730
+** fossil bundle cat BUNDLE HASH...
731731
**
732732
** Extract one or more artifacts from the bundle and write them
733733
** consecutively on standard output. This subcommand was designed
734734
** for testing and introspection of bundles and is not something
735735
** commonly used.
@@ -770,11 +770,11 @@
770770
** by check-ins in BUNDLE. This has the effect of undoing a
771771
** "fossil bundle import".
772772
**
773773
** SUMMARY:
774774
** fossil bundle append BUNDLE FILE... Add files to BUNDLE
775
-** fossil bundle cat BUNDLE UUID... Extract file from BUNDLE
775
+** fossil bundle cat BUNDLE HASH... Extract file from BUNDLE
776776
** fossil bundle export BUNDLE ?OPTIONS? Create a new BUNDLE
777777
** --branch BRANCH --from TAG1 --to TAG2 Check-ins to include
778778
** --checkin TAG Use only check-in TAG
779779
** --standalone Omit dependencies
780780
** fossil bundle extend BUNDLE Update with newer content
781781
--- src/bundle.c
+++ src/bundle.c
@@ -530,19 +530,19 @@
530 blob_reset(&h1);
531 bag_remove(&busy, blobid);
532 db_finalize(&q);
533 }
534
535 /* fossil bundle cat BUNDLE UUID...
536 **
537 ** Write elements of a bundle on standard output
538 */
539 static void bundle_cat_cmd(void){
540 int i;
541 Blob x;
542 verify_all_options();
543 if( g.argc<5 ) usage("cat BUNDLE UUID...");
544 bundle_attach_file(g.argv[3], "b1", 1);
545 blob_zero(&x);
546 for(i=4; i<g.argc; i++){
547 int blobid = db_int(0,"SELECT blobid FROM bblob WHERE uuid LIKE '%q%%'",
548 g.argv[i]);
@@ -725,11 +725,11 @@
725 ** fossil bundle append BUNDLE FILE...
726 **
727 ** Add files named on the command line to BUNDLE. This subcommand has
728 ** little practical use and is mostly intended for testing.
729 **
730 ** fossil bundle cat BUNDLE UUID...
731 **
732 ** Extract one or more artifacts from the bundle and write them
733 ** consecutively on standard output. This subcommand was designed
734 ** for testing and introspection of bundles and is not something
735 ** commonly used.
@@ -770,11 +770,11 @@
770 ** by check-ins in BUNDLE. This has the effect of undoing a
771 ** "fossil bundle import".
772 **
773 ** SUMMARY:
774 ** fossil bundle append BUNDLE FILE... Add files to BUNDLE
775 ** fossil bundle cat BUNDLE UUID... Extract file from BUNDLE
776 ** fossil bundle export BUNDLE ?OPTIONS? Create a new BUNDLE
777 ** --branch BRANCH --from TAG1 --to TAG2 Check-ins to include
778 ** --checkin TAG Use only check-in TAG
779 ** --standalone Omit dependencies
780 ** fossil bundle extend BUNDLE Update with newer content
781
--- src/bundle.c
+++ src/bundle.c
@@ -530,19 +530,19 @@
530 blob_reset(&h1);
531 bag_remove(&busy, blobid);
532 db_finalize(&q);
533 }
534
535 /* fossil bundle cat BUNDLE HASH...
536 **
537 ** Write elements of a bundle on standard output
538 */
539 static void bundle_cat_cmd(void){
540 int i;
541 Blob x;
542 verify_all_options();
543 if( g.argc<5 ) usage("cat BUNDLE HASH...");
544 bundle_attach_file(g.argv[3], "b1", 1);
545 blob_zero(&x);
546 for(i=4; i<g.argc; i++){
547 int blobid = db_int(0,"SELECT blobid FROM bblob WHERE uuid LIKE '%q%%'",
548 g.argv[i]);
@@ -725,11 +725,11 @@
725 ** fossil bundle append BUNDLE FILE...
726 **
727 ** Add files named on the command line to BUNDLE. This subcommand has
728 ** little practical use and is mostly intended for testing.
729 **
730 ** fossil bundle cat BUNDLE HASH...
731 **
732 ** Extract one or more artifacts from the bundle and write them
733 ** consecutively on standard output. This subcommand was designed
734 ** for testing and introspection of bundles and is not something
735 ** commonly used.
@@ -770,11 +770,11 @@
770 ** by check-ins in BUNDLE. This has the effect of undoing a
771 ** "fossil bundle import".
772 **
773 ** SUMMARY:
774 ** fossil bundle append BUNDLE FILE... Add files to BUNDLE
775 ** fossil bundle cat BUNDLE HASH... Extract file from BUNDLE
776 ** fossil bundle export BUNDLE ?OPTIONS? Create a new BUNDLE
777 ** --branch BRANCH --from TAG1 --to TAG2 Check-ins to include
778 ** --checkin TAG Use only check-in TAG
779 ** --standalone Omit dependencies
780 ** fossil bundle extend BUNDLE Update with newer content
781
+4 -4
--- src/checkin.c
+++ src/checkin.c
@@ -1424,11 +1424,11 @@
14241424
** Make sure the current check-in with timestamp zDate is younger than its
14251425
** ancestor identified rid and zUuid. Throw a fatal error if not.
14261426
*/
14271427
static void checkin_verify_younger(
14281428
int rid, /* The record ID of the ancestor */
1429
- const char *zUuid, /* The artifact ID of the ancestor */
1429
+ const char *zUuid, /* The artifact hash of the ancestor */
14301430
const char *zDate /* Date & time of the current check-in */
14311431
){
14321432
#ifndef FOSSIL_ALLOW_OUT_OF_ORDER_DATES
14331433
if(checkin_is_younger(rid,zDate)==0){
14341434
fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)"
@@ -1500,18 +1500,18 @@
15001500
/*
15011501
** Create a manifest.
15021502
*/
15031503
static void create_manifest(
15041504
Blob *pOut, /* Write the manifest here */
1505
- const char *zBaselineUuid, /* UUID of baseline, or zero */
1505
+ const char *zBaselineUuid, /* Hash of baseline, or zero */
15061506
Manifest *pBaseline, /* Make it a delta manifest if not zero */
15071507
int vid, /* BLOB.id for the parent check-in */
15081508
CheckinInfo *p, /* Information about the check-in */
15091509
int *pnFBcard /* OUT: Number of generated B- and F-cards */
15101510
){
15111511
char *zDate; /* Date of the check-in */
1512
- char *zParentUuid = 0; /* UUID of parent check-in */
1512
+ char *zParentUuid = 0; /* Hash of parent check-in */
15131513
Blob filename; /* A single filename */
15141514
int nBasename; /* Size of base filename */
15151515
Stmt q; /* Various queries */
15161516
Blob mcksum; /* Manifest checksum */
15171517
ManifestFile *pFile; /* File from the baseline */
@@ -2058,11 +2058,11 @@
20582058
int nrid; /* blob-id of a modified file */
20592059
int nvid; /* Blob-id of the new check-in */
20602060
Blob comment; /* Check-in comment */
20612061
const char *zComment; /* Check-in comment */
20622062
Stmt q; /* Various queries */
2063
- char *zUuid; /* UUID of the new check-in */
2063
+ char *zUuid; /* Hash of the new check-in */
20642064
int useHash = 0; /* True to verify file status using hashing */
20652065
int noSign = 0; /* True to omit signing the manifest using GPG */
20662066
int privateFlag = 0; /* True if the --private option is present */
20672067
int privateParent = 0; /* True if the parent check-in is private */
20682068
int isAMerge = 0; /* True if checking in a merge */
20692069
--- src/checkin.c
+++ src/checkin.c
@@ -1424,11 +1424,11 @@
1424 ** Make sure the current check-in with timestamp zDate is younger than its
1425 ** ancestor identified rid and zUuid. Throw a fatal error if not.
1426 */
1427 static void checkin_verify_younger(
1428 int rid, /* The record ID of the ancestor */
1429 const char *zUuid, /* The artifact ID of the ancestor */
1430 const char *zDate /* Date & time of the current check-in */
1431 ){
1432 #ifndef FOSSIL_ALLOW_OUT_OF_ORDER_DATES
1433 if(checkin_is_younger(rid,zDate)==0){
1434 fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)"
@@ -1500,18 +1500,18 @@
1500 /*
1501 ** Create a manifest.
1502 */
1503 static void create_manifest(
1504 Blob *pOut, /* Write the manifest here */
1505 const char *zBaselineUuid, /* UUID of baseline, or zero */
1506 Manifest *pBaseline, /* Make it a delta manifest if not zero */
1507 int vid, /* BLOB.id for the parent check-in */
1508 CheckinInfo *p, /* Information about the check-in */
1509 int *pnFBcard /* OUT: Number of generated B- and F-cards */
1510 ){
1511 char *zDate; /* Date of the check-in */
1512 char *zParentUuid = 0; /* UUID of parent check-in */
1513 Blob filename; /* A single filename */
1514 int nBasename; /* Size of base filename */
1515 Stmt q; /* Various queries */
1516 Blob mcksum; /* Manifest checksum */
1517 ManifestFile *pFile; /* File from the baseline */
@@ -2058,11 +2058,11 @@
2058 int nrid; /* blob-id of a modified file */
2059 int nvid; /* Blob-id of the new check-in */
2060 Blob comment; /* Check-in comment */
2061 const char *zComment; /* Check-in comment */
2062 Stmt q; /* Various queries */
2063 char *zUuid; /* UUID of the new check-in */
2064 int useHash = 0; /* True to verify file status using hashing */
2065 int noSign = 0; /* True to omit signing the manifest using GPG */
2066 int privateFlag = 0; /* True if the --private option is present */
2067 int privateParent = 0; /* True if the parent check-in is private */
2068 int isAMerge = 0; /* True if checking in a merge */
2069
--- src/checkin.c
+++ src/checkin.c
@@ -1424,11 +1424,11 @@
1424 ** Make sure the current check-in with timestamp zDate is younger than its
1425 ** ancestor identified rid and zUuid. Throw a fatal error if not.
1426 */
1427 static void checkin_verify_younger(
1428 int rid, /* The record ID of the ancestor */
1429 const char *zUuid, /* The artifact hash of the ancestor */
1430 const char *zDate /* Date & time of the current check-in */
1431 ){
1432 #ifndef FOSSIL_ALLOW_OUT_OF_ORDER_DATES
1433 if(checkin_is_younger(rid,zDate)==0){
1434 fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)"
@@ -1500,18 +1500,18 @@
1500 /*
1501 ** Create a manifest.
1502 */
1503 static void create_manifest(
1504 Blob *pOut, /* Write the manifest here */
1505 const char *zBaselineUuid, /* Hash of baseline, or zero */
1506 Manifest *pBaseline, /* Make it a delta manifest if not zero */
1507 int vid, /* BLOB.id for the parent check-in */
1508 CheckinInfo *p, /* Information about the check-in */
1509 int *pnFBcard /* OUT: Number of generated B- and F-cards */
1510 ){
1511 char *zDate; /* Date of the check-in */
1512 char *zParentUuid = 0; /* Hash of parent check-in */
1513 Blob filename; /* A single filename */
1514 int nBasename; /* Size of base filename */
1515 Stmt q; /* Various queries */
1516 Blob mcksum; /* Manifest checksum */
1517 ManifestFile *pFile; /* File from the baseline */
@@ -2058,11 +2058,11 @@
2058 int nrid; /* blob-id of a modified file */
2059 int nvid; /* Blob-id of the new check-in */
2060 Blob comment; /* Check-in comment */
2061 const char *zComment; /* Check-in comment */
2062 Stmt q; /* Various queries */
2063 char *zUuid; /* Hash of the new check-in */
2064 int useHash = 0; /* True to verify file status using hashing */
2065 int noSign = 0; /* True to omit signing the manifest using GPG */
2066 int privateFlag = 0; /* True if the --private option is present */
2067 int privateParent = 0; /* True if the parent check-in is private */
2068 int isAMerge = 0; /* True if checking in a merge */
2069
+4 -4
--- src/checkin.c
+++ src/checkin.c
@@ -1424,11 +1424,11 @@
14241424
** Make sure the current check-in with timestamp zDate is younger than its
14251425
** ancestor identified rid and zUuid. Throw a fatal error if not.
14261426
*/
14271427
static void checkin_verify_younger(
14281428
int rid, /* The record ID of the ancestor */
1429
- const char *zUuid, /* The artifact ID of the ancestor */
1429
+ const char *zUuid, /* The artifact hash of the ancestor */
14301430
const char *zDate /* Date & time of the current check-in */
14311431
){
14321432
#ifndef FOSSIL_ALLOW_OUT_OF_ORDER_DATES
14331433
if(checkin_is_younger(rid,zDate)==0){
14341434
fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)"
@@ -1500,18 +1500,18 @@
15001500
/*
15011501
** Create a manifest.
15021502
*/
15031503
static void create_manifest(
15041504
Blob *pOut, /* Write the manifest here */
1505
- const char *zBaselineUuid, /* UUID of baseline, or zero */
1505
+ const char *zBaselineUuid, /* Hash of baseline, or zero */
15061506
Manifest *pBaseline, /* Make it a delta manifest if not zero */
15071507
int vid, /* BLOB.id for the parent check-in */
15081508
CheckinInfo *p, /* Information about the check-in */
15091509
int *pnFBcard /* OUT: Number of generated B- and F-cards */
15101510
){
15111511
char *zDate; /* Date of the check-in */
1512
- char *zParentUuid = 0; /* UUID of parent check-in */
1512
+ char *zParentUuid = 0; /* Hash of parent check-in */
15131513
Blob filename; /* A single filename */
15141514
int nBasename; /* Size of base filename */
15151515
Stmt q; /* Various queries */
15161516
Blob mcksum; /* Manifest checksum */
15171517
ManifestFile *pFile; /* File from the baseline */
@@ -2058,11 +2058,11 @@
20582058
int nrid; /* blob-id of a modified file */
20592059
int nvid; /* Blob-id of the new check-in */
20602060
Blob comment; /* Check-in comment */
20612061
const char *zComment; /* Check-in comment */
20622062
Stmt q; /* Various queries */
2063
- char *zUuid; /* UUID of the new check-in */
2063
+ char *zUuid; /* Hash of the new check-in */
20642064
int useHash = 0; /* True to verify file status using hashing */
20652065
int noSign = 0; /* True to omit signing the manifest using GPG */
20662066
int privateFlag = 0; /* True if the --private option is present */
20672067
int privateParent = 0; /* True if the parent check-in is private */
20682068
int isAMerge = 0; /* True if checking in a merge */
20692069
--- src/checkin.c
+++ src/checkin.c
@@ -1424,11 +1424,11 @@
1424 ** Make sure the current check-in with timestamp zDate is younger than its
1425 ** ancestor identified rid and zUuid. Throw a fatal error if not.
1426 */
1427 static void checkin_verify_younger(
1428 int rid, /* The record ID of the ancestor */
1429 const char *zUuid, /* The artifact ID of the ancestor */
1430 const char *zDate /* Date & time of the current check-in */
1431 ){
1432 #ifndef FOSSIL_ALLOW_OUT_OF_ORDER_DATES
1433 if(checkin_is_younger(rid,zDate)==0){
1434 fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)"
@@ -1500,18 +1500,18 @@
1500 /*
1501 ** Create a manifest.
1502 */
1503 static void create_manifest(
1504 Blob *pOut, /* Write the manifest here */
1505 const char *zBaselineUuid, /* UUID of baseline, or zero */
1506 Manifest *pBaseline, /* Make it a delta manifest if not zero */
1507 int vid, /* BLOB.id for the parent check-in */
1508 CheckinInfo *p, /* Information about the check-in */
1509 int *pnFBcard /* OUT: Number of generated B- and F-cards */
1510 ){
1511 char *zDate; /* Date of the check-in */
1512 char *zParentUuid = 0; /* UUID of parent check-in */
1513 Blob filename; /* A single filename */
1514 int nBasename; /* Size of base filename */
1515 Stmt q; /* Various queries */
1516 Blob mcksum; /* Manifest checksum */
1517 ManifestFile *pFile; /* File from the baseline */
@@ -2058,11 +2058,11 @@
2058 int nrid; /* blob-id of a modified file */
2059 int nvid; /* Blob-id of the new check-in */
2060 Blob comment; /* Check-in comment */
2061 const char *zComment; /* Check-in comment */
2062 Stmt q; /* Various queries */
2063 char *zUuid; /* UUID of the new check-in */
2064 int useHash = 0; /* True to verify file status using hashing */
2065 int noSign = 0; /* True to omit signing the manifest using GPG */
2066 int privateFlag = 0; /* True if the --private option is present */
2067 int privateParent = 0; /* True if the parent check-in is private */
2068 int isAMerge = 0; /* True if checking in a merge */
2069
--- src/checkin.c
+++ src/checkin.c
@@ -1424,11 +1424,11 @@
1424 ** Make sure the current check-in with timestamp zDate is younger than its
1425 ** ancestor identified rid and zUuid. Throw a fatal error if not.
1426 */
1427 static void checkin_verify_younger(
1428 int rid, /* The record ID of the ancestor */
1429 const char *zUuid, /* The artifact hash of the ancestor */
1430 const char *zDate /* Date & time of the current check-in */
1431 ){
1432 #ifndef FOSSIL_ALLOW_OUT_OF_ORDER_DATES
1433 if(checkin_is_younger(rid,zDate)==0){
1434 fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)"
@@ -1500,18 +1500,18 @@
1500 /*
1501 ** Create a manifest.
1502 */
1503 static void create_manifest(
1504 Blob *pOut, /* Write the manifest here */
1505 const char *zBaselineUuid, /* Hash of baseline, or zero */
1506 Manifest *pBaseline, /* Make it a delta manifest if not zero */
1507 int vid, /* BLOB.id for the parent check-in */
1508 CheckinInfo *p, /* Information about the check-in */
1509 int *pnFBcard /* OUT: Number of generated B- and F-cards */
1510 ){
1511 char *zDate; /* Date of the check-in */
1512 char *zParentUuid = 0; /* Hash of parent check-in */
1513 Blob filename; /* A single filename */
1514 int nBasename; /* Size of base filename */
1515 Stmt q; /* Various queries */
1516 Blob mcksum; /* Manifest checksum */
1517 ManifestFile *pFile; /* File from the baseline */
@@ -2058,11 +2058,11 @@
2058 int nrid; /* blob-id of a modified file */
2059 int nvid; /* Blob-id of the new check-in */
2060 Blob comment; /* Check-in comment */
2061 const char *zComment; /* Check-in comment */
2062 Stmt q; /* Various queries */
2063 char *zUuid; /* Hash of the new check-in */
2064 int useHash = 0; /* True to verify file status using hashing */
2065 int noSign = 0; /* True to omit signing the manifest using GPG */
2066 int privateFlag = 0; /* True if the --private option is present */
2067 int privateParent = 0; /* True if the parent check-in is private */
2068 int isAMerge = 0; /* True if checking in a merge */
2069
+1 -1
--- src/checkout.c
+++ src/checkout.c
@@ -87,11 +87,11 @@
8787
db_multi_exec("DELETE FROM vfile WHERE vid=%d", vid);
8888
}
8989
9090
9191
/*
92
-** Given the abbreviated UUID name of a version, load the content of that
92
+** Given the abbreviated hash of a version, load the content of that
9393
** version in the VFILE table. Return the VID for the version.
9494
**
9595
** If anything goes wrong, panic.
9696
*/
9797
int load_vfile(const char *zName, int forceMissingFlag){
9898
--- src/checkout.c
+++ src/checkout.c
@@ -87,11 +87,11 @@
87 db_multi_exec("DELETE FROM vfile WHERE vid=%d", vid);
88 }
89
90
91 /*
92 ** Given the abbreviated UUID name of a version, load the content of that
93 ** version in the VFILE table. Return the VID for the version.
94 **
95 ** If anything goes wrong, panic.
96 */
97 int load_vfile(const char *zName, int forceMissingFlag){
98
--- src/checkout.c
+++ src/checkout.c
@@ -87,11 +87,11 @@
87 db_multi_exec("DELETE FROM vfile WHERE vid=%d", vid);
88 }
89
90
91 /*
92 ** Given the abbreviated hash of a version, load the content of that
93 ** version in the VFILE table. Return the VID for the version.
94 **
95 ** If anything goes wrong, panic.
96 */
97 int load_vfile(const char *zName, int forceMissingFlag){
98
+6 -5
--- src/content.c
+++ src/content.c
@@ -564,11 +564,11 @@
564564
db_finalize(&s1);
565565
db_end_transaction(0);
566566
return rid;
567567
}
568568
}else{
569
- rid = 0; /* No entry with the same UUID currently exists */
569
+ rid = 0; /* No entry with the same hash currently exists */
570570
markAsUnclustered = 1;
571571
}
572572
db_finalize(&s1);
573573
574574
/* Construct a received-from ID if we do not already have one */
@@ -659,11 +659,11 @@
659659
return content_put_ex(pBlob, 0, 0, 0, 0);
660660
}
661661
662662
663663
/*
664
-** Create a new phantom with the given UUID and return its artifact ID.
664
+** Create a new phantom with the given hash and return its artifact ID.
665665
*/
666666
int content_new(const char *zUuid, int isPrivate){
667667
int rid;
668668
static Stmt s1, s2, s3;
669669
@@ -1110,15 +1110,16 @@
11101110
/* Allowed flags for check_exists */
11111111
#define MISSING_SHUNNED 0x0001 /* Do not report shunned artifacts */
11121112
11131113
/* This is a helper routine for test-artifacts.
11141114
**
1115
-** Check to see that artifact zUuid exists in the repository. If it does,
1116
-** return 0. If it does not, generate an error message and return 1.
1115
+** Check to see that the artifact hash referenced by zUuid exists in the
1116
+** repository. If it does, return 0. If it does not, generate an error
1117
+** message and return 1.
11171118
*/
11181119
static int check_exists(
1119
- const char *zUuid, /* The artifact we are checking for */
1120
+ const char *zUuid, /* Hash of the artifact we are checking for */
11201121
unsigned flags, /* Flags */
11211122
Manifest *p, /* The control artifact that references zUuid */
11221123
const char *zRole, /* Role of zUuid in p */
11231124
const char *zDetail /* Additional information, such as a filename */
11241125
){
11251126
--- src/content.c
+++ src/content.c
@@ -564,11 +564,11 @@
564 db_finalize(&s1);
565 db_end_transaction(0);
566 return rid;
567 }
568 }else{
569 rid = 0; /* No entry with the same UUID currently exists */
570 markAsUnclustered = 1;
571 }
572 db_finalize(&s1);
573
574 /* Construct a received-from ID if we do not already have one */
@@ -659,11 +659,11 @@
659 return content_put_ex(pBlob, 0, 0, 0, 0);
660 }
661
662
663 /*
664 ** Create a new phantom with the given UUID and return its artifact ID.
665 */
666 int content_new(const char *zUuid, int isPrivate){
667 int rid;
668 static Stmt s1, s2, s3;
669
@@ -1110,15 +1110,16 @@
1110 /* Allowed flags for check_exists */
1111 #define MISSING_SHUNNED 0x0001 /* Do not report shunned artifacts */
1112
1113 /* This is a helper routine for test-artifacts.
1114 **
1115 ** Check to see that artifact zUuid exists in the repository. If it does,
1116 ** return 0. If it does not, generate an error message and return 1.
 
1117 */
1118 static int check_exists(
1119 const char *zUuid, /* The artifact we are checking for */
1120 unsigned flags, /* Flags */
1121 Manifest *p, /* The control artifact that references zUuid */
1122 const char *zRole, /* Role of zUuid in p */
1123 const char *zDetail /* Additional information, such as a filename */
1124 ){
1125
--- src/content.c
+++ src/content.c
@@ -564,11 +564,11 @@
564 db_finalize(&s1);
565 db_end_transaction(0);
566 return rid;
567 }
568 }else{
569 rid = 0; /* No entry with the same hash currently exists */
570 markAsUnclustered = 1;
571 }
572 db_finalize(&s1);
573
574 /* Construct a received-from ID if we do not already have one */
@@ -659,11 +659,11 @@
659 return content_put_ex(pBlob, 0, 0, 0, 0);
660 }
661
662
663 /*
664 ** Create a new phantom with the given hash and return its artifact ID.
665 */
666 int content_new(const char *zUuid, int isPrivate){
667 int rid;
668 static Stmt s1, s2, s3;
669
@@ -1110,15 +1110,16 @@
1110 /* Allowed flags for check_exists */
1111 #define MISSING_SHUNNED 0x0001 /* Do not report shunned artifacts */
1112
1113 /* This is a helper routine for test-artifacts.
1114 **
1115 ** Check to see that the artifact hash referenced by zUuid exists in the
1116 ** repository. If it does, return 0. If it does not, generate an error
1117 ** message and return 1.
1118 */
1119 static int check_exists(
1120 const char *zUuid, /* Hash of the artifact we are checking for */
1121 unsigned flags, /* Flags */
1122 Manifest *p, /* The control artifact that references zUuid */
1123 const char *zRole, /* Role of zUuid in p */
1124 const char *zDetail /* Additional information, such as a filename */
1125 ){
1126
+6 -5
--- src/content.c
+++ src/content.c
@@ -564,11 +564,11 @@
564564
db_finalize(&s1);
565565
db_end_transaction(0);
566566
return rid;
567567
}
568568
}else{
569
- rid = 0; /* No entry with the same UUID currently exists */
569
+ rid = 0; /* No entry with the same hash currently exists */
570570
markAsUnclustered = 1;
571571
}
572572
db_finalize(&s1);
573573
574574
/* Construct a received-from ID if we do not already have one */
@@ -659,11 +659,11 @@
659659
return content_put_ex(pBlob, 0, 0, 0, 0);
660660
}
661661
662662
663663
/*
664
-** Create a new phantom with the given UUID and return its artifact ID.
664
+** Create a new phantom with the given hash and return its artifact ID.
665665
*/
666666
int content_new(const char *zUuid, int isPrivate){
667667
int rid;
668668
static Stmt s1, s2, s3;
669669
@@ -1110,15 +1110,16 @@
11101110
/* Allowed flags for check_exists */
11111111
#define MISSING_SHUNNED 0x0001 /* Do not report shunned artifacts */
11121112
11131113
/* This is a helper routine for test-artifacts.
11141114
**
1115
-** Check to see that artifact zUuid exists in the repository. If it does,
1116
-** return 0. If it does not, generate an error message and return 1.
1115
+** Check to see that the artifact hash referenced by zUuid exists in the
1116
+** repository. If it does, return 0. If it does not, generate an error
1117
+** message and return 1.
11171118
*/
11181119
static int check_exists(
1119
- const char *zUuid, /* The artifact we are checking for */
1120
+ const char *zUuid, /* Hash of the artifact we are checking for */
11201121
unsigned flags, /* Flags */
11211122
Manifest *p, /* The control artifact that references zUuid */
11221123
const char *zRole, /* Role of zUuid in p */
11231124
const char *zDetail /* Additional information, such as a filename */
11241125
){
11251126
--- src/content.c
+++ src/content.c
@@ -564,11 +564,11 @@
564 db_finalize(&s1);
565 db_end_transaction(0);
566 return rid;
567 }
568 }else{
569 rid = 0; /* No entry with the same UUID currently exists */
570 markAsUnclustered = 1;
571 }
572 db_finalize(&s1);
573
574 /* Construct a received-from ID if we do not already have one */
@@ -659,11 +659,11 @@
659 return content_put_ex(pBlob, 0, 0, 0, 0);
660 }
661
662
663 /*
664 ** Create a new phantom with the given UUID and return its artifact ID.
665 */
666 int content_new(const char *zUuid, int isPrivate){
667 int rid;
668 static Stmt s1, s2, s3;
669
@@ -1110,15 +1110,16 @@
1110 /* Allowed flags for check_exists */
1111 #define MISSING_SHUNNED 0x0001 /* Do not report shunned artifacts */
1112
1113 /* This is a helper routine for test-artifacts.
1114 **
1115 ** Check to see that artifact zUuid exists in the repository. If it does,
1116 ** return 0. If it does not, generate an error message and return 1.
 
1117 */
1118 static int check_exists(
1119 const char *zUuid, /* The artifact we are checking for */
1120 unsigned flags, /* Flags */
1121 Manifest *p, /* The control artifact that references zUuid */
1122 const char *zRole, /* Role of zUuid in p */
1123 const char *zDetail /* Additional information, such as a filename */
1124 ){
1125
--- src/content.c
+++ src/content.c
@@ -564,11 +564,11 @@
564 db_finalize(&s1);
565 db_end_transaction(0);
566 return rid;
567 }
568 }else{
569 rid = 0; /* No entry with the same hash currently exists */
570 markAsUnclustered = 1;
571 }
572 db_finalize(&s1);
573
574 /* Construct a received-from ID if we do not already have one */
@@ -659,11 +659,11 @@
659 return content_put_ex(pBlob, 0, 0, 0, 0);
660 }
661
662
663 /*
664 ** Create a new phantom with the given hash and return its artifact ID.
665 */
666 int content_new(const char *zUuid, int isPrivate){
667 int rid;
668 static Stmt s1, s2, s3;
669
@@ -1110,15 +1110,16 @@
1110 /* Allowed flags for check_exists */
1111 #define MISSING_SHUNNED 0x0001 /* Do not report shunned artifacts */
1112
1113 /* This is a helper routine for test-artifacts.
1114 **
1115 ** Check to see that the artifact hash referenced by zUuid exists in the
1116 ** repository. If it does, return 0. If it does not, generate an error
1117 ** message and return 1.
1118 */
1119 static int check_exists(
1120 const char *zUuid, /* Hash of the artifact we are checking for */
1121 unsigned flags, /* Flags */
1122 Manifest *p, /* The control artifact that references zUuid */
1123 const char *zRole, /* Role of zUuid in p */
1124 const char *zDetail /* Additional information, such as a filename */
1125 ){
1126
+1 -1
--- src/event.c
+++ src/event.c
@@ -63,11 +63,11 @@
6363
** Display an existing tech-note identified by its ID, optionally at a
6464
** specific version, and optionally with additional details.
6565
*/
6666
void event_page(void){
6767
int rid = 0; /* rid of the event artifact */
68
- char *zUuid; /* UUID corresponding to rid */
68
+ char *zUuid; /* artifact hash corresponding to rid */
6969
const char *zId; /* Event identifier */
7070
const char *zVerbose; /* Value of verbose option */
7171
char *zETime; /* Time of the tech-note */
7272
char *zATime; /* Time the artifact was created */
7373
int specRid; /* rid specified by aid= parameter */
7474
--- src/event.c
+++ src/event.c
@@ -63,11 +63,11 @@
63 ** Display an existing tech-note identified by its ID, optionally at a
64 ** specific version, and optionally with additional details.
65 */
66 void event_page(void){
67 int rid = 0; /* rid of the event artifact */
68 char *zUuid; /* UUID corresponding to rid */
69 const char *zId; /* Event identifier */
70 const char *zVerbose; /* Value of verbose option */
71 char *zETime; /* Time of the tech-note */
72 char *zATime; /* Time the artifact was created */
73 int specRid; /* rid specified by aid= parameter */
74
--- src/event.c
+++ src/event.c
@@ -63,11 +63,11 @@
63 ** Display an existing tech-note identified by its ID, optionally at a
64 ** specific version, and optionally with additional details.
65 */
66 void event_page(void){
67 int rid = 0; /* rid of the event artifact */
68 char *zUuid; /* artifact hash corresponding to rid */
69 const char *zId; /* Event identifier */
70 const char *zVerbose; /* Value of verbose option */
71 char *zETime; /* Time of the tech-note */
72 char *zATime; /* Time the artifact was created */
73 int specRid; /* rid specified by aid= parameter */
74
+8 -8
--- src/finfo.c
+++ src/finfo.c
@@ -284,12 +284,12 @@
284284
** b=DATETIME Only show changes before DATETIME
285285
** m=HASH Mark this particular file version
286286
** n=NUM Show the first NUM changes only
287287
** brbg Background color by branch name
288288
** ubg Background color by user name
289
-** ci=UUID Ancestors of a particular check-in
290
-** orig=UUID If both ci and orig are supplied, only show those
289
+** ci=HASH Ancestors of a particular check-in
290
+** orig=HASH If both ci and orig are supplied, only show those
291291
** changes on a direct path from orig to ci.
292292
** showid Show RID values for debugging
293293
**
294294
** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
295295
** year-month-day form, it may be truncated, and it may also name a
@@ -371,13 +371,13 @@
371371
" datetime(min(event.mtime),toLocal())," /* Date of change */
372372
" coalesce(event.ecomment, event.comment)," /* Check-in comment */
373373
" coalesce(event.euser, event.user)," /* User who made chng */
374374
" mlink.pid," /* Parent file rid */
375375
" mlink.fid," /* File rid */
376
- " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
377
- " blob.uuid," /* Current file uuid */
378
- " (SELECT uuid FROM blob WHERE rid=mlink.mid)," /* Check-in uuid */
376
+ " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file hash */
377
+ " blob.uuid," /* Current file hash */
378
+ " (SELECT uuid FROM blob WHERE rid=mlink.mid)," /* Check-in hash */
379379
" event.bgcolor," /* Background color */
380380
" (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
381381
" AND tagxref.rid=mlink.mid)," /* Branchname */
382382
" mlink.mid," /* check-in ID */
383383
" mlink.pfnid," /* Previous filename */
@@ -541,13 +541,13 @@
541541
if( tmFlags & TIMELINE_COMPACT ){
542542
@ <span class='timelineCompactComment' data-id='%d(frid)'>
543543
}else{
544544
@ <span class='timeline%s(zStyle)Comment'>
545545
if( (tmFlags & TIMELINE_VERBOSE)!=0 && zUuid ){
546
- hyperlink_to_uuid(zUuid);
546
+ hyperlink_to_version(zUuid);
547547
@ part of check-in \
548
- hyperlink_to_uuid(zCkin);
548
+ hyperlink_to_version(zCkin);
549549
}
550550
}
551551
@ %W(zCom)</span>
552552
if( (tmFlags & TIMELINE_COMPACT)!=0 ){
553553
@ <span class='timelineEllipsis' data-id='%d(frid)' \
@@ -576,11 +576,11 @@
576576
@ id:&nbsp;%d(frid)
577577
}
578578
}
579579
}
580580
@ check-in:&nbsp;\
581
- hyperlink_to_uuid(zCkin);
581
+ hyperlink_to_version(zCkin);
582582
if( fShowId ){
583583
@ (%d(fmid))
584584
}
585585
@ user:&nbsp;\
586586
hyperlink_to_user(zUser, zDate, ",");
587587
--- src/finfo.c
+++ src/finfo.c
@@ -284,12 +284,12 @@
284 ** b=DATETIME Only show changes before DATETIME
285 ** m=HASH Mark this particular file version
286 ** n=NUM Show the first NUM changes only
287 ** brbg Background color by branch name
288 ** ubg Background color by user name
289 ** ci=UUID Ancestors of a particular check-in
290 ** orig=UUID If both ci and orig are supplied, only show those
291 ** changes on a direct path from orig to ci.
292 ** showid Show RID values for debugging
293 **
294 ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
295 ** year-month-day form, it may be truncated, and it may also name a
@@ -371,13 +371,13 @@
371 " datetime(min(event.mtime),toLocal())," /* Date of change */
372 " coalesce(event.ecomment, event.comment)," /* Check-in comment */
373 " coalesce(event.euser, event.user)," /* User who made chng */
374 " mlink.pid," /* Parent file rid */
375 " mlink.fid," /* File rid */
376 " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
377 " blob.uuid," /* Current file uuid */
378 " (SELECT uuid FROM blob WHERE rid=mlink.mid)," /* Check-in uuid */
379 " event.bgcolor," /* Background color */
380 " (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
381 " AND tagxref.rid=mlink.mid)," /* Branchname */
382 " mlink.mid," /* check-in ID */
383 " mlink.pfnid," /* Previous filename */
@@ -541,13 +541,13 @@
541 if( tmFlags & TIMELINE_COMPACT ){
542 @ <span class='timelineCompactComment' data-id='%d(frid)'>
543 }else{
544 @ <span class='timeline%s(zStyle)Comment'>
545 if( (tmFlags & TIMELINE_VERBOSE)!=0 && zUuid ){
546 hyperlink_to_uuid(zUuid);
547 @ part of check-in \
548 hyperlink_to_uuid(zCkin);
549 }
550 }
551 @ %W(zCom)</span>
552 if( (tmFlags & TIMELINE_COMPACT)!=0 ){
553 @ <span class='timelineEllipsis' data-id='%d(frid)' \
@@ -576,11 +576,11 @@
576 @ id:&nbsp;%d(frid)
577 }
578 }
579 }
580 @ check-in:&nbsp;\
581 hyperlink_to_uuid(zCkin);
582 if( fShowId ){
583 @ (%d(fmid))
584 }
585 @ user:&nbsp;\
586 hyperlink_to_user(zUser, zDate, ",");
587
--- src/finfo.c
+++ src/finfo.c
@@ -284,12 +284,12 @@
284 ** b=DATETIME Only show changes before DATETIME
285 ** m=HASH Mark this particular file version
286 ** n=NUM Show the first NUM changes only
287 ** brbg Background color by branch name
288 ** ubg Background color by user name
289 ** ci=HASH Ancestors of a particular check-in
290 ** orig=HASH If both ci and orig are supplied, only show those
291 ** changes on a direct path from orig to ci.
292 ** showid Show RID values for debugging
293 **
294 ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
295 ** year-month-day form, it may be truncated, and it may also name a
@@ -371,13 +371,13 @@
371 " datetime(min(event.mtime),toLocal())," /* Date of change */
372 " coalesce(event.ecomment, event.comment)," /* Check-in comment */
373 " coalesce(event.euser, event.user)," /* User who made chng */
374 " mlink.pid," /* Parent file rid */
375 " mlink.fid," /* File rid */
376 " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file hash */
377 " blob.uuid," /* Current file hash */
378 " (SELECT uuid FROM blob WHERE rid=mlink.mid)," /* Check-in hash */
379 " event.bgcolor," /* Background color */
380 " (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
381 " AND tagxref.rid=mlink.mid)," /* Branchname */
382 " mlink.mid," /* check-in ID */
383 " mlink.pfnid," /* Previous filename */
@@ -541,13 +541,13 @@
541 if( tmFlags & TIMELINE_COMPACT ){
542 @ <span class='timelineCompactComment' data-id='%d(frid)'>
543 }else{
544 @ <span class='timeline%s(zStyle)Comment'>
545 if( (tmFlags & TIMELINE_VERBOSE)!=0 && zUuid ){
546 hyperlink_to_version(zUuid);
547 @ part of check-in \
548 hyperlink_to_version(zCkin);
549 }
550 }
551 @ %W(zCom)</span>
552 if( (tmFlags & TIMELINE_COMPACT)!=0 ){
553 @ <span class='timelineEllipsis' data-id='%d(frid)' \
@@ -576,11 +576,11 @@
576 @ id:&nbsp;%d(frid)
577 }
578 }
579 }
580 @ check-in:&nbsp;\
581 hyperlink_to_version(zCkin);
582 if( fShowId ){
583 @ (%d(fmid))
584 }
585 @ user:&nbsp;\
586 hyperlink_to_user(zUser, zDate, ",");
587
+8 -8
--- src/finfo.c
+++ src/finfo.c
@@ -284,12 +284,12 @@
284284
** b=DATETIME Only show changes before DATETIME
285285
** m=HASH Mark this particular file version
286286
** n=NUM Show the first NUM changes only
287287
** brbg Background color by branch name
288288
** ubg Background color by user name
289
-** ci=UUID Ancestors of a particular check-in
290
-** orig=UUID If both ci and orig are supplied, only show those
289
+** ci=HASH Ancestors of a particular check-in
290
+** orig=HASH If both ci and orig are supplied, only show those
291291
** changes on a direct path from orig to ci.
292292
** showid Show RID values for debugging
293293
**
294294
** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
295295
** year-month-day form, it may be truncated, and it may also name a
@@ -371,13 +371,13 @@
371371
" datetime(min(event.mtime),toLocal())," /* Date of change */
372372
" coalesce(event.ecomment, event.comment)," /* Check-in comment */
373373
" coalesce(event.euser, event.user)," /* User who made chng */
374374
" mlink.pid," /* Parent file rid */
375375
" mlink.fid," /* File rid */
376
- " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
377
- " blob.uuid," /* Current file uuid */
378
- " (SELECT uuid FROM blob WHERE rid=mlink.mid)," /* Check-in uuid */
376
+ " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file hash */
377
+ " blob.uuid," /* Current file hash */
378
+ " (SELECT uuid FROM blob WHERE rid=mlink.mid)," /* Check-in hash */
379379
" event.bgcolor," /* Background color */
380380
" (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
381381
" AND tagxref.rid=mlink.mid)," /* Branchname */
382382
" mlink.mid," /* check-in ID */
383383
" mlink.pfnid," /* Previous filename */
@@ -541,13 +541,13 @@
541541
if( tmFlags & TIMELINE_COMPACT ){
542542
@ <span class='timelineCompactComment' data-id='%d(frid)'>
543543
}else{
544544
@ <span class='timeline%s(zStyle)Comment'>
545545
if( (tmFlags & TIMELINE_VERBOSE)!=0 && zUuid ){
546
- hyperlink_to_uuid(zUuid);
546
+ hyperlink_to_version(zUuid);
547547
@ part of check-in \
548
- hyperlink_to_uuid(zCkin);
548
+ hyperlink_to_version(zCkin);
549549
}
550550
}
551551
@ %W(zCom)</span>
552552
if( (tmFlags & TIMELINE_COMPACT)!=0 ){
553553
@ <span class='timelineEllipsis' data-id='%d(frid)' \
@@ -576,11 +576,11 @@
576576
@ id:&nbsp;%d(frid)
577577
}
578578
}
579579
}
580580
@ check-in:&nbsp;\
581
- hyperlink_to_uuid(zCkin);
581
+ hyperlink_to_version(zCkin);
582582
if( fShowId ){
583583
@ (%d(fmid))
584584
}
585585
@ user:&nbsp;\
586586
hyperlink_to_user(zUser, zDate, ",");
587587
--- src/finfo.c
+++ src/finfo.c
@@ -284,12 +284,12 @@
284 ** b=DATETIME Only show changes before DATETIME
285 ** m=HASH Mark this particular file version
286 ** n=NUM Show the first NUM changes only
287 ** brbg Background color by branch name
288 ** ubg Background color by user name
289 ** ci=UUID Ancestors of a particular check-in
290 ** orig=UUID If both ci and orig are supplied, only show those
291 ** changes on a direct path from orig to ci.
292 ** showid Show RID values for debugging
293 **
294 ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
295 ** year-month-day form, it may be truncated, and it may also name a
@@ -371,13 +371,13 @@
371 " datetime(min(event.mtime),toLocal())," /* Date of change */
372 " coalesce(event.ecomment, event.comment)," /* Check-in comment */
373 " coalesce(event.euser, event.user)," /* User who made chng */
374 " mlink.pid," /* Parent file rid */
375 " mlink.fid," /* File rid */
376 " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
377 " blob.uuid," /* Current file uuid */
378 " (SELECT uuid FROM blob WHERE rid=mlink.mid)," /* Check-in uuid */
379 " event.bgcolor," /* Background color */
380 " (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
381 " AND tagxref.rid=mlink.mid)," /* Branchname */
382 " mlink.mid," /* check-in ID */
383 " mlink.pfnid," /* Previous filename */
@@ -541,13 +541,13 @@
541 if( tmFlags & TIMELINE_COMPACT ){
542 @ <span class='timelineCompactComment' data-id='%d(frid)'>
543 }else{
544 @ <span class='timeline%s(zStyle)Comment'>
545 if( (tmFlags & TIMELINE_VERBOSE)!=0 && zUuid ){
546 hyperlink_to_uuid(zUuid);
547 @ part of check-in \
548 hyperlink_to_uuid(zCkin);
549 }
550 }
551 @ %W(zCom)</span>
552 if( (tmFlags & TIMELINE_COMPACT)!=0 ){
553 @ <span class='timelineEllipsis' data-id='%d(frid)' \
@@ -576,11 +576,11 @@
576 @ id:&nbsp;%d(frid)
577 }
578 }
579 }
580 @ check-in:&nbsp;\
581 hyperlink_to_uuid(zCkin);
582 if( fShowId ){
583 @ (%d(fmid))
584 }
585 @ user:&nbsp;\
586 hyperlink_to_user(zUser, zDate, ",");
587
--- src/finfo.c
+++ src/finfo.c
@@ -284,12 +284,12 @@
284 ** b=DATETIME Only show changes before DATETIME
285 ** m=HASH Mark this particular file version
286 ** n=NUM Show the first NUM changes only
287 ** brbg Background color by branch name
288 ** ubg Background color by user name
289 ** ci=HASH Ancestors of a particular check-in
290 ** orig=HASH If both ci and orig are supplied, only show those
291 ** changes on a direct path from orig to ci.
292 ** showid Show RID values for debugging
293 **
294 ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
295 ** year-month-day form, it may be truncated, and it may also name a
@@ -371,13 +371,13 @@
371 " datetime(min(event.mtime),toLocal())," /* Date of change */
372 " coalesce(event.ecomment, event.comment)," /* Check-in comment */
373 " coalesce(event.euser, event.user)," /* User who made chng */
374 " mlink.pid," /* Parent file rid */
375 " mlink.fid," /* File rid */
376 " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file hash */
377 " blob.uuid," /* Current file hash */
378 " (SELECT uuid FROM blob WHERE rid=mlink.mid)," /* Check-in hash */
379 " event.bgcolor," /* Background color */
380 " (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
381 " AND tagxref.rid=mlink.mid)," /* Branchname */
382 " mlink.mid," /* check-in ID */
383 " mlink.pfnid," /* Previous filename */
@@ -541,13 +541,13 @@
541 if( tmFlags & TIMELINE_COMPACT ){
542 @ <span class='timelineCompactComment' data-id='%d(frid)'>
543 }else{
544 @ <span class='timeline%s(zStyle)Comment'>
545 if( (tmFlags & TIMELINE_VERBOSE)!=0 && zUuid ){
546 hyperlink_to_version(zUuid);
547 @ part of check-in \
548 hyperlink_to_version(zCkin);
549 }
550 }
551 @ %W(zCom)</span>
552 if( (tmFlags & TIMELINE_COMPACT)!=0 ){
553 @ <span class='timelineEllipsis' data-id='%d(frid)' \
@@ -576,11 +576,11 @@
576 @ id:&nbsp;%d(frid)
577 }
578 }
579 }
580 @ check-in:&nbsp;\
581 hyperlink_to_version(zCkin);
582 if( fShowId ){
583 @ (%d(fmid))
584 }
585 @ user:&nbsp;\
586 hyperlink_to_user(zUser, zDate, ",");
587
+10 -9
--- src/import.c
+++ src/import.c
@@ -26,11 +26,11 @@
2626
/*
2727
** A single file change record.
2828
*/
2929
struct ImportFile {
3030
char *zName; /* Name of a file */
31
- char *zUuid; /* UUID of the file */
31
+ char *zUuid; /* Hash of the file */
3232
char *zPrior; /* Prior name if the name was changed */
3333
char isFrom; /* True if obtained from the parent */
3434
char isExe; /* True if executable */
3535
char isLink; /* True if symlink */
3636
};
@@ -59,11 +59,11 @@
5959
char *aData; /* Data content */
6060
char *zMark; /* The current mark */
6161
char *zDate; /* Date/time stamp */
6262
char *zUser; /* User name */
6363
char *zComment; /* Comment of a commit */
64
- char *zFrom; /* from value as a UUID */
64
+ char *zFrom; /* from value as a hash */
6565
char *zPrevCheckin; /* Name of the previous check-in */
6666
char *zFromMark; /* The mark of the "from" field */
6767
int nMerge; /* Number of merge values */
6868
int nMergeAlloc; /* Number of slots in azMerge[] */
6969
char **azMerge; /* Merge values */
@@ -143,17 +143,17 @@
143143
/*
144144
** Insert an artifact into the BLOB table if it isn't there already.
145145
** If zMark is not zero, create a cross-reference from that mark back
146146
** to the newly inserted artifact.
147147
**
148
-** If saveUuid is true, then pContent is a commit record. Record its
149
-** UUID in gg.zPrevCheckin.
148
+** If saveHash is true, then pContent is a commit record. Record its
149
+** artifact hash in gg.zPrevCheckin.
150150
*/
151151
static int fast_insert_content(
152152
Blob *pContent, /* Content to insert */
153153
const char *zMark, /* Label using this mark, if not NULL */
154
- int saveUuid, /* Save artifact hash in gg.zPrevCheckin */
154
+ int saveHash, /* Save artifact hash in gg.zPrevCheckin */
155155
int doParse /* Invoke manifest_crosslink() */
156156
){
157157
Blob hash;
158158
Blob cmpr;
159159
int rid;
@@ -187,11 +187,11 @@
187187
"INSERT OR IGNORE INTO xmark(tname, trid, tuuid)"
188188
"VALUES(%B,%d,%B)",
189189
&hash, rid, &hash
190190
);
191191
}
192
- if( saveUuid ){
192
+ if( saveHash ){
193193
fossil_free(gg.zPrevCheckin);
194194
gg.zPrevCheckin = fossil_strdup(blob_str(&hash));
195195
}
196196
blob_reset(&hash);
197197
return rid;
@@ -411,11 +411,11 @@
411411
}
412412
return z;
413413
}
414414
415415
/*
416
-** Convert a "mark" or "committish" into the UUID.
416
+** Convert a "mark" or "committish" into the artifact hash.
417417
*/
418418
static char *resolve_committish(const char *zCommittish){
419419
char *zRes;
420420
421421
zRes = db_text(0, "SELECT tuuid FROM xmark WHERE tname=%Q", zCommittish);
@@ -1828,13 +1828,14 @@
18281828
bag_init(&vers);
18291829
/* The following temp-tables are used to hold information needed for
18301830
** the import.
18311831
**
18321832
** The XMARK table provides a mapping from fast-import "marks" and symbols
1833
- ** into artifact ids (UUIDs - the 40-byte hex SHA1 hash of artifacts).
1833
+ ** into artifact hashes.
1834
+ **
18341835
** Given any valid fast-import symbol, the corresponding fossil rid and
1835
- ** uuid can found by searching against the xmark.tname field.
1836
+ ** hash can found by searching against the xmark.tname field.
18361837
**
18371838
** The XBRANCH table maps commit marks and symbols into the branch those
18381839
** commits belong to. If xbranch.tname is a fast-import symbol for a
18391840
** check-in then xbranch.brnm is the branch that check-in is part of.
18401841
**
18411842
--- src/import.c
+++ src/import.c
@@ -26,11 +26,11 @@
26 /*
27 ** A single file change record.
28 */
29 struct ImportFile {
30 char *zName; /* Name of a file */
31 char *zUuid; /* UUID of the file */
32 char *zPrior; /* Prior name if the name was changed */
33 char isFrom; /* True if obtained from the parent */
34 char isExe; /* True if executable */
35 char isLink; /* True if symlink */
36 };
@@ -59,11 +59,11 @@
59 char *aData; /* Data content */
60 char *zMark; /* The current mark */
61 char *zDate; /* Date/time stamp */
62 char *zUser; /* User name */
63 char *zComment; /* Comment of a commit */
64 char *zFrom; /* from value as a UUID */
65 char *zPrevCheckin; /* Name of the previous check-in */
66 char *zFromMark; /* The mark of the "from" field */
67 int nMerge; /* Number of merge values */
68 int nMergeAlloc; /* Number of slots in azMerge[] */
69 char **azMerge; /* Merge values */
@@ -143,17 +143,17 @@
143 /*
144 ** Insert an artifact into the BLOB table if it isn't there already.
145 ** If zMark is not zero, create a cross-reference from that mark back
146 ** to the newly inserted artifact.
147 **
148 ** If saveUuid is true, then pContent is a commit record. Record its
149 ** UUID in gg.zPrevCheckin.
150 */
151 static int fast_insert_content(
152 Blob *pContent, /* Content to insert */
153 const char *zMark, /* Label using this mark, if not NULL */
154 int saveUuid, /* Save artifact hash in gg.zPrevCheckin */
155 int doParse /* Invoke manifest_crosslink() */
156 ){
157 Blob hash;
158 Blob cmpr;
159 int rid;
@@ -187,11 +187,11 @@
187 "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)"
188 "VALUES(%B,%d,%B)",
189 &hash, rid, &hash
190 );
191 }
192 if( saveUuid ){
193 fossil_free(gg.zPrevCheckin);
194 gg.zPrevCheckin = fossil_strdup(blob_str(&hash));
195 }
196 blob_reset(&hash);
197 return rid;
@@ -411,11 +411,11 @@
411 }
412 return z;
413 }
414
415 /*
416 ** Convert a "mark" or "committish" into the UUID.
417 */
418 static char *resolve_committish(const char *zCommittish){
419 char *zRes;
420
421 zRes = db_text(0, "SELECT tuuid FROM xmark WHERE tname=%Q", zCommittish);
@@ -1828,13 +1828,14 @@
1828 bag_init(&vers);
1829 /* The following temp-tables are used to hold information needed for
1830 ** the import.
1831 **
1832 ** The XMARK table provides a mapping from fast-import "marks" and symbols
1833 ** into artifact ids (UUIDs - the 40-byte hex SHA1 hash of artifacts).
 
1834 ** Given any valid fast-import symbol, the corresponding fossil rid and
1835 ** uuid can found by searching against the xmark.tname field.
1836 **
1837 ** The XBRANCH table maps commit marks and symbols into the branch those
1838 ** commits belong to. If xbranch.tname is a fast-import symbol for a
1839 ** check-in then xbranch.brnm is the branch that check-in is part of.
1840 **
1841
--- src/import.c
+++ src/import.c
@@ -26,11 +26,11 @@
26 /*
27 ** A single file change record.
28 */
29 struct ImportFile {
30 char *zName; /* Name of a file */
31 char *zUuid; /* Hash of the file */
32 char *zPrior; /* Prior name if the name was changed */
33 char isFrom; /* True if obtained from the parent */
34 char isExe; /* True if executable */
35 char isLink; /* True if symlink */
36 };
@@ -59,11 +59,11 @@
59 char *aData; /* Data content */
60 char *zMark; /* The current mark */
61 char *zDate; /* Date/time stamp */
62 char *zUser; /* User name */
63 char *zComment; /* Comment of a commit */
64 char *zFrom; /* from value as a hash */
65 char *zPrevCheckin; /* Name of the previous check-in */
66 char *zFromMark; /* The mark of the "from" field */
67 int nMerge; /* Number of merge values */
68 int nMergeAlloc; /* Number of slots in azMerge[] */
69 char **azMerge; /* Merge values */
@@ -143,17 +143,17 @@
143 /*
144 ** Insert an artifact into the BLOB table if it isn't there already.
145 ** If zMark is not zero, create a cross-reference from that mark back
146 ** to the newly inserted artifact.
147 **
148 ** If saveHash is true, then pContent is a commit record. Record its
149 ** artifact hash in gg.zPrevCheckin.
150 */
151 static int fast_insert_content(
152 Blob *pContent, /* Content to insert */
153 const char *zMark, /* Label using this mark, if not NULL */
154 int saveHash, /* Save artifact hash in gg.zPrevCheckin */
155 int doParse /* Invoke manifest_crosslink() */
156 ){
157 Blob hash;
158 Blob cmpr;
159 int rid;
@@ -187,11 +187,11 @@
187 "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)"
188 "VALUES(%B,%d,%B)",
189 &hash, rid, &hash
190 );
191 }
192 if( saveHash ){
193 fossil_free(gg.zPrevCheckin);
194 gg.zPrevCheckin = fossil_strdup(blob_str(&hash));
195 }
196 blob_reset(&hash);
197 return rid;
@@ -411,11 +411,11 @@
411 }
412 return z;
413 }
414
415 /*
416 ** Convert a "mark" or "committish" into the artifact hash.
417 */
418 static char *resolve_committish(const char *zCommittish){
419 char *zRes;
420
421 zRes = db_text(0, "SELECT tuuid FROM xmark WHERE tname=%Q", zCommittish);
@@ -1828,13 +1828,14 @@
1828 bag_init(&vers);
1829 /* The following temp-tables are used to hold information needed for
1830 ** the import.
1831 **
1832 ** The XMARK table provides a mapping from fast-import "marks" and symbols
1833 ** into artifact hashes.
1834 **
1835 ** Given any valid fast-import symbol, the corresponding fossil rid and
1836 ** hash can found by searching against the xmark.tname field.
1837 **
1838 ** The XBRANCH table maps commit marks and symbols into the branch those
1839 ** commits belong to. If xbranch.tname is a fast-import symbol for a
1840 ** check-in then xbranch.brnm is the branch that check-in is part of.
1841 **
1842
+29 -27
--- src/info.c
+++ src/info.c
@@ -44,19 +44,19 @@
4444
4545
4646
/*
4747
** Print common information about a particular record.
4848
**
49
-** * The UUID
49
+** * The artifact hash
5050
** * The record ID
5151
** * mtime and ctime
5252
** * who signed it
5353
**
5454
*/
5555
void show_common_info(
5656
int rid, /* The rid for the check-in to display info for */
57
- const char *zUuidName, /* Name of the UUID */
57
+ const char *zRecDesc, /* Brief record description; e.g. "checkout:" */
5858
int showComment, /* True to show the check-in comment */
5959
int showFamily /* True to show parents and children */
6060
){
6161
Stmt q;
6262
char *zComment = 0;
@@ -68,11 +68,11 @@
6868
zDate = db_text(0,
6969
"SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
7070
rid
7171
);
7272
/* 01234567890123 */
73
- fossil_print("%-13s %.40s %s\n", zUuidName, zUuid, zDate ? zDate : "");
73
+ fossil_print("%-13s %.40s %s\n", zRecDesc, zUuid, zDate ? zDate : "");
7474
free(zDate);
7575
if( showComment ){
7676
zComment = db_text(0,
7777
"SELECT coalesce(ecomment,comment) || "
7878
" ' (user: ' || coalesce(euser,user,'?') || ')' "
@@ -264,11 +264,11 @@
264264
int rid;
265265
rid = name_to_rid(g.argv[2]);
266266
if( rid==0 ){
267267
fossil_fatal("no such object: %s", g.argv[2]);
268268
}
269
- show_common_info(rid, "uuid:", 1, 1);
269
+ show_common_info(rid, "hash:", 1, 1);
270270
}
271271
}
272272
273273
/*
274274
** Show the context graph (immediate parents and children) for
@@ -536,11 +536,11 @@
536536
@ <span class="infoTag">%h(zTagname)</span>
537537
}
538538
if( tagtype==2 ){
539539
if( zOrigUuid && zOrigUuid[0] ){
540540
@ inherited from
541
- hyperlink_to_uuid(zOrigUuid);
541
+ hyperlink_to_version(zOrigUuid);
542542
}else{
543543
@ propagates to descendants
544544
}
545545
}
546546
if( zSrcUuid && zSrcUuid[0] ){
@@ -547,11 +547,11 @@
547547
if( tagtype==0 ){
548548
@ by
549549
}else{
550550
@ added by
551551
}
552
- hyperlink_to_uuid(zSrcUuid);
552
+ hyperlink_to_version(zSrcUuid);
553553
@ on
554554
hyperlink_to_date(zDate,0);
555555
}
556556
@ </li>
557557
}
@@ -613,12 +613,12 @@
613613
int rid;
614614
int isLeaf;
615615
int diffType; /* 0: no diff, 1: unified, 2: side-by-side */
616616
u64 diffFlags; /* Flag parameter for text_diff() */
617617
const char *zName; /* Name of the check-in to be displayed */
618
- const char *zUuid; /* UUID of zName */
619
- const char *zParent; /* UUID of the parent check-in (if any) */
618
+ const char *zUuid; /* Hash of zName, found via blob.uuid */
619
+ const char *zParent; /* Hash of the parent check-in (if any) */
620620
const char *zRe; /* regex parameter */
621621
ReCompiled *pRe = 0; /* regex */
622622
const char *zW; /* URL param for ignoring whitespace */
623623
const char *zPage = "vinfo"; /* Page that shows diffs */
624624
const char *zPageHide = "ci"; /* Page that hides diffs */
@@ -939,11 +939,11 @@
939939
style_footer();
940940
}
941941
942942
/*
943943
** WEBPAGE: winfo
944
-** URL: /winfo?name=UUID
944
+** URL: /winfo?name=HASH
945945
**
946946
** Display information about a wiki page.
947947
*/
948948
void winfo_page(void){
949949
int rid;
@@ -1100,11 +1100,11 @@
11001100
Blob comment;
11011101
int wikiFlags = WIKI_INLINE|WIKI_NOBADLINKS;
11021102
if( db_get_boolean("timeline-block-markup", 0)==0 ){
11031103
wikiFlags |= WIKI_NOBLOCK;
11041104
}
1105
- hyperlink_to_uuid(zUuid);
1105
+ hyperlink_to_version(zUuid);
11061106
blob_zero(&comment);
11071107
db_column_blob(&q, 2, &comment);
11081108
wiki_convert(&comment, 0, wikiFlags);
11091109
blob_reset(&comment);
11101110
@ (user:
@@ -1428,14 +1428,14 @@
14281428
}
14291429
if( showDetail ){
14301430
@ <li>
14311431
hyperlink_to_date(zDate,"");
14321432
@ &mdash; part of check-in
1433
- hyperlink_to_uuid(zVers);
1433
+ hyperlink_to_version(zVers);
14341434
}else{
14351435
@ &mdash; part of check-in
1436
- hyperlink_to_uuid(zVers);
1436
+ hyperlink_to_version(zVers);
14371437
@ at
14381438
hyperlink_to_date(zDate,"");
14391439
}
14401440
if( zBr && zBr[0] ){
14411441
@ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a>
@@ -1534,11 +1534,11 @@
15341534
@ Forum post
15351535
}else{
15361536
@ Tag referencing
15371537
}
15381538
if( zType[0]!='e' || eventTagId == 0){
1539
- hyperlink_to_uuid(zUuid);
1539
+ hyperlink_to_version(zUuid);
15401540
}
15411541
@ - %!W(zCom) by
15421542
hyperlink_to_user(zUser,zDate," on");
15431543
hyperlink_to_date(zDate, ".");
15441544
if( pDownloadName && blob_size(pDownloadName)==0 ){
@@ -1566,11 +1566,11 @@
15661566
@ Also attachment "%h(zFilename)" to
15671567
}else{
15681568
@ Attachment "%h(zFilename)" to
15691569
}
15701570
objType |= OBJTYPE_ATTACHMENT;
1571
- if( fossil_is_uuid(zTarget) ){
1571
+ if( fossil_is_artifact_hash(zTarget) ){
15721572
if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
15731573
zTarget)
15741574
){
15751575
if( g.perm.Hyperlink && g.anon.RdTkt ){
15761576
@ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>]
@@ -1625,11 +1625,11 @@
16251625
}
16261626
16271627
16281628
/*
16291629
** WEBPAGE: fdiff
1630
-** URL: fdiff?v1=UUID&v2=UUID
1630
+** URL: fdiff?v1=HASH&v2=HASH
16311631
**
16321632
** Two arguments, v1 and v2, identify the artifacts to be diffed.
16331633
** Show diff side by side unless sbs is 0. Generate plain text if
16341634
** "patch" is present, otherwise generate "pretty" HTML.
16351635
**
@@ -1801,18 +1801,18 @@
18011801
** is by the full-length SHA1 or SHA3 hash. Abbreviations are not
18021802
** accepted.
18031803
*/
18041804
void secure_rawartifact_page(void){
18051805
int rid = 0;
1806
- const char *zUuid = PD("name", "");
1806
+ const char *zName = PD("name", "");
18071807
18081808
login_check_credentials();
18091809
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1810
- rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zUuid);
1810
+ rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName);
18111811
if( rid==0 ){
18121812
cgi_set_status(404, "Not Found");
1813
- @ Unknown artifact: "%h(zUuid)"
1813
+ @ Unknown artifact: "%h(zName)"
18141814
return;
18151815
}
18161816
g.isConst = 1;
18171817
deliver_artifact(rid, P("m"));
18181818
}
@@ -2527,16 +2527,18 @@
25272527
}
25282528
25292529
25302530
/*
25312531
** WEBPAGE: info
2532
-** URL: info/ARTIFACTID
2532
+** URL: info/NAME
25332533
**
2534
-** The argument is a artifact ID which might be a check-in or a file or
2535
-** a ticket changes or a wiki edit or something else.
2534
+** The NAME argument is any valid artifact name: an artifact hash,
2535
+** a timestamp, a tag name, etc.
25362536
**
2537
-** Figure out what the artifact ID is and display it appropriately.
2537
+** Because NAME can match so many different things (commit artifacts,
2538
+** wiki pages, ticket comments, forum posts...) the format of the output
2539
+** page depends on the type of artifact that NAME matches.
25382540
*/
25392541
void info_page(void){
25402542
const char *zName;
25412543
Blob uuid;
25422544
int rid;
@@ -3146,17 +3148,17 @@
31463148
blob_append(&prompt, ".\n# Lines beginning with a # are ignored.\n", -1);
31473149
prompt_for_user_comment(pComment, &prompt);
31483150
blob_reset(&prompt);
31493151
}
31503152
3151
-#define AMEND_USAGE_STMT "UUID OPTION ?OPTION ...?"
3153
+#define AMEND_USAGE_STMT "HASH OPTION ?OPTION ...?"
31523154
/*
31533155
** COMMAND: amend
31543156
**
3155
-** Usage: %fossil amend UUID OPTION ?OPTION ...?
3157
+** Usage: %fossil amend HASH OPTION ?OPTION ...?
31563158
**
3157
-** Amend the tags on check-in UUID to change how it displays in the timeline.
3159
+** Amend the tags on check-in HASH to change how it displays in the timeline.
31583160
**
31593161
** Options:
31603162
**
31613163
** --author USER Make USER the author for check-in
31623164
** -m|--comment COMMENT Make COMMENT the check-in comment
@@ -3240,11 +3242,11 @@
32403242
verify_all_options();
32413243
if( g.argc<3 || g.argc>=4 ) usage(AMEND_USAGE_STMT);
32423244
rid = name_to_typed_rid(g.argv[2], "ci");
32433245
if( rid==0 && !is_a_version(rid) ) fossil_fatal("no such check-in");
32443246
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
3245
- if( zUuid==0 ) fossil_fatal("Unable to find UUID");
3247
+ if( zUuid==0 ) fossil_fatal("Unable to find artifact hash");
32463248
zComment = db_text(0, "SELECT coalesce(ecomment,comment)"
32473249
" FROM event WHERE objid=%d", rid);
32483250
zUser = db_text(0, "SELECT coalesce(euser,user)"
32493251
" FROM event WHERE objid=%d", rid);
32503252
zDate = db_text(0, "SELECT datetime(mtime)"
@@ -3330,11 +3332,11 @@
33303332
if( fHide && !fHasHidden ) hide_branch();
33313333
if( fClose && !fHasClosed ) close_leaf(rid);
33323334
if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
33333335
apply_newtags(&ctrl, rid, zUuid, zUserOvrd, fDryRun);
33343336
if( fDryRun==0 ){
3335
- show_common_info(rid, "uuid:", 1, 0);
3337
+ show_common_info(rid, "hash:", 1, 0);
33363338
}
33373339
if( g.localOpen ){
33383340
manifest_to_disk(rid);
33393341
}
33403342
}
33413343
--- src/info.c
+++ src/info.c
@@ -44,19 +44,19 @@
44
45
46 /*
47 ** Print common information about a particular record.
48 **
49 ** * The UUID
50 ** * The record ID
51 ** * mtime and ctime
52 ** * who signed it
53 **
54 */
55 void show_common_info(
56 int rid, /* The rid for the check-in to display info for */
57 const char *zUuidName, /* Name of the UUID */
58 int showComment, /* True to show the check-in comment */
59 int showFamily /* True to show parents and children */
60 ){
61 Stmt q;
62 char *zComment = 0;
@@ -68,11 +68,11 @@
68 zDate = db_text(0,
69 "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
70 rid
71 );
72 /* 01234567890123 */
73 fossil_print("%-13s %.40s %s\n", zUuidName, zUuid, zDate ? zDate : "");
74 free(zDate);
75 if( showComment ){
76 zComment = db_text(0,
77 "SELECT coalesce(ecomment,comment) || "
78 " ' (user: ' || coalesce(euser,user,'?') || ')' "
@@ -264,11 +264,11 @@
264 int rid;
265 rid = name_to_rid(g.argv[2]);
266 if( rid==0 ){
267 fossil_fatal("no such object: %s", g.argv[2]);
268 }
269 show_common_info(rid, "uuid:", 1, 1);
270 }
271 }
272
273 /*
274 ** Show the context graph (immediate parents and children) for
@@ -536,11 +536,11 @@
536 @ <span class="infoTag">%h(zTagname)</span>
537 }
538 if( tagtype==2 ){
539 if( zOrigUuid && zOrigUuid[0] ){
540 @ inherited from
541 hyperlink_to_uuid(zOrigUuid);
542 }else{
543 @ propagates to descendants
544 }
545 }
546 if( zSrcUuid && zSrcUuid[0] ){
@@ -547,11 +547,11 @@
547 if( tagtype==0 ){
548 @ by
549 }else{
550 @ added by
551 }
552 hyperlink_to_uuid(zSrcUuid);
553 @ on
554 hyperlink_to_date(zDate,0);
555 }
556 @ </li>
557 }
@@ -613,12 +613,12 @@
613 int rid;
614 int isLeaf;
615 int diffType; /* 0: no diff, 1: unified, 2: side-by-side */
616 u64 diffFlags; /* Flag parameter for text_diff() */
617 const char *zName; /* Name of the check-in to be displayed */
618 const char *zUuid; /* UUID of zName */
619 const char *zParent; /* UUID of the parent check-in (if any) */
620 const char *zRe; /* regex parameter */
621 ReCompiled *pRe = 0; /* regex */
622 const char *zW; /* URL param for ignoring whitespace */
623 const char *zPage = "vinfo"; /* Page that shows diffs */
624 const char *zPageHide = "ci"; /* Page that hides diffs */
@@ -939,11 +939,11 @@
939 style_footer();
940 }
941
942 /*
943 ** WEBPAGE: winfo
944 ** URL: /winfo?name=UUID
945 **
946 ** Display information about a wiki page.
947 */
948 void winfo_page(void){
949 int rid;
@@ -1100,11 +1100,11 @@
1100 Blob comment;
1101 int wikiFlags = WIKI_INLINE|WIKI_NOBADLINKS;
1102 if( db_get_boolean("timeline-block-markup", 0)==0 ){
1103 wikiFlags |= WIKI_NOBLOCK;
1104 }
1105 hyperlink_to_uuid(zUuid);
1106 blob_zero(&comment);
1107 db_column_blob(&q, 2, &comment);
1108 wiki_convert(&comment, 0, wikiFlags);
1109 blob_reset(&comment);
1110 @ (user:
@@ -1428,14 +1428,14 @@
1428 }
1429 if( showDetail ){
1430 @ <li>
1431 hyperlink_to_date(zDate,"");
1432 @ &mdash; part of check-in
1433 hyperlink_to_uuid(zVers);
1434 }else{
1435 @ &mdash; part of check-in
1436 hyperlink_to_uuid(zVers);
1437 @ at
1438 hyperlink_to_date(zDate,"");
1439 }
1440 if( zBr && zBr[0] ){
1441 @ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a>
@@ -1534,11 +1534,11 @@
1534 @ Forum post
1535 }else{
1536 @ Tag referencing
1537 }
1538 if( zType[0]!='e' || eventTagId == 0){
1539 hyperlink_to_uuid(zUuid);
1540 }
1541 @ - %!W(zCom) by
1542 hyperlink_to_user(zUser,zDate," on");
1543 hyperlink_to_date(zDate, ".");
1544 if( pDownloadName && blob_size(pDownloadName)==0 ){
@@ -1566,11 +1566,11 @@
1566 @ Also attachment "%h(zFilename)" to
1567 }else{
1568 @ Attachment "%h(zFilename)" to
1569 }
1570 objType |= OBJTYPE_ATTACHMENT;
1571 if( fossil_is_uuid(zTarget) ){
1572 if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
1573 zTarget)
1574 ){
1575 if( g.perm.Hyperlink && g.anon.RdTkt ){
1576 @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>]
@@ -1625,11 +1625,11 @@
1625 }
1626
1627
1628 /*
1629 ** WEBPAGE: fdiff
1630 ** URL: fdiff?v1=UUID&v2=UUID
1631 **
1632 ** Two arguments, v1 and v2, identify the artifacts to be diffed.
1633 ** Show diff side by side unless sbs is 0. Generate plain text if
1634 ** "patch" is present, otherwise generate "pretty" HTML.
1635 **
@@ -1801,18 +1801,18 @@
1801 ** is by the full-length SHA1 or SHA3 hash. Abbreviations are not
1802 ** accepted.
1803 */
1804 void secure_rawartifact_page(void){
1805 int rid = 0;
1806 const char *zUuid = PD("name", "");
1807
1808 login_check_credentials();
1809 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1810 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zUuid);
1811 if( rid==0 ){
1812 cgi_set_status(404, "Not Found");
1813 @ Unknown artifact: "%h(zUuid)"
1814 return;
1815 }
1816 g.isConst = 1;
1817 deliver_artifact(rid, P("m"));
1818 }
@@ -2527,16 +2527,18 @@
2527 }
2528
2529
2530 /*
2531 ** WEBPAGE: info
2532 ** URL: info/ARTIFACTID
2533 **
2534 ** The argument is a artifact ID which might be a check-in or a file or
2535 ** a ticket changes or a wiki edit or something else.
2536 **
2537 ** Figure out what the artifact ID is and display it appropriately.
 
 
2538 */
2539 void info_page(void){
2540 const char *zName;
2541 Blob uuid;
2542 int rid;
@@ -3146,17 +3148,17 @@
3146 blob_append(&prompt, ".\n# Lines beginning with a # are ignored.\n", -1);
3147 prompt_for_user_comment(pComment, &prompt);
3148 blob_reset(&prompt);
3149 }
3150
3151 #define AMEND_USAGE_STMT "UUID OPTION ?OPTION ...?"
3152 /*
3153 ** COMMAND: amend
3154 **
3155 ** Usage: %fossil amend UUID OPTION ?OPTION ...?
3156 **
3157 ** Amend the tags on check-in UUID to change how it displays in the timeline.
3158 **
3159 ** Options:
3160 **
3161 ** --author USER Make USER the author for check-in
3162 ** -m|--comment COMMENT Make COMMENT the check-in comment
@@ -3240,11 +3242,11 @@
3240 verify_all_options();
3241 if( g.argc<3 || g.argc>=4 ) usage(AMEND_USAGE_STMT);
3242 rid = name_to_typed_rid(g.argv[2], "ci");
3243 if( rid==0 && !is_a_version(rid) ) fossil_fatal("no such check-in");
3244 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
3245 if( zUuid==0 ) fossil_fatal("Unable to find UUID");
3246 zComment = db_text(0, "SELECT coalesce(ecomment,comment)"
3247 " FROM event WHERE objid=%d", rid);
3248 zUser = db_text(0, "SELECT coalesce(euser,user)"
3249 " FROM event WHERE objid=%d", rid);
3250 zDate = db_text(0, "SELECT datetime(mtime)"
@@ -3330,11 +3332,11 @@
3330 if( fHide && !fHasHidden ) hide_branch();
3331 if( fClose && !fHasClosed ) close_leaf(rid);
3332 if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
3333 apply_newtags(&ctrl, rid, zUuid, zUserOvrd, fDryRun);
3334 if( fDryRun==0 ){
3335 show_common_info(rid, "uuid:", 1, 0);
3336 }
3337 if( g.localOpen ){
3338 manifest_to_disk(rid);
3339 }
3340 }
3341
--- src/info.c
+++ src/info.c
@@ -44,19 +44,19 @@
44
45
46 /*
47 ** Print common information about a particular record.
48 **
49 ** * The artifact hash
50 ** * The record ID
51 ** * mtime and ctime
52 ** * who signed it
53 **
54 */
55 void show_common_info(
56 int rid, /* The rid for the check-in to display info for */
57 const char *zRecDesc, /* Brief record description; e.g. "checkout:" */
58 int showComment, /* True to show the check-in comment */
59 int showFamily /* True to show parents and children */
60 ){
61 Stmt q;
62 char *zComment = 0;
@@ -68,11 +68,11 @@
68 zDate = db_text(0,
69 "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
70 rid
71 );
72 /* 01234567890123 */
73 fossil_print("%-13s %.40s %s\n", zRecDesc, zUuid, zDate ? zDate : "");
74 free(zDate);
75 if( showComment ){
76 zComment = db_text(0,
77 "SELECT coalesce(ecomment,comment) || "
78 " ' (user: ' || coalesce(euser,user,'?') || ')' "
@@ -264,11 +264,11 @@
264 int rid;
265 rid = name_to_rid(g.argv[2]);
266 if( rid==0 ){
267 fossil_fatal("no such object: %s", g.argv[2]);
268 }
269 show_common_info(rid, "hash:", 1, 1);
270 }
271 }
272
273 /*
274 ** Show the context graph (immediate parents and children) for
@@ -536,11 +536,11 @@
536 @ <span class="infoTag">%h(zTagname)</span>
537 }
538 if( tagtype==2 ){
539 if( zOrigUuid && zOrigUuid[0] ){
540 @ inherited from
541 hyperlink_to_version(zOrigUuid);
542 }else{
543 @ propagates to descendants
544 }
545 }
546 if( zSrcUuid && zSrcUuid[0] ){
@@ -547,11 +547,11 @@
547 if( tagtype==0 ){
548 @ by
549 }else{
550 @ added by
551 }
552 hyperlink_to_version(zSrcUuid);
553 @ on
554 hyperlink_to_date(zDate,0);
555 }
556 @ </li>
557 }
@@ -613,12 +613,12 @@
613 int rid;
614 int isLeaf;
615 int diffType; /* 0: no diff, 1: unified, 2: side-by-side */
616 u64 diffFlags; /* Flag parameter for text_diff() */
617 const char *zName; /* Name of the check-in to be displayed */
618 const char *zUuid; /* Hash of zName, found via blob.uuid */
619 const char *zParent; /* Hash of the parent check-in (if any) */
620 const char *zRe; /* regex parameter */
621 ReCompiled *pRe = 0; /* regex */
622 const char *zW; /* URL param for ignoring whitespace */
623 const char *zPage = "vinfo"; /* Page that shows diffs */
624 const char *zPageHide = "ci"; /* Page that hides diffs */
@@ -939,11 +939,11 @@
939 style_footer();
940 }
941
942 /*
943 ** WEBPAGE: winfo
944 ** URL: /winfo?name=HASH
945 **
946 ** Display information about a wiki page.
947 */
948 void winfo_page(void){
949 int rid;
@@ -1100,11 +1100,11 @@
1100 Blob comment;
1101 int wikiFlags = WIKI_INLINE|WIKI_NOBADLINKS;
1102 if( db_get_boolean("timeline-block-markup", 0)==0 ){
1103 wikiFlags |= WIKI_NOBLOCK;
1104 }
1105 hyperlink_to_version(zUuid);
1106 blob_zero(&comment);
1107 db_column_blob(&q, 2, &comment);
1108 wiki_convert(&comment, 0, wikiFlags);
1109 blob_reset(&comment);
1110 @ (user:
@@ -1428,14 +1428,14 @@
1428 }
1429 if( showDetail ){
1430 @ <li>
1431 hyperlink_to_date(zDate,"");
1432 @ &mdash; part of check-in
1433 hyperlink_to_version(zVers);
1434 }else{
1435 @ &mdash; part of check-in
1436 hyperlink_to_version(zVers);
1437 @ at
1438 hyperlink_to_date(zDate,"");
1439 }
1440 if( zBr && zBr[0] ){
1441 @ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a>
@@ -1534,11 +1534,11 @@
1534 @ Forum post
1535 }else{
1536 @ Tag referencing
1537 }
1538 if( zType[0]!='e' || eventTagId == 0){
1539 hyperlink_to_version(zUuid);
1540 }
1541 @ - %!W(zCom) by
1542 hyperlink_to_user(zUser,zDate," on");
1543 hyperlink_to_date(zDate, ".");
1544 if( pDownloadName && blob_size(pDownloadName)==0 ){
@@ -1566,11 +1566,11 @@
1566 @ Also attachment "%h(zFilename)" to
1567 }else{
1568 @ Attachment "%h(zFilename)" to
1569 }
1570 objType |= OBJTYPE_ATTACHMENT;
1571 if( fossil_is_artifact_hash(zTarget) ){
1572 if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
1573 zTarget)
1574 ){
1575 if( g.perm.Hyperlink && g.anon.RdTkt ){
1576 @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>]
@@ -1625,11 +1625,11 @@
1625 }
1626
1627
1628 /*
1629 ** WEBPAGE: fdiff
1630 ** URL: fdiff?v1=HASH&v2=HASH
1631 **
1632 ** Two arguments, v1 and v2, identify the artifacts to be diffed.
1633 ** Show diff side by side unless sbs is 0. Generate plain text if
1634 ** "patch" is present, otherwise generate "pretty" HTML.
1635 **
@@ -1801,18 +1801,18 @@
1801 ** is by the full-length SHA1 or SHA3 hash. Abbreviations are not
1802 ** accepted.
1803 */
1804 void secure_rawartifact_page(void){
1805 int rid = 0;
1806 const char *zName = PD("name", "");
1807
1808 login_check_credentials();
1809 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1810 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName);
1811 if( rid==0 ){
1812 cgi_set_status(404, "Not Found");
1813 @ Unknown artifact: "%h(zName)"
1814 return;
1815 }
1816 g.isConst = 1;
1817 deliver_artifact(rid, P("m"));
1818 }
@@ -2527,16 +2527,18 @@
2527 }
2528
2529
2530 /*
2531 ** WEBPAGE: info
2532 ** URL: info/NAME
2533 **
2534 ** The NAME argument is any valid artifact name: an artifact hash,
2535 ** a timestamp, a tag name, etc.
2536 **
2537 ** Because NAME can match so many different things (commit artifacts,
2538 ** wiki pages, ticket comments, forum posts...) the format of the output
2539 ** page depends on the type of artifact that NAME matches.
2540 */
2541 void info_page(void){
2542 const char *zName;
2543 Blob uuid;
2544 int rid;
@@ -3146,17 +3148,17 @@
3148 blob_append(&prompt, ".\n# Lines beginning with a # are ignored.\n", -1);
3149 prompt_for_user_comment(pComment, &prompt);
3150 blob_reset(&prompt);
3151 }
3152
3153 #define AMEND_USAGE_STMT "HASH OPTION ?OPTION ...?"
3154 /*
3155 ** COMMAND: amend
3156 **
3157 ** Usage: %fossil amend HASH OPTION ?OPTION ...?
3158 **
3159 ** Amend the tags on check-in HASH to change how it displays in the timeline.
3160 **
3161 ** Options:
3162 **
3163 ** --author USER Make USER the author for check-in
3164 ** -m|--comment COMMENT Make COMMENT the check-in comment
@@ -3240,11 +3242,11 @@
3242 verify_all_options();
3243 if( g.argc<3 || g.argc>=4 ) usage(AMEND_USAGE_STMT);
3244 rid = name_to_typed_rid(g.argv[2], "ci");
3245 if( rid==0 && !is_a_version(rid) ) fossil_fatal("no such check-in");
3246 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
3247 if( zUuid==0 ) fossil_fatal("Unable to find artifact hash");
3248 zComment = db_text(0, "SELECT coalesce(ecomment,comment)"
3249 " FROM event WHERE objid=%d", rid);
3250 zUser = db_text(0, "SELECT coalesce(euser,user)"
3251 " FROM event WHERE objid=%d", rid);
3252 zDate = db_text(0, "SELECT datetime(mtime)"
@@ -3330,11 +3332,11 @@
3332 if( fHide && !fHasHidden ) hide_branch();
3333 if( fClose && !fHasClosed ) close_leaf(rid);
3334 if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
3335 apply_newtags(&ctrl, rid, zUuid, zUserOvrd, fDryRun);
3336 if( fDryRun==0 ){
3337 show_common_info(rid, "hash:", 1, 0);
3338 }
3339 if( g.localOpen ){
3340 manifest_to_disk(rid);
3341 }
3342 }
3343
+29 -27
--- src/info.c
+++ src/info.c
@@ -44,19 +44,19 @@
4444
4545
4646
/*
4747
** Print common information about a particular record.
4848
**
49
-** * The UUID
49
+** * The artifact hash
5050
** * The record ID
5151
** * mtime and ctime
5252
** * who signed it
5353
**
5454
*/
5555
void show_common_info(
5656
int rid, /* The rid for the check-in to display info for */
57
- const char *zUuidName, /* Name of the UUID */
57
+ const char *zRecDesc, /* Brief record description; e.g. "checkout:" */
5858
int showComment, /* True to show the check-in comment */
5959
int showFamily /* True to show parents and children */
6060
){
6161
Stmt q;
6262
char *zComment = 0;
@@ -68,11 +68,11 @@
6868
zDate = db_text(0,
6969
"SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
7070
rid
7171
);
7272
/* 01234567890123 */
73
- fossil_print("%-13s %.40s %s\n", zUuidName, zUuid, zDate ? zDate : "");
73
+ fossil_print("%-13s %.40s %s\n", zRecDesc, zUuid, zDate ? zDate : "");
7474
free(zDate);
7575
if( showComment ){
7676
zComment = db_text(0,
7777
"SELECT coalesce(ecomment,comment) || "
7878
" ' (user: ' || coalesce(euser,user,'?') || ')' "
@@ -264,11 +264,11 @@
264264
int rid;
265265
rid = name_to_rid(g.argv[2]);
266266
if( rid==0 ){
267267
fossil_fatal("no such object: %s", g.argv[2]);
268268
}
269
- show_common_info(rid, "uuid:", 1, 1);
269
+ show_common_info(rid, "hash:", 1, 1);
270270
}
271271
}
272272
273273
/*
274274
** Show the context graph (immediate parents and children) for
@@ -536,11 +536,11 @@
536536
@ <span class="infoTag">%h(zTagname)</span>
537537
}
538538
if( tagtype==2 ){
539539
if( zOrigUuid && zOrigUuid[0] ){
540540
@ inherited from
541
- hyperlink_to_uuid(zOrigUuid);
541
+ hyperlink_to_version(zOrigUuid);
542542
}else{
543543
@ propagates to descendants
544544
}
545545
}
546546
if( zSrcUuid && zSrcUuid[0] ){
@@ -547,11 +547,11 @@
547547
if( tagtype==0 ){
548548
@ by
549549
}else{
550550
@ added by
551551
}
552
- hyperlink_to_uuid(zSrcUuid);
552
+ hyperlink_to_version(zSrcUuid);
553553
@ on
554554
hyperlink_to_date(zDate,0);
555555
}
556556
@ </li>
557557
}
@@ -613,12 +613,12 @@
613613
int rid;
614614
int isLeaf;
615615
int diffType; /* 0: no diff, 1: unified, 2: side-by-side */
616616
u64 diffFlags; /* Flag parameter for text_diff() */
617617
const char *zName; /* Name of the check-in to be displayed */
618
- const char *zUuid; /* UUID of zName */
619
- const char *zParent; /* UUID of the parent check-in (if any) */
618
+ const char *zUuid; /* Hash of zName, found via blob.uuid */
619
+ const char *zParent; /* Hash of the parent check-in (if any) */
620620
const char *zRe; /* regex parameter */
621621
ReCompiled *pRe = 0; /* regex */
622622
const char *zW; /* URL param for ignoring whitespace */
623623
const char *zPage = "vinfo"; /* Page that shows diffs */
624624
const char *zPageHide = "ci"; /* Page that hides diffs */
@@ -939,11 +939,11 @@
939939
style_footer();
940940
}
941941
942942
/*
943943
** WEBPAGE: winfo
944
-** URL: /winfo?name=UUID
944
+** URL: /winfo?name=HASH
945945
**
946946
** Display information about a wiki page.
947947
*/
948948
void winfo_page(void){
949949
int rid;
@@ -1100,11 +1100,11 @@
11001100
Blob comment;
11011101
int wikiFlags = WIKI_INLINE|WIKI_NOBADLINKS;
11021102
if( db_get_boolean("timeline-block-markup", 0)==0 ){
11031103
wikiFlags |= WIKI_NOBLOCK;
11041104
}
1105
- hyperlink_to_uuid(zUuid);
1105
+ hyperlink_to_version(zUuid);
11061106
blob_zero(&comment);
11071107
db_column_blob(&q, 2, &comment);
11081108
wiki_convert(&comment, 0, wikiFlags);
11091109
blob_reset(&comment);
11101110
@ (user:
@@ -1428,14 +1428,14 @@
14281428
}
14291429
if( showDetail ){
14301430
@ <li>
14311431
hyperlink_to_date(zDate,"");
14321432
@ &mdash; part of check-in
1433
- hyperlink_to_uuid(zVers);
1433
+ hyperlink_to_version(zVers);
14341434
}else{
14351435
@ &mdash; part of check-in
1436
- hyperlink_to_uuid(zVers);
1436
+ hyperlink_to_version(zVers);
14371437
@ at
14381438
hyperlink_to_date(zDate,"");
14391439
}
14401440
if( zBr && zBr[0] ){
14411441
@ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a>
@@ -1534,11 +1534,11 @@
15341534
@ Forum post
15351535
}else{
15361536
@ Tag referencing
15371537
}
15381538
if( zType[0]!='e' || eventTagId == 0){
1539
- hyperlink_to_uuid(zUuid);
1539
+ hyperlink_to_version(zUuid);
15401540
}
15411541
@ - %!W(zCom) by
15421542
hyperlink_to_user(zUser,zDate," on");
15431543
hyperlink_to_date(zDate, ".");
15441544
if( pDownloadName && blob_size(pDownloadName)==0 ){
@@ -1566,11 +1566,11 @@
15661566
@ Also attachment "%h(zFilename)" to
15671567
}else{
15681568
@ Attachment "%h(zFilename)" to
15691569
}
15701570
objType |= OBJTYPE_ATTACHMENT;
1571
- if( fossil_is_uuid(zTarget) ){
1571
+ if( fossil_is_artifact_hash(zTarget) ){
15721572
if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
15731573
zTarget)
15741574
){
15751575
if( g.perm.Hyperlink && g.anon.RdTkt ){
15761576
@ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>]
@@ -1625,11 +1625,11 @@
16251625
}
16261626
16271627
16281628
/*
16291629
** WEBPAGE: fdiff
1630
-** URL: fdiff?v1=UUID&v2=UUID
1630
+** URL: fdiff?v1=HASH&v2=HASH
16311631
**
16321632
** Two arguments, v1 and v2, identify the artifacts to be diffed.
16331633
** Show diff side by side unless sbs is 0. Generate plain text if
16341634
** "patch" is present, otherwise generate "pretty" HTML.
16351635
**
@@ -1801,18 +1801,18 @@
18011801
** is by the full-length SHA1 or SHA3 hash. Abbreviations are not
18021802
** accepted.
18031803
*/
18041804
void secure_rawartifact_page(void){
18051805
int rid = 0;
1806
- const char *zUuid = PD("name", "");
1806
+ const char *zName = PD("name", "");
18071807
18081808
login_check_credentials();
18091809
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1810
- rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zUuid);
1810
+ rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName);
18111811
if( rid==0 ){
18121812
cgi_set_status(404, "Not Found");
1813
- @ Unknown artifact: "%h(zUuid)"
1813
+ @ Unknown artifact: "%h(zName)"
18141814
return;
18151815
}
18161816
g.isConst = 1;
18171817
deliver_artifact(rid, P("m"));
18181818
}
@@ -2527,16 +2527,18 @@
25272527
}
25282528
25292529
25302530
/*
25312531
** WEBPAGE: info
2532
-** URL: info/ARTIFACTID
2532
+** URL: info/NAME
25332533
**
2534
-** The argument is a artifact ID which might be a check-in or a file or
2535
-** a ticket changes or a wiki edit or something else.
2534
+** The NAME argument is any valid artifact name: an artifact hash,
2535
+** a timestamp, a tag name, etc.
25362536
**
2537
-** Figure out what the artifact ID is and display it appropriately.
2537
+** Because NAME can match so many different things (commit artifacts,
2538
+** wiki pages, ticket comments, forum posts...) the format of the output
2539
+** page depends on the type of artifact that NAME matches.
25382540
*/
25392541
void info_page(void){
25402542
const char *zName;
25412543
Blob uuid;
25422544
int rid;
@@ -3146,17 +3148,17 @@
31463148
blob_append(&prompt, ".\n# Lines beginning with a # are ignored.\n", -1);
31473149
prompt_for_user_comment(pComment, &prompt);
31483150
blob_reset(&prompt);
31493151
}
31503152
3151
-#define AMEND_USAGE_STMT "UUID OPTION ?OPTION ...?"
3153
+#define AMEND_USAGE_STMT "HASH OPTION ?OPTION ...?"
31523154
/*
31533155
** COMMAND: amend
31543156
**
3155
-** Usage: %fossil amend UUID OPTION ?OPTION ...?
3157
+** Usage: %fossil amend HASH OPTION ?OPTION ...?
31563158
**
3157
-** Amend the tags on check-in UUID to change how it displays in the timeline.
3159
+** Amend the tags on check-in HASH to change how it displays in the timeline.
31583160
**
31593161
** Options:
31603162
**
31613163
** --author USER Make USER the author for check-in
31623164
** -m|--comment COMMENT Make COMMENT the check-in comment
@@ -3240,11 +3242,11 @@
32403242
verify_all_options();
32413243
if( g.argc<3 || g.argc>=4 ) usage(AMEND_USAGE_STMT);
32423244
rid = name_to_typed_rid(g.argv[2], "ci");
32433245
if( rid==0 && !is_a_version(rid) ) fossil_fatal("no such check-in");
32443246
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
3245
- if( zUuid==0 ) fossil_fatal("Unable to find UUID");
3247
+ if( zUuid==0 ) fossil_fatal("Unable to find artifact hash");
32463248
zComment = db_text(0, "SELECT coalesce(ecomment,comment)"
32473249
" FROM event WHERE objid=%d", rid);
32483250
zUser = db_text(0, "SELECT coalesce(euser,user)"
32493251
" FROM event WHERE objid=%d", rid);
32503252
zDate = db_text(0, "SELECT datetime(mtime)"
@@ -3330,11 +3332,11 @@
33303332
if( fHide && !fHasHidden ) hide_branch();
33313333
if( fClose && !fHasClosed ) close_leaf(rid);
33323334
if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
33333335
apply_newtags(&ctrl, rid, zUuid, zUserOvrd, fDryRun);
33343336
if( fDryRun==0 ){
3335
- show_common_info(rid, "uuid:", 1, 0);
3337
+ show_common_info(rid, "hash:", 1, 0);
33363338
}
33373339
if( g.localOpen ){
33383340
manifest_to_disk(rid);
33393341
}
33403342
}
33413343
--- src/info.c
+++ src/info.c
@@ -44,19 +44,19 @@
44
45
46 /*
47 ** Print common information about a particular record.
48 **
49 ** * The UUID
50 ** * The record ID
51 ** * mtime and ctime
52 ** * who signed it
53 **
54 */
55 void show_common_info(
56 int rid, /* The rid for the check-in to display info for */
57 const char *zUuidName, /* Name of the UUID */
58 int showComment, /* True to show the check-in comment */
59 int showFamily /* True to show parents and children */
60 ){
61 Stmt q;
62 char *zComment = 0;
@@ -68,11 +68,11 @@
68 zDate = db_text(0,
69 "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
70 rid
71 );
72 /* 01234567890123 */
73 fossil_print("%-13s %.40s %s\n", zUuidName, zUuid, zDate ? zDate : "");
74 free(zDate);
75 if( showComment ){
76 zComment = db_text(0,
77 "SELECT coalesce(ecomment,comment) || "
78 " ' (user: ' || coalesce(euser,user,'?') || ')' "
@@ -264,11 +264,11 @@
264 int rid;
265 rid = name_to_rid(g.argv[2]);
266 if( rid==0 ){
267 fossil_fatal("no such object: %s", g.argv[2]);
268 }
269 show_common_info(rid, "uuid:", 1, 1);
270 }
271 }
272
273 /*
274 ** Show the context graph (immediate parents and children) for
@@ -536,11 +536,11 @@
536 @ <span class="infoTag">%h(zTagname)</span>
537 }
538 if( tagtype==2 ){
539 if( zOrigUuid && zOrigUuid[0] ){
540 @ inherited from
541 hyperlink_to_uuid(zOrigUuid);
542 }else{
543 @ propagates to descendants
544 }
545 }
546 if( zSrcUuid && zSrcUuid[0] ){
@@ -547,11 +547,11 @@
547 if( tagtype==0 ){
548 @ by
549 }else{
550 @ added by
551 }
552 hyperlink_to_uuid(zSrcUuid);
553 @ on
554 hyperlink_to_date(zDate,0);
555 }
556 @ </li>
557 }
@@ -613,12 +613,12 @@
613 int rid;
614 int isLeaf;
615 int diffType; /* 0: no diff, 1: unified, 2: side-by-side */
616 u64 diffFlags; /* Flag parameter for text_diff() */
617 const char *zName; /* Name of the check-in to be displayed */
618 const char *zUuid; /* UUID of zName */
619 const char *zParent; /* UUID of the parent check-in (if any) */
620 const char *zRe; /* regex parameter */
621 ReCompiled *pRe = 0; /* regex */
622 const char *zW; /* URL param for ignoring whitespace */
623 const char *zPage = "vinfo"; /* Page that shows diffs */
624 const char *zPageHide = "ci"; /* Page that hides diffs */
@@ -939,11 +939,11 @@
939 style_footer();
940 }
941
942 /*
943 ** WEBPAGE: winfo
944 ** URL: /winfo?name=UUID
945 **
946 ** Display information about a wiki page.
947 */
948 void winfo_page(void){
949 int rid;
@@ -1100,11 +1100,11 @@
1100 Blob comment;
1101 int wikiFlags = WIKI_INLINE|WIKI_NOBADLINKS;
1102 if( db_get_boolean("timeline-block-markup", 0)==0 ){
1103 wikiFlags |= WIKI_NOBLOCK;
1104 }
1105 hyperlink_to_uuid(zUuid);
1106 blob_zero(&comment);
1107 db_column_blob(&q, 2, &comment);
1108 wiki_convert(&comment, 0, wikiFlags);
1109 blob_reset(&comment);
1110 @ (user:
@@ -1428,14 +1428,14 @@
1428 }
1429 if( showDetail ){
1430 @ <li>
1431 hyperlink_to_date(zDate,"");
1432 @ &mdash; part of check-in
1433 hyperlink_to_uuid(zVers);
1434 }else{
1435 @ &mdash; part of check-in
1436 hyperlink_to_uuid(zVers);
1437 @ at
1438 hyperlink_to_date(zDate,"");
1439 }
1440 if( zBr && zBr[0] ){
1441 @ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a>
@@ -1534,11 +1534,11 @@
1534 @ Forum post
1535 }else{
1536 @ Tag referencing
1537 }
1538 if( zType[0]!='e' || eventTagId == 0){
1539 hyperlink_to_uuid(zUuid);
1540 }
1541 @ - %!W(zCom) by
1542 hyperlink_to_user(zUser,zDate," on");
1543 hyperlink_to_date(zDate, ".");
1544 if( pDownloadName && blob_size(pDownloadName)==0 ){
@@ -1566,11 +1566,11 @@
1566 @ Also attachment "%h(zFilename)" to
1567 }else{
1568 @ Attachment "%h(zFilename)" to
1569 }
1570 objType |= OBJTYPE_ATTACHMENT;
1571 if( fossil_is_uuid(zTarget) ){
1572 if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
1573 zTarget)
1574 ){
1575 if( g.perm.Hyperlink && g.anon.RdTkt ){
1576 @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>]
@@ -1625,11 +1625,11 @@
1625 }
1626
1627
1628 /*
1629 ** WEBPAGE: fdiff
1630 ** URL: fdiff?v1=UUID&v2=UUID
1631 **
1632 ** Two arguments, v1 and v2, identify the artifacts to be diffed.
1633 ** Show diff side by side unless sbs is 0. Generate plain text if
1634 ** "patch" is present, otherwise generate "pretty" HTML.
1635 **
@@ -1801,18 +1801,18 @@
1801 ** is by the full-length SHA1 or SHA3 hash. Abbreviations are not
1802 ** accepted.
1803 */
1804 void secure_rawartifact_page(void){
1805 int rid = 0;
1806 const char *zUuid = PD("name", "");
1807
1808 login_check_credentials();
1809 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1810 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zUuid);
1811 if( rid==0 ){
1812 cgi_set_status(404, "Not Found");
1813 @ Unknown artifact: "%h(zUuid)"
1814 return;
1815 }
1816 g.isConst = 1;
1817 deliver_artifact(rid, P("m"));
1818 }
@@ -2527,16 +2527,18 @@
2527 }
2528
2529
2530 /*
2531 ** WEBPAGE: info
2532 ** URL: info/ARTIFACTID
2533 **
2534 ** The argument is a artifact ID which might be a check-in or a file or
2535 ** a ticket changes or a wiki edit or something else.
2536 **
2537 ** Figure out what the artifact ID is and display it appropriately.
 
 
2538 */
2539 void info_page(void){
2540 const char *zName;
2541 Blob uuid;
2542 int rid;
@@ -3146,17 +3148,17 @@
3146 blob_append(&prompt, ".\n# Lines beginning with a # are ignored.\n", -1);
3147 prompt_for_user_comment(pComment, &prompt);
3148 blob_reset(&prompt);
3149 }
3150
3151 #define AMEND_USAGE_STMT "UUID OPTION ?OPTION ...?"
3152 /*
3153 ** COMMAND: amend
3154 **
3155 ** Usage: %fossil amend UUID OPTION ?OPTION ...?
3156 **
3157 ** Amend the tags on check-in UUID to change how it displays in the timeline.
3158 **
3159 ** Options:
3160 **
3161 ** --author USER Make USER the author for check-in
3162 ** -m|--comment COMMENT Make COMMENT the check-in comment
@@ -3240,11 +3242,11 @@
3240 verify_all_options();
3241 if( g.argc<3 || g.argc>=4 ) usage(AMEND_USAGE_STMT);
3242 rid = name_to_typed_rid(g.argv[2], "ci");
3243 if( rid==0 && !is_a_version(rid) ) fossil_fatal("no such check-in");
3244 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
3245 if( zUuid==0 ) fossil_fatal("Unable to find UUID");
3246 zComment = db_text(0, "SELECT coalesce(ecomment,comment)"
3247 " FROM event WHERE objid=%d", rid);
3248 zUser = db_text(0, "SELECT coalesce(euser,user)"
3249 " FROM event WHERE objid=%d", rid);
3250 zDate = db_text(0, "SELECT datetime(mtime)"
@@ -3330,11 +3332,11 @@
3330 if( fHide && !fHasHidden ) hide_branch();
3331 if( fClose && !fHasClosed ) close_leaf(rid);
3332 if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
3333 apply_newtags(&ctrl, rid, zUuid, zUserOvrd, fDryRun);
3334 if( fDryRun==0 ){
3335 show_common_info(rid, "uuid:", 1, 0);
3336 }
3337 if( g.localOpen ){
3338 manifest_to_disk(rid);
3339 }
3340 }
3341
--- src/info.c
+++ src/info.c
@@ -44,19 +44,19 @@
44
45
46 /*
47 ** Print common information about a particular record.
48 **
49 ** * The artifact hash
50 ** * The record ID
51 ** * mtime and ctime
52 ** * who signed it
53 **
54 */
55 void show_common_info(
56 int rid, /* The rid for the check-in to display info for */
57 const char *zRecDesc, /* Brief record description; e.g. "checkout:" */
58 int showComment, /* True to show the check-in comment */
59 int showFamily /* True to show parents and children */
60 ){
61 Stmt q;
62 char *zComment = 0;
@@ -68,11 +68,11 @@
68 zDate = db_text(0,
69 "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
70 rid
71 );
72 /* 01234567890123 */
73 fossil_print("%-13s %.40s %s\n", zRecDesc, zUuid, zDate ? zDate : "");
74 free(zDate);
75 if( showComment ){
76 zComment = db_text(0,
77 "SELECT coalesce(ecomment,comment) || "
78 " ' (user: ' || coalesce(euser,user,'?') || ')' "
@@ -264,11 +264,11 @@
264 int rid;
265 rid = name_to_rid(g.argv[2]);
266 if( rid==0 ){
267 fossil_fatal("no such object: %s", g.argv[2]);
268 }
269 show_common_info(rid, "hash:", 1, 1);
270 }
271 }
272
273 /*
274 ** Show the context graph (immediate parents and children) for
@@ -536,11 +536,11 @@
536 @ <span class="infoTag">%h(zTagname)</span>
537 }
538 if( tagtype==2 ){
539 if( zOrigUuid && zOrigUuid[0] ){
540 @ inherited from
541 hyperlink_to_version(zOrigUuid);
542 }else{
543 @ propagates to descendants
544 }
545 }
546 if( zSrcUuid && zSrcUuid[0] ){
@@ -547,11 +547,11 @@
547 if( tagtype==0 ){
548 @ by
549 }else{
550 @ added by
551 }
552 hyperlink_to_version(zSrcUuid);
553 @ on
554 hyperlink_to_date(zDate,0);
555 }
556 @ </li>
557 }
@@ -613,12 +613,12 @@
613 int rid;
614 int isLeaf;
615 int diffType; /* 0: no diff, 1: unified, 2: side-by-side */
616 u64 diffFlags; /* Flag parameter for text_diff() */
617 const char *zName; /* Name of the check-in to be displayed */
618 const char *zUuid; /* Hash of zName, found via blob.uuid */
619 const char *zParent; /* Hash of the parent check-in (if any) */
620 const char *zRe; /* regex parameter */
621 ReCompiled *pRe = 0; /* regex */
622 const char *zW; /* URL param for ignoring whitespace */
623 const char *zPage = "vinfo"; /* Page that shows diffs */
624 const char *zPageHide = "ci"; /* Page that hides diffs */
@@ -939,11 +939,11 @@
939 style_footer();
940 }
941
942 /*
943 ** WEBPAGE: winfo
944 ** URL: /winfo?name=HASH
945 **
946 ** Display information about a wiki page.
947 */
948 void winfo_page(void){
949 int rid;
@@ -1100,11 +1100,11 @@
1100 Blob comment;
1101 int wikiFlags = WIKI_INLINE|WIKI_NOBADLINKS;
1102 if( db_get_boolean("timeline-block-markup", 0)==0 ){
1103 wikiFlags |= WIKI_NOBLOCK;
1104 }
1105 hyperlink_to_version(zUuid);
1106 blob_zero(&comment);
1107 db_column_blob(&q, 2, &comment);
1108 wiki_convert(&comment, 0, wikiFlags);
1109 blob_reset(&comment);
1110 @ (user:
@@ -1428,14 +1428,14 @@
1428 }
1429 if( showDetail ){
1430 @ <li>
1431 hyperlink_to_date(zDate,"");
1432 @ &mdash; part of check-in
1433 hyperlink_to_version(zVers);
1434 }else{
1435 @ &mdash; part of check-in
1436 hyperlink_to_version(zVers);
1437 @ at
1438 hyperlink_to_date(zDate,"");
1439 }
1440 if( zBr && zBr[0] ){
1441 @ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a>
@@ -1534,11 +1534,11 @@
1534 @ Forum post
1535 }else{
1536 @ Tag referencing
1537 }
1538 if( zType[0]!='e' || eventTagId == 0){
1539 hyperlink_to_version(zUuid);
1540 }
1541 @ - %!W(zCom) by
1542 hyperlink_to_user(zUser,zDate," on");
1543 hyperlink_to_date(zDate, ".");
1544 if( pDownloadName && blob_size(pDownloadName)==0 ){
@@ -1566,11 +1566,11 @@
1566 @ Also attachment "%h(zFilename)" to
1567 }else{
1568 @ Attachment "%h(zFilename)" to
1569 }
1570 objType |= OBJTYPE_ATTACHMENT;
1571 if( fossil_is_artifact_hash(zTarget) ){
1572 if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
1573 zTarget)
1574 ){
1575 if( g.perm.Hyperlink && g.anon.RdTkt ){
1576 @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>]
@@ -1625,11 +1625,11 @@
1625 }
1626
1627
1628 /*
1629 ** WEBPAGE: fdiff
1630 ** URL: fdiff?v1=HASH&v2=HASH
1631 **
1632 ** Two arguments, v1 and v2, identify the artifacts to be diffed.
1633 ** Show diff side by side unless sbs is 0. Generate plain text if
1634 ** "patch" is present, otherwise generate "pretty" HTML.
1635 **
@@ -1801,18 +1801,18 @@
1801 ** is by the full-length SHA1 or SHA3 hash. Abbreviations are not
1802 ** accepted.
1803 */
1804 void secure_rawartifact_page(void){
1805 int rid = 0;
1806 const char *zName = PD("name", "");
1807
1808 login_check_credentials();
1809 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
1810 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zName);
1811 if( rid==0 ){
1812 cgi_set_status(404, "Not Found");
1813 @ Unknown artifact: "%h(zName)"
1814 return;
1815 }
1816 g.isConst = 1;
1817 deliver_artifact(rid, P("m"));
1818 }
@@ -2527,16 +2527,18 @@
2527 }
2528
2529
2530 /*
2531 ** WEBPAGE: info
2532 ** URL: info/NAME
2533 **
2534 ** The NAME argument is any valid artifact name: an artifact hash,
2535 ** a timestamp, a tag name, etc.
2536 **
2537 ** Because NAME can match so many different things (commit artifacts,
2538 ** wiki pages, ticket comments, forum posts...) the format of the output
2539 ** page depends on the type of artifact that NAME matches.
2540 */
2541 void info_page(void){
2542 const char *zName;
2543 Blob uuid;
2544 int rid;
@@ -3146,17 +3148,17 @@
3148 blob_append(&prompt, ".\n# Lines beginning with a # are ignored.\n", -1);
3149 prompt_for_user_comment(pComment, &prompt);
3150 blob_reset(&prompt);
3151 }
3152
3153 #define AMEND_USAGE_STMT "HASH OPTION ?OPTION ...?"
3154 /*
3155 ** COMMAND: amend
3156 **
3157 ** Usage: %fossil amend HASH OPTION ?OPTION ...?
3158 **
3159 ** Amend the tags on check-in HASH to change how it displays in the timeline.
3160 **
3161 ** Options:
3162 **
3163 ** --author USER Make USER the author for check-in
3164 ** -m|--comment COMMENT Make COMMENT the check-in comment
@@ -3240,11 +3242,11 @@
3242 verify_all_options();
3243 if( g.argc<3 || g.argc>=4 ) usage(AMEND_USAGE_STMT);
3244 rid = name_to_typed_rid(g.argv[2], "ci");
3245 if( rid==0 && !is_a_version(rid) ) fossil_fatal("no such check-in");
3246 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
3247 if( zUuid==0 ) fossil_fatal("Unable to find artifact hash");
3248 zComment = db_text(0, "SELECT coalesce(ecomment,comment)"
3249 " FROM event WHERE objid=%d", rid);
3250 zUser = db_text(0, "SELECT coalesce(euser,user)"
3251 " FROM event WHERE objid=%d", rid);
3252 zDate = db_text(0, "SELECT datetime(mtime)"
@@ -3330,11 +3332,11 @@
3332 if( fHide && !fHasHidden ) hide_branch();
3333 if( fClose && !fHasClosed ) close_leaf(rid);
3334 if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
3335 apply_newtags(&ctrl, rid, zUuid, zUserOvrd, fDryRun);
3336 if( fDryRun==0 ){
3337 show_common_info(rid, "hash:", 1, 0);
3338 }
3339 if( g.localOpen ){
3340 manifest_to_disk(rid);
3341 }
3342 }
3343
--- src/json_finfo.c
+++ src/json_finfo.c
@@ -89,11 +89,11 @@
8989
char * zU = NULL;
9090
int rc = name_to_uuid2( zCheckin, "ci", &zU );
9191
/*printf("zCheckin=[%s], zU=[%s]", zCheckin, zU);*/
9292
if(rc<=0){
9393
json_set_err((rc<0) ? FSL_JSON_E_AMBIGUOUS_UUID : FSL_JSON_E_RESOURCE_NOT_FOUND,
94
- "Check-in UUID %s.", (rc<0) ? "is ambiguous" : "not found");
94
+ "Check-in hash %s.", (rc<0) ? "is ambiguous" : "not found");
9595
blob_reset(&sql);
9696
return NULL;
9797
}
9898
blob_append_sql(&sql, " AND ci.uuid='%q'", zU);
9999
free(zU);
100100
--- src/json_finfo.c
+++ src/json_finfo.c
@@ -89,11 +89,11 @@
89 char * zU = NULL;
90 int rc = name_to_uuid2( zCheckin, "ci", &zU );
91 /*printf("zCheckin=[%s], zU=[%s]", zCheckin, zU);*/
92 if(rc<=0){
93 json_set_err((rc<0) ? FSL_JSON_E_AMBIGUOUS_UUID : FSL_JSON_E_RESOURCE_NOT_FOUND,
94 "Check-in UUID %s.", (rc<0) ? "is ambiguous" : "not found");
95 blob_reset(&sql);
96 return NULL;
97 }
98 blob_append_sql(&sql, " AND ci.uuid='%q'", zU);
99 free(zU);
100
--- src/json_finfo.c
+++ src/json_finfo.c
@@ -89,11 +89,11 @@
89 char * zU = NULL;
90 int rc = name_to_uuid2( zCheckin, "ci", &zU );
91 /*printf("zCheckin=[%s], zU=[%s]", zCheckin, zU);*/
92 if(rc<=0){
93 json_set_err((rc<0) ? FSL_JSON_E_AMBIGUOUS_UUID : FSL_JSON_E_RESOURCE_NOT_FOUND,
94 "Check-in hash %s.", (rc<0) ? "is ambiguous" : "not found");
95 blob_reset(&sql);
96 return NULL;
97 }
98 blob_append_sql(&sql, " AND ci.uuid='%q'", zU);
99 free(zU);
100
+1 -1
--- src/json_tag.c
+++ src/json_tag.c
@@ -117,11 +117,11 @@
117117
Blob uu = empty_blob;
118118
int rc;
119119
blob_append(&uu, zName, -1);
120120
rc = name_to_uuid(&uu, 9, "*");
121121
if(0!=rc){
122
- json_set_err(FSL_JSON_E_UNKNOWN,"Could not convert name back to UUID!");
122
+ json_set_err(FSL_JSON_E_UNKNOWN,"Could not convert name back to artifact hash!");
123123
blob_reset(&uu);
124124
goto error;
125125
}
126126
cson_object_set(pay, "appliedTo", json_new_string(blob_buffer(&uu)));
127127
blob_reset(&uu);
128128
--- src/json_tag.c
+++ src/json_tag.c
@@ -117,11 +117,11 @@
117 Blob uu = empty_blob;
118 int rc;
119 blob_append(&uu, zName, -1);
120 rc = name_to_uuid(&uu, 9, "*");
121 if(0!=rc){
122 json_set_err(FSL_JSON_E_UNKNOWN,"Could not convert name back to UUID!");
123 blob_reset(&uu);
124 goto error;
125 }
126 cson_object_set(pay, "appliedTo", json_new_string(blob_buffer(&uu)));
127 blob_reset(&uu);
128
--- src/json_tag.c
+++ src/json_tag.c
@@ -117,11 +117,11 @@
117 Blob uu = empty_blob;
118 int rc;
119 blob_append(&uu, zName, -1);
120 rc = name_to_uuid(&uu, 9, "*");
121 if(0!=rc){
122 json_set_err(FSL_JSON_E_UNKNOWN,"Could not convert name back to artifact hash!");
123 blob_reset(&uu);
124 goto error;
125 }
126 cson_object_set(pay, "appliedTo", json_new_string(blob_buffer(&uu)));
127 blob_reset(&uu);
128
+1 -1
--- src/main.c
+++ src/main.c
@@ -159,11 +159,11 @@
159159
char *zLocalDbName; /* Name of the local database file */
160160
char *zOpenRevision; /* Check-in version to use during database open */
161161
const char *zCmdName; /* Name of the Fossil command currently running */
162162
int localOpen; /* True if the local database is open */
163163
char *zLocalRoot; /* The directory holding the local database */
164
- int minPrefix; /* Number of digits needed for a distinct UUID */
164
+ int minPrefix; /* Number of digits needed for a distinct hash */
165165
int eHashPolicy; /* Current hash policy. One of HPOLICY_* */
166166
int fSqlTrace; /* True if --sqltrace flag is present */
167167
int fSqlStats; /* True if --sqltrace or --sqlstats are present */
168168
int fSqlPrint; /* True if --sqlprint flag is present */
169169
int fCgiTrace; /* True if --cgitrace is enabled */
170170
--- src/main.c
+++ src/main.c
@@ -159,11 +159,11 @@
159 char *zLocalDbName; /* Name of the local database file */
160 char *zOpenRevision; /* Check-in version to use during database open */
161 const char *zCmdName; /* Name of the Fossil command currently running */
162 int localOpen; /* True if the local database is open */
163 char *zLocalRoot; /* The directory holding the local database */
164 int minPrefix; /* Number of digits needed for a distinct UUID */
165 int eHashPolicy; /* Current hash policy. One of HPOLICY_* */
166 int fSqlTrace; /* True if --sqltrace flag is present */
167 int fSqlStats; /* True if --sqltrace or --sqlstats are present */
168 int fSqlPrint; /* True if --sqlprint flag is present */
169 int fCgiTrace; /* True if --cgitrace is enabled */
170
--- src/main.c
+++ src/main.c
@@ -159,11 +159,11 @@
159 char *zLocalDbName; /* Name of the local database file */
160 char *zOpenRevision; /* Check-in version to use during database open */
161 const char *zCmdName; /* Name of the Fossil command currently running */
162 int localOpen; /* True if the local database is open */
163 char *zLocalRoot; /* The directory holding the local database */
164 int minPrefix; /* Number of digits needed for a distinct hash */
165 int eHashPolicy; /* Current hash policy. One of HPOLICY_* */
166 int fSqlTrace; /* True if --sqltrace flag is present */
167 int fSqlStats; /* True if --sqltrace or --sqlstats are present */
168 int fSqlPrint; /* True if --sqlprint flag is present */
169 int fCgiTrace; /* True if --cgitrace is enabled */
170
+1 -1
--- src/main.c
+++ src/main.c
@@ -159,11 +159,11 @@
159159
char *zLocalDbName; /* Name of the local database file */
160160
char *zOpenRevision; /* Check-in version to use during database open */
161161
const char *zCmdName; /* Name of the Fossil command currently running */
162162
int localOpen; /* True if the local database is open */
163163
char *zLocalRoot; /* The directory holding the local database */
164
- int minPrefix; /* Number of digits needed for a distinct UUID */
164
+ int minPrefix; /* Number of digits needed for a distinct hash */
165165
int eHashPolicy; /* Current hash policy. One of HPOLICY_* */
166166
int fSqlTrace; /* True if --sqltrace flag is present */
167167
int fSqlStats; /* True if --sqltrace or --sqlstats are present */
168168
int fSqlPrint; /* True if --sqlprint flag is present */
169169
int fCgiTrace; /* True if --cgitrace is enabled */
170170
--- src/main.c
+++ src/main.c
@@ -159,11 +159,11 @@
159 char *zLocalDbName; /* Name of the local database file */
160 char *zOpenRevision; /* Check-in version to use during database open */
161 const char *zCmdName; /* Name of the Fossil command currently running */
162 int localOpen; /* True if the local database is open */
163 char *zLocalRoot; /* The directory holding the local database */
164 int minPrefix; /* Number of digits needed for a distinct UUID */
165 int eHashPolicy; /* Current hash policy. One of HPOLICY_* */
166 int fSqlTrace; /* True if --sqltrace flag is present */
167 int fSqlStats; /* True if --sqltrace or --sqlstats are present */
168 int fSqlPrint; /* True if --sqlprint flag is present */
169 int fCgiTrace; /* True if --cgitrace is enabled */
170
--- src/main.c
+++ src/main.c
@@ -159,11 +159,11 @@
159 char *zLocalDbName; /* Name of the local database file */
160 char *zOpenRevision; /* Check-in version to use during database open */
161 const char *zCmdName; /* Name of the Fossil command currently running */
162 int localOpen; /* True if the local database is open */
163 char *zLocalRoot; /* The directory holding the local database */
164 int minPrefix; /* Number of digits needed for a distinct hash */
165 int eHashPolicy; /* Current hash policy. One of HPOLICY_* */
166 int fSqlTrace; /* True if --sqltrace flag is present */
167 int fSqlStats; /* True if --sqltrace or --sqlstats are present */
168 int fSqlPrint; /* True if --sqlprint flag is present */
169 int fCgiTrace; /* True if --cgitrace is enabled */
170
+1 -1
--- src/manifest.c
+++ src/manifest.c
@@ -2434,11 +2434,11 @@
24342434
/* We assume that we're attaching to a wiki page until we
24352435
** prove otherwise (which could on a later artifact if we
24362436
** process the attachment artifact before the artifact to
24372437
** which it is attached!) */
24382438
char attachToType = 'w';
2439
- if( fossil_is_uuid(p->zAttachTarget) ){
2439
+ if( fossil_is_artifact_hash(p->zAttachTarget) ){
24402440
if( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
24412441
p->zAttachTarget)
24422442
){
24432443
attachToType = 't'; /* Attaching to known ticket */
24442444
}else if( db_exists("SELECT 1 FROM tag WHERE tagname='event-%q'",
24452445
--- src/manifest.c
+++ src/manifest.c
@@ -2434,11 +2434,11 @@
2434 /* We assume that we're attaching to a wiki page until we
2435 ** prove otherwise (which could on a later artifact if we
2436 ** process the attachment artifact before the artifact to
2437 ** which it is attached!) */
2438 char attachToType = 'w';
2439 if( fossil_is_uuid(p->zAttachTarget) ){
2440 if( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
2441 p->zAttachTarget)
2442 ){
2443 attachToType = 't'; /* Attaching to known ticket */
2444 }else if( db_exists("SELECT 1 FROM tag WHERE tagname='event-%q'",
2445
--- src/manifest.c
+++ src/manifest.c
@@ -2434,11 +2434,11 @@
2434 /* We assume that we're attaching to a wiki page until we
2435 ** prove otherwise (which could on a later artifact if we
2436 ** process the attachment artifact before the artifact to
2437 ** which it is attached!) */
2438 char attachToType = 'w';
2439 if( fossil_is_artifact_hash(p->zAttachTarget) ){
2440 if( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
2441 p->zAttachTarget)
2442 ){
2443 attachToType = 't'; /* Attaching to known ticket */
2444 }else if( db_exists("SELECT 1 FROM tag WHERE tagname='event-%q'",
2445
+1 -1
--- src/manifest.c
+++ src/manifest.c
@@ -2434,11 +2434,11 @@
24342434
/* We assume that we're attaching to a wiki page until we
24352435
** prove otherwise (which could on a later artifact if we
24362436
** process the attachment artifact before the artifact to
24372437
** which it is attached!) */
24382438
char attachToType = 'w';
2439
- if( fossil_is_uuid(p->zAttachTarget) ){
2439
+ if( fossil_is_artifact_hash(p->zAttachTarget) ){
24402440
if( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
24412441
p->zAttachTarget)
24422442
){
24432443
attachToType = 't'; /* Attaching to known ticket */
24442444
}else if( db_exists("SELECT 1 FROM tag WHERE tagname='event-%q'",
24452445
--- src/manifest.c
+++ src/manifest.c
@@ -2434,11 +2434,11 @@
2434 /* We assume that we're attaching to a wiki page until we
2435 ** prove otherwise (which could on a later artifact if we
2436 ** process the attachment artifact before the artifact to
2437 ** which it is attached!) */
2438 char attachToType = 'w';
2439 if( fossil_is_uuid(p->zAttachTarget) ){
2440 if( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
2441 p->zAttachTarget)
2442 ){
2443 attachToType = 't'; /* Attaching to known ticket */
2444 }else if( db_exists("SELECT 1 FROM tag WHERE tagname='event-%q'",
2445
--- src/manifest.c
+++ src/manifest.c
@@ -2434,11 +2434,11 @@
2434 /* We assume that we're attaching to a wiki page until we
2435 ** prove otherwise (which could on a later artifact if we
2436 ** process the attachment artifact before the artifact to
2437 ** which it is attached!) */
2438 char attachToType = 'w';
2439 if( fossil_is_artifact_hash(p->zAttachTarget) ){
2440 if( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'",
2441 p->zAttachTarget)
2442 ){
2443 attachToType = 't'; /* Attaching to known ticket */
2444 }else if( db_exists("SELECT 1 FROM tag WHERE tagname='event-%q'",
2445
+18 -11
--- src/name.c
+++ src/name.c
@@ -446,17 +446,23 @@
446446
}
447447
return rid;
448448
}
449449
450450
/*
451
-** This routine takes a user-entered UUID which might be in mixed
452
-** case and might only be a prefix of the full UUID and converts it
453
-** into the full-length UUID in canonical form.
451
+** This routine takes a user-entered string and tries to convert it to
452
+** an artifact hash.
453
+**
454
+** We first try to treat the string as an artifact hash, or at least a
455
+** unique prefix of an artifact hash. The input may be in mixed case.
456
+** If we are passed such a string, this routine has the effect of
457
+** converting the hash [prefix] to canonical form.
454458
**
455
-** If the input is not a UUID or a UUID prefix, then try to resolve
459
+** If the input is not a hash or a hash prefix, then try to resolve
456460
** the name as a tag. If multiple tags match, pick the latest.
457
-** If the input name matches "tag:*" then always resolve as a tag.
461
+** A caller can force this routine to skip the hash case above by
462
+** prefixing the string with "tag:", a useful property when the tag
463
+** may be misinterpreted as a hex ASCII string. (e.g. "decade" or "facade")
458464
**
459465
** If the input is not a tag, then try to match it as an ISO-8601 date
460466
** string YYYY-MM-DD HH:MM:SS and pick the nearest check-in to that date.
461467
** If the input is of the form "date:*" then always resolve the name as
462468
** a date. The forms "utc:*" and "local:" are deprecated.
@@ -481,16 +487,16 @@
481487
}
482488
483489
/*
484490
** This routine is similar to name_to_uuid() except in the form it
485491
** takes its parameters and returns its value, and in that it does not
486
-** treat errors as fatal. zName must be a UUID, as described for
487
-** name_to_uuid(). zType is also as described for that function. If
492
+** treat errors as fatal. zName must be an artifact hash or prefix of
493
+** a hash. zType is also as described for name_to_uuid(). If
488494
** zName does not resolve, 0 is returned. If it is ambiguous, a
489495
** negative value is returned. On success the rid is returned and
490496
** pUuid (if it is not NULL) is set to a newly-allocated string,
491
-** the full UUID, which must eventually be free()d by the caller.
497
+** the full hash, which must eventually be free()d by the caller.
492498
*/
493499
int name_to_uuid2(const char *zName, const char *zType, char **pUuid){
494500
int rid = symbolic_name_to_rid(zName, zType);
495501
if((rid>0) && pUuid){
496502
*pUuid = db_text(NULL, "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -499,12 +505,13 @@
499505
}
500506
501507
502508
/*
503509
** name_collisions searches through events, blobs, and tickets for
504
-** collisions of a given UUID based on its length on UUIDs no shorter
505
-** than 4 characters in length.
510
+** collisions of a given hash based on its length, counting only
511
+** hashes greater than or equal to 4 hex ASCII characters (16 bits)
512
+** in length.
506513
*/
507514
int name_collisions(const char *zName){
508515
int c = 0; /* count of collisions for zName */
509516
int nLen; /* length of zName */
510517
nLen = strlen(zName);
@@ -633,11 +640,11 @@
633640
const char *zTitle = db_column_text(&q, 2);
634641
@ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)">
635642
@ %s(zUuid)</a> -
636643
@ <ul></ul>
637644
@ Ticket
638
- hyperlink_to_uuid(zUuid);
645
+ hyperlink_to_version(zUuid);
639646
@ - %h(zTitle).
640647
@ <ul><li>
641648
object_description(rid, 0, 0, 0);
642649
@ </li></ul>
643650
@ </p></li>
644651
--- src/name.c
+++ src/name.c
@@ -446,17 +446,23 @@
446 }
447 return rid;
448 }
449
450 /*
451 ** This routine takes a user-entered UUID which might be in mixed
452 ** case and might only be a prefix of the full UUID and converts it
453 ** into the full-length UUID in canonical form.
 
 
 
 
454 **
455 ** If the input is not a UUID or a UUID prefix, then try to resolve
456 ** the name as a tag. If multiple tags match, pick the latest.
457 ** If the input name matches "tag:*" then always resolve as a tag.
 
 
458 **
459 ** If the input is not a tag, then try to match it as an ISO-8601 date
460 ** string YYYY-MM-DD HH:MM:SS and pick the nearest check-in to that date.
461 ** If the input is of the form "date:*" then always resolve the name as
462 ** a date. The forms "utc:*" and "local:" are deprecated.
@@ -481,16 +487,16 @@
481 }
482
483 /*
484 ** This routine is similar to name_to_uuid() except in the form it
485 ** takes its parameters and returns its value, and in that it does not
486 ** treat errors as fatal. zName must be a UUID, as described for
487 ** name_to_uuid(). zType is also as described for that function. If
488 ** zName does not resolve, 0 is returned. If it is ambiguous, a
489 ** negative value is returned. On success the rid is returned and
490 ** pUuid (if it is not NULL) is set to a newly-allocated string,
491 ** the full UUID, which must eventually be free()d by the caller.
492 */
493 int name_to_uuid2(const char *zName, const char *zType, char **pUuid){
494 int rid = symbolic_name_to_rid(zName, zType);
495 if((rid>0) && pUuid){
496 *pUuid = db_text(NULL, "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -499,12 +505,13 @@
499 }
500
501
502 /*
503 ** name_collisions searches through events, blobs, and tickets for
504 ** collisions of a given UUID based on its length on UUIDs no shorter
505 ** than 4 characters in length.
 
506 */
507 int name_collisions(const char *zName){
508 int c = 0; /* count of collisions for zName */
509 int nLen; /* length of zName */
510 nLen = strlen(zName);
@@ -633,11 +640,11 @@
633 const char *zTitle = db_column_text(&q, 2);
634 @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)">
635 @ %s(zUuid)</a> -
636 @ <ul></ul>
637 @ Ticket
638 hyperlink_to_uuid(zUuid);
639 @ - %h(zTitle).
640 @ <ul><li>
641 object_description(rid, 0, 0, 0);
642 @ </li></ul>
643 @ </p></li>
644
--- src/name.c
+++ src/name.c
@@ -446,17 +446,23 @@
446 }
447 return rid;
448 }
449
450 /*
451 ** This routine takes a user-entered string and tries to convert it to
452 ** an artifact hash.
453 **
454 ** We first try to treat the string as an artifact hash, or at least a
455 ** unique prefix of an artifact hash. The input may be in mixed case.
456 ** If we are passed such a string, this routine has the effect of
457 ** converting the hash [prefix] to canonical form.
458 **
459 ** If the input is not a hash or a hash prefix, then try to resolve
460 ** the name as a tag. If multiple tags match, pick the latest.
461 ** A caller can force this routine to skip the hash case above by
462 ** prefixing the string with "tag:", a useful property when the tag
463 ** may be misinterpreted as a hex ASCII string. (e.g. "decade" or "facade")
464 **
465 ** If the input is not a tag, then try to match it as an ISO-8601 date
466 ** string YYYY-MM-DD HH:MM:SS and pick the nearest check-in to that date.
467 ** If the input is of the form "date:*" then always resolve the name as
468 ** a date. The forms "utc:*" and "local:" are deprecated.
@@ -481,16 +487,16 @@
487 }
488
489 /*
490 ** This routine is similar to name_to_uuid() except in the form it
491 ** takes its parameters and returns its value, and in that it does not
492 ** treat errors as fatal. zName must be an artifact hash or prefix of
493 ** a hash. zType is also as described for name_to_uuid(). If
494 ** zName does not resolve, 0 is returned. If it is ambiguous, a
495 ** negative value is returned. On success the rid is returned and
496 ** pUuid (if it is not NULL) is set to a newly-allocated string,
497 ** the full hash, which must eventually be free()d by the caller.
498 */
499 int name_to_uuid2(const char *zName, const char *zType, char **pUuid){
500 int rid = symbolic_name_to_rid(zName, zType);
501 if((rid>0) && pUuid){
502 *pUuid = db_text(NULL, "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -499,12 +505,13 @@
505 }
506
507
508 /*
509 ** name_collisions searches through events, blobs, and tickets for
510 ** collisions of a given hash based on its length, counting only
511 ** hashes greater than or equal to 4 hex ASCII characters (16 bits)
512 ** in length.
513 */
514 int name_collisions(const char *zName){
515 int c = 0; /* count of collisions for zName */
516 int nLen; /* length of zName */
517 nLen = strlen(zName);
@@ -633,11 +640,11 @@
640 const char *zTitle = db_column_text(&q, 2);
641 @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)">
642 @ %s(zUuid)</a> -
643 @ <ul></ul>
644 @ Ticket
645 hyperlink_to_version(zUuid);
646 @ - %h(zTitle).
647 @ <ul><li>
648 object_description(rid, 0, 0, 0);
649 @ </li></ul>
650 @ </p></li>
651
+1 -1
--- src/printf.c
+++ src/printf.c
@@ -97,11 +97,11 @@
9797
#define etHTTPIZE 18 /* Make text safe for HTTP. "/" encoded as %2f */
9898
#define etURLIZE 19 /* Make text safe for HTTP. "/" not encoded */
9999
#define etFOSSILIZE 20 /* The fossil header encoding format. */
100100
#define etPATH 21 /* Path type */
101101
#define etWIKISTR 22 /* Timeline comment text rendered from a char*: %W */
102
-#define etSTRINGID 23 /* String with length limit for a UUID prefix: %S */
102
+#define etSTRINGID 23 /* String with length limit for a hash prefix: %S */
103103
#define etROOT 24 /* String value of g.zTop: %R */
104104
#define etJSONSTR 25 /* String encoded as a JSON string literal: %j
105105
Use %!j to include double-quotes around it. */
106106
107107
108108
--- src/printf.c
+++ src/printf.c
@@ -97,11 +97,11 @@
97 #define etHTTPIZE 18 /* Make text safe for HTTP. "/" encoded as %2f */
98 #define etURLIZE 19 /* Make text safe for HTTP. "/" not encoded */
99 #define etFOSSILIZE 20 /* The fossil header encoding format. */
100 #define etPATH 21 /* Path type */
101 #define etWIKISTR 22 /* Timeline comment text rendered from a char*: %W */
102 #define etSTRINGID 23 /* String with length limit for a UUID prefix: %S */
103 #define etROOT 24 /* String value of g.zTop: %R */
104 #define etJSONSTR 25 /* String encoded as a JSON string literal: %j
105 Use %!j to include double-quotes around it. */
106
107
108
--- src/printf.c
+++ src/printf.c
@@ -97,11 +97,11 @@
97 #define etHTTPIZE 18 /* Make text safe for HTTP. "/" encoded as %2f */
98 #define etURLIZE 19 /* Make text safe for HTTP. "/" not encoded */
99 #define etFOSSILIZE 20 /* The fossil header encoding format. */
100 #define etPATH 21 /* Path type */
101 #define etWIKISTR 22 /* Timeline comment text rendered from a char*: %W */
102 #define etSTRINGID 23 /* String with length limit for a hash prefix: %S */
103 #define etROOT 24 /* String value of g.zTop: %R */
104 #define etJSONSTR 25 /* String encoded as a JSON string literal: %j
105 Use %!j to include double-quotes around it. */
106
107
108
+1 -1
--- src/printf.c
+++ src/printf.c
@@ -97,11 +97,11 @@
9797
#define etHTTPIZE 18 /* Make text safe for HTTP. "/" encoded as %2f */
9898
#define etURLIZE 19 /* Make text safe for HTTP. "/" not encoded */
9999
#define etFOSSILIZE 20 /* The fossil header encoding format. */
100100
#define etPATH 21 /* Path type */
101101
#define etWIKISTR 22 /* Timeline comment text rendered from a char*: %W */
102
-#define etSTRINGID 23 /* String with length limit for a UUID prefix: %S */
102
+#define etSTRINGID 23 /* String with length limit for a hash prefix: %S */
103103
#define etROOT 24 /* String value of g.zTop: %R */
104104
#define etJSONSTR 25 /* String encoded as a JSON string literal: %j
105105
Use %!j to include double-quotes around it. */
106106
107107
108108
--- src/printf.c
+++ src/printf.c
@@ -97,11 +97,11 @@
97 #define etHTTPIZE 18 /* Make text safe for HTTP. "/" encoded as %2f */
98 #define etURLIZE 19 /* Make text safe for HTTP. "/" not encoded */
99 #define etFOSSILIZE 20 /* The fossil header encoding format. */
100 #define etPATH 21 /* Path type */
101 #define etWIKISTR 22 /* Timeline comment text rendered from a char*: %W */
102 #define etSTRINGID 23 /* String with length limit for a UUID prefix: %S */
103 #define etROOT 24 /* String value of g.zTop: %R */
104 #define etJSONSTR 25 /* String encoded as a JSON string literal: %j
105 Use %!j to include double-quotes around it. */
106
107
108
--- src/printf.c
+++ src/printf.c
@@ -97,11 +97,11 @@
97 #define etHTTPIZE 18 /* Make text safe for HTTP. "/" encoded as %2f */
98 #define etURLIZE 19 /* Make text safe for HTTP. "/" not encoded */
99 #define etFOSSILIZE 20 /* The fossil header encoding format. */
100 #define etPATH 21 /* Path type */
101 #define etWIKISTR 22 /* Timeline comment text rendered from a char*: %W */
102 #define etSTRINGID 23 /* String with length limit for a hash prefix: %S */
103 #define etROOT 24 /* String value of g.zTop: %R */
104 #define etJSONSTR 25 /* String encoded as a JSON string literal: %j
105 Use %!j to include double-quotes around it. */
106
107
108
+6 -6
--- src/purge.c
+++ src/purge.c
@@ -456,16 +456,16 @@
456456
** ==== Make a backup of your repository before using this command! ====
457457
**
458458
** ==== FURTHER WARNING: This command is a work-in-progress and may yet ====
459459
** ==== contain bugs. ====
460460
**
461
-** fossil purge artifacts UUID... ?OPTIONS?
461
+** fossil purge artifacts HASH... ?OPTIONS?
462462
**
463
-** Move arbitrary artifacts identified by the UUID list into the
463
+** Move arbitrary artifacts identified by the HASH list into the
464464
** graveyard.
465465
**
466
-** fossil purge cat UUID...
466
+** fossil purge cat HASH...
467467
**
468468
** Write the content of one or more artifacts in the graveyard onto
469469
** standard output.
470470
**
471471
** fossil purge checkins TAGS... ?OPTIONS?
@@ -509,12 +509,12 @@
509509
**
510510
** --explain Make no changes, but show what would happen.
511511
** --dry-run An alias for --explain
512512
**
513513
** SUMMARY:
514
-** fossil purge artifacts UUID.. [OPTIONS]
515
-** fossil purge cat UUID...
514
+** fossil purge artifacts HASH.. [OPTIONS]
515
+** fossil purge cat HASH...
516516
** fossil purge checkins TAGS... [OPTIONS]
517517
** fossil purge files FILENAME... [OPTIONS]
518518
** fossil purge list
519519
** fossil purge obliterate ID...
520520
** fossil purge tickets NAME... [OPTIONS]
@@ -547,11 +547,11 @@
547547
purge_artifact_list("ok", "", purgeFlags);
548548
db_end_transaction(0);
549549
}else if( strncmp(zSubcmd, "cat", n)==0 ){
550550
int i, piid;
551551
Blob content;
552
- if( g.argc<4 ) usage("cat UUID...");
552
+ if( g.argc<4 ) usage("cat HASH...");
553553
for(i=3; i<g.argc; i++){
554554
piid = db_int(0, "SELECT piid FROM purgeitem WHERE uuid LIKE '%q%%'",
555555
g.argv[i]);
556556
if( piid==0 ) fossil_fatal("no such item: %s", g.argv[3]);
557557
purge_extract_item(piid, &content);
558558
--- src/purge.c
+++ src/purge.c
@@ -456,16 +456,16 @@
456 ** ==== Make a backup of your repository before using this command! ====
457 **
458 ** ==== FURTHER WARNING: This command is a work-in-progress and may yet ====
459 ** ==== contain bugs. ====
460 **
461 ** fossil purge artifacts UUID... ?OPTIONS?
462 **
463 ** Move arbitrary artifacts identified by the UUID list into the
464 ** graveyard.
465 **
466 ** fossil purge cat UUID...
467 **
468 ** Write the content of one or more artifacts in the graveyard onto
469 ** standard output.
470 **
471 ** fossil purge checkins TAGS... ?OPTIONS?
@@ -509,12 +509,12 @@
509 **
510 ** --explain Make no changes, but show what would happen.
511 ** --dry-run An alias for --explain
512 **
513 ** SUMMARY:
514 ** fossil purge artifacts UUID.. [OPTIONS]
515 ** fossil purge cat UUID...
516 ** fossil purge checkins TAGS... [OPTIONS]
517 ** fossil purge files FILENAME... [OPTIONS]
518 ** fossil purge list
519 ** fossil purge obliterate ID...
520 ** fossil purge tickets NAME... [OPTIONS]
@@ -547,11 +547,11 @@
547 purge_artifact_list("ok", "", purgeFlags);
548 db_end_transaction(0);
549 }else if( strncmp(zSubcmd, "cat", n)==0 ){
550 int i, piid;
551 Blob content;
552 if( g.argc<4 ) usage("cat UUID...");
553 for(i=3; i<g.argc; i++){
554 piid = db_int(0, "SELECT piid FROM purgeitem WHERE uuid LIKE '%q%%'",
555 g.argv[i]);
556 if( piid==0 ) fossil_fatal("no such item: %s", g.argv[3]);
557 purge_extract_item(piid, &content);
558
--- src/purge.c
+++ src/purge.c
@@ -456,16 +456,16 @@
456 ** ==== Make a backup of your repository before using this command! ====
457 **
458 ** ==== FURTHER WARNING: This command is a work-in-progress and may yet ====
459 ** ==== contain bugs. ====
460 **
461 ** fossil purge artifacts HASH... ?OPTIONS?
462 **
463 ** Move arbitrary artifacts identified by the HASH list into the
464 ** graveyard.
465 **
466 ** fossil purge cat HASH...
467 **
468 ** Write the content of one or more artifacts in the graveyard onto
469 ** standard output.
470 **
471 ** fossil purge checkins TAGS... ?OPTIONS?
@@ -509,12 +509,12 @@
509 **
510 ** --explain Make no changes, but show what would happen.
511 ** --dry-run An alias for --explain
512 **
513 ** SUMMARY:
514 ** fossil purge artifacts HASH.. [OPTIONS]
515 ** fossil purge cat HASH...
516 ** fossil purge checkins TAGS... [OPTIONS]
517 ** fossil purge files FILENAME... [OPTIONS]
518 ** fossil purge list
519 ** fossil purge obliterate ID...
520 ** fossil purge tickets NAME... [OPTIONS]
@@ -547,11 +547,11 @@
547 purge_artifact_list("ok", "", purgeFlags);
548 db_end_transaction(0);
549 }else if( strncmp(zSubcmd, "cat", n)==0 ){
550 int i, piid;
551 Blob content;
552 if( g.argc<4 ) usage("cat HASH...");
553 for(i=3; i<g.argc; i++){
554 piid = db_int(0, "SELECT piid FROM purgeitem WHERE uuid LIKE '%q%%'",
555 g.argv[i]);
556 if( piid==0 ) fossil_fatal("no such item: %s", g.argv[3]);
557 purge_extract_item(piid, &content);
558
+1 -1
--- src/rebuild.c
+++ src/rebuild.c
@@ -1149,11 +1149,11 @@
11491149
*/
11501150
void private_export(char *zFileName)
11511151
{
11521152
Stmt q;
11531153
Blob fctx = empty_blob;
1154
- blob_append(&fctx, "# The UUIDs of private artifacts\n", -1);
1154
+ blob_append(&fctx, "# The hashes of private artifacts\n", -1);
11551155
db_prepare(&q,
11561156
"SELECT uuid FROM blob WHERE rid IN ( SELECT rid FROM private );");
11571157
while( db_step(&q)==SQLITE_ROW ){
11581158
const char *zUuid = db_column_text(&q, 0);
11591159
blob_append(&fctx, zUuid, -1);
11601160
--- src/rebuild.c
+++ src/rebuild.c
@@ -1149,11 +1149,11 @@
1149 */
1150 void private_export(char *zFileName)
1151 {
1152 Stmt q;
1153 Blob fctx = empty_blob;
1154 blob_append(&fctx, "# The UUIDs of private artifacts\n", -1);
1155 db_prepare(&q,
1156 "SELECT uuid FROM blob WHERE rid IN ( SELECT rid FROM private );");
1157 while( db_step(&q)==SQLITE_ROW ){
1158 const char *zUuid = db_column_text(&q, 0);
1159 blob_append(&fctx, zUuid, -1);
1160
--- src/rebuild.c
+++ src/rebuild.c
@@ -1149,11 +1149,11 @@
1149 */
1150 void private_export(char *zFileName)
1151 {
1152 Stmt q;
1153 Blob fctx = empty_blob;
1154 blob_append(&fctx, "# The hashes of private artifacts\n", -1);
1155 db_prepare(&q,
1156 "SELECT uuid FROM blob WHERE rid IN ( SELECT rid FROM private );");
1157 while( db_step(&q)==SQLITE_ROW ){
1158 const char *zUuid = db_column_text(&q, 0);
1159 blob_append(&fctx, zUuid, -1);
1160
+1 -1
--- src/report.c
+++ src/report.c
@@ -670,11 +670,11 @@
670670
const char **azArg, /* Text of data in all columns */
671671
const char **azName /* Names of the columns */
672672
){
673673
struct GenerateHTML *pState = (struct GenerateHTML*)pUser;
674674
int i;
675
- const char *zTid; /* Ticket UUID. (value of column named '#') */
675
+ const char *zTid; /* Ticket hash. (value of column named '#') */
676676
const char *zBg = 0; /* Use this background color */
677677
678678
/* Do initialization
679679
*/
680680
if( pState->nCount==0 ){
681681
--- src/report.c
+++ src/report.c
@@ -670,11 +670,11 @@
670 const char **azArg, /* Text of data in all columns */
671 const char **azName /* Names of the columns */
672 ){
673 struct GenerateHTML *pState = (struct GenerateHTML*)pUser;
674 int i;
675 const char *zTid; /* Ticket UUID. (value of column named '#') */
676 const char *zBg = 0; /* Use this background color */
677
678 /* Do initialization
679 */
680 if( pState->nCount==0 ){
681
--- src/report.c
+++ src/report.c
@@ -670,11 +670,11 @@
670 const char **azArg, /* Text of data in all columns */
671 const char **azName /* Names of the columns */
672 ){
673 struct GenerateHTML *pState = (struct GenerateHTML*)pUser;
674 int i;
675 const char *zTid; /* Ticket hash. (value of column named '#') */
676 const char *zBg = 0; /* Use this background color */
677
678 /* Do initialization
679 */
680 if( pState->nCount==0 ){
681
+3 -3
--- src/rss.c
+++ src/rss.c
@@ -22,21 +22,21 @@
2222
#include "rss.h"
2323
#include <assert.h>
2424
2525
/*
2626
** WEBPAGE: timeline.rss
27
-** URL: /timeline.rss?y=TYPE&n=LIMIT&tkt=UUID&tag=TAG&wiki=NAME&name=FILENAME
27
+** URL: /timeline.rss?y=TYPE&n=LIMIT&tkt=HASH&tag=TAG&wiki=NAME&name=FILENAME
2828
**
2929
** Produce an RSS feed of the timeline.
3030
**
3131
** TYPE may be: all, ci (show check-ins only), t (show ticket changes only),
3232
** w (show wiki only), e (show tech notes only), f (show forum posts only),
3333
** g (show tag/branch changes only).
3434
**
3535
** LIMIT is the number of items to show.
3636
**
37
-** tkt=UUID filters for only those events for the specified ticket. tag=TAG
37
+** tkt=HASH filters for only those events for the specified ticket. tag=TAG
3838
** filters for a tag, and wiki=NAME for a wiki page. Only one may be used.
3939
**
4040
** In addition, name=FILENAME filters for a specific file. This may be
4141
** combined with one of the other filters (useful for looking at a specific
4242
** branch).
@@ -231,11 +231,11 @@
231231
** w (show wiki only).
232232
**
233233
** -limit|n LIMIT
234234
** The maximum number of items to show.
235235
**
236
-** -tkt UUID
236
+** -tkt HASH
237237
** Filters for only those events for the specified ticket.
238238
**
239239
** -tag TAG
240240
** filters for a tag
241241
**
242242
--- src/rss.c
+++ src/rss.c
@@ -22,21 +22,21 @@
22 #include "rss.h"
23 #include <assert.h>
24
25 /*
26 ** WEBPAGE: timeline.rss
27 ** URL: /timeline.rss?y=TYPE&n=LIMIT&tkt=UUID&tag=TAG&wiki=NAME&name=FILENAME
28 **
29 ** Produce an RSS feed of the timeline.
30 **
31 ** TYPE may be: all, ci (show check-ins only), t (show ticket changes only),
32 ** w (show wiki only), e (show tech notes only), f (show forum posts only),
33 ** g (show tag/branch changes only).
34 **
35 ** LIMIT is the number of items to show.
36 **
37 ** tkt=UUID filters for only those events for the specified ticket. tag=TAG
38 ** filters for a tag, and wiki=NAME for a wiki page. Only one may be used.
39 **
40 ** In addition, name=FILENAME filters for a specific file. This may be
41 ** combined with one of the other filters (useful for looking at a specific
42 ** branch).
@@ -231,11 +231,11 @@
231 ** w (show wiki only).
232 **
233 ** -limit|n LIMIT
234 ** The maximum number of items to show.
235 **
236 ** -tkt UUID
237 ** Filters for only those events for the specified ticket.
238 **
239 ** -tag TAG
240 ** filters for a tag
241 **
242
--- src/rss.c
+++ src/rss.c
@@ -22,21 +22,21 @@
22 #include "rss.h"
23 #include <assert.h>
24
25 /*
26 ** WEBPAGE: timeline.rss
27 ** URL: /timeline.rss?y=TYPE&n=LIMIT&tkt=HASH&tag=TAG&wiki=NAME&name=FILENAME
28 **
29 ** Produce an RSS feed of the timeline.
30 **
31 ** TYPE may be: all, ci (show check-ins only), t (show ticket changes only),
32 ** w (show wiki only), e (show tech notes only), f (show forum posts only),
33 ** g (show tag/branch changes only).
34 **
35 ** LIMIT is the number of items to show.
36 **
37 ** tkt=HASH filters for only those events for the specified ticket. tag=TAG
38 ** filters for a tag, and wiki=NAME for a wiki page. Only one may be used.
39 **
40 ** In addition, name=FILENAME filters for a specific file. This may be
41 ** combined with one of the other filters (useful for looking at a specific
42 ** branch).
@@ -231,11 +231,11 @@
231 ** w (show wiki only).
232 **
233 ** -limit|n LIMIT
234 ** The maximum number of items to show.
235 **
236 ** -tkt HASH
237 ** Filters for only those events for the specified ticket.
238 **
239 ** -tag TAG
240 ** filters for a tag
241 **
242
+5 -5
--- src/schema.c
+++ src/schema.c
@@ -321,11 +321,11 @@
321321
@ omtime DATETIME -- Original unchanged date+time, or NULL
322322
@ );
323323
@ CREATE INDEX event_i1 ON event(mtime);
324324
@
325325
@ -- A record of phantoms. A phantom is a record for which we know the
326
-@ -- UUID but we do not (yet) know the file content.
326
+@ -- file hash but we do not (yet) know the file content.
327327
@ --
328328
@ CREATE TABLE phantom(
329329
@ rid INTEGER PRIMARY KEY -- Record ID of the phantom
330330
@ );
331331
@
@@ -362,12 +362,12 @@
362362
@
363363
@ -- Each artifact can have one or more tags. A tag
364364
@ -- is defined by a row in the next table.
365365
@ --
366366
@ -- Wiki pages are tagged with "wiki-NAME" where NAME is the name of
367
-@ -- the wiki page. Tickets changes are tagged with "ticket-UUID" where
368
-@ -- UUID is the indentifier of the ticket. Tags used to assign symbolic
367
+@ -- the wiki page. Tickets changes are tagged with "ticket-HASH" where
368
+@ -- HASH is the indentifier of the ticket. Tags used to assign symbolic
369369
@ -- names to baselines are branches are of the form "sym-NAME" where
370370
@ -- NAME is the symbolic name.
371371
@ --
372372
@ CREATE TABLE tag(
373373
@ tagid INTEGER PRIMARY KEY, -- Numeric tag ID
@@ -421,12 +421,12 @@
421421
@ --
422422
@ CREATE TABLE attachment(
423423
@ attachid INTEGER PRIMARY KEY, -- Local id for this attachment
424424
@ isLatest BOOLEAN DEFAULT 0, -- True if this is the one to use
425425
@ mtime TIMESTAMP, -- Last changed. Julian day.
426
-@ src TEXT, -- UUID of the attachment. NULL to delete
427
-@ target TEXT, -- Object attached to. Wikiname or Tkt UUID
426
+@ src TEXT, -- Hash of the attachment. NULL to delete
427
+@ target TEXT, -- Object attached to. Wikiname or Tkt hash
428428
@ filename TEXT, -- Filename for the attachment
429429
@ comment TEXT, -- Comment associated with this attachment
430430
@ user TEXT -- Name of user adding attachment
431431
@ );
432432
@ CREATE INDEX attachment_idx1 ON attachment(target, filename, mtime);
433433
--- src/schema.c
+++ src/schema.c
@@ -321,11 +321,11 @@
321 @ omtime DATETIME -- Original unchanged date+time, or NULL
322 @ );
323 @ CREATE INDEX event_i1 ON event(mtime);
324 @
325 @ -- A record of phantoms. A phantom is a record for which we know the
326 @ -- UUID but we do not (yet) know the file content.
327 @ --
328 @ CREATE TABLE phantom(
329 @ rid INTEGER PRIMARY KEY -- Record ID of the phantom
330 @ );
331 @
@@ -362,12 +362,12 @@
362 @
363 @ -- Each artifact can have one or more tags. A tag
364 @ -- is defined by a row in the next table.
365 @ --
366 @ -- Wiki pages are tagged with "wiki-NAME" where NAME is the name of
367 @ -- the wiki page. Tickets changes are tagged with "ticket-UUID" where
368 @ -- UUID is the indentifier of the ticket. Tags used to assign symbolic
369 @ -- names to baselines are branches are of the form "sym-NAME" where
370 @ -- NAME is the symbolic name.
371 @ --
372 @ CREATE TABLE tag(
373 @ tagid INTEGER PRIMARY KEY, -- Numeric tag ID
@@ -421,12 +421,12 @@
421 @ --
422 @ CREATE TABLE attachment(
423 @ attachid INTEGER PRIMARY KEY, -- Local id for this attachment
424 @ isLatest BOOLEAN DEFAULT 0, -- True if this is the one to use
425 @ mtime TIMESTAMP, -- Last changed. Julian day.
426 @ src TEXT, -- UUID of the attachment. NULL to delete
427 @ target TEXT, -- Object attached to. Wikiname or Tkt UUID
428 @ filename TEXT, -- Filename for the attachment
429 @ comment TEXT, -- Comment associated with this attachment
430 @ user TEXT -- Name of user adding attachment
431 @ );
432 @ CREATE INDEX attachment_idx1 ON attachment(target, filename, mtime);
433
--- src/schema.c
+++ src/schema.c
@@ -321,11 +321,11 @@
321 @ omtime DATETIME -- Original unchanged date+time, or NULL
322 @ );
323 @ CREATE INDEX event_i1 ON event(mtime);
324 @
325 @ -- A record of phantoms. A phantom is a record for which we know the
326 @ -- file hash but we do not (yet) know the file content.
327 @ --
328 @ CREATE TABLE phantom(
329 @ rid INTEGER PRIMARY KEY -- Record ID of the phantom
330 @ );
331 @
@@ -362,12 +362,12 @@
362 @
363 @ -- Each artifact can have one or more tags. A tag
364 @ -- is defined by a row in the next table.
365 @ --
366 @ -- Wiki pages are tagged with "wiki-NAME" where NAME is the name of
367 @ -- the wiki page. Tickets changes are tagged with "ticket-HASH" where
368 @ -- HASH is the indentifier of the ticket. Tags used to assign symbolic
369 @ -- names to baselines are branches are of the form "sym-NAME" where
370 @ -- NAME is the symbolic name.
371 @ --
372 @ CREATE TABLE tag(
373 @ tagid INTEGER PRIMARY KEY, -- Numeric tag ID
@@ -421,12 +421,12 @@
421 @ --
422 @ CREATE TABLE attachment(
423 @ attachid INTEGER PRIMARY KEY, -- Local id for this attachment
424 @ isLatest BOOLEAN DEFAULT 0, -- True if this is the one to use
425 @ mtime TIMESTAMP, -- Last changed. Julian day.
426 @ src TEXT, -- Hash of the attachment. NULL to delete
427 @ target TEXT, -- Object attached to. Wikiname or Tkt hash
428 @ filename TEXT, -- Filename for the attachment
429 @ comment TEXT, -- Comment associated with this attachment
430 @ user TEXT -- Name of user adding attachment
431 @ );
432 @ CREATE INDEX attachment_idx1 ON attachment(target, filename, mtime);
433
+1 -1
--- src/tar.c
+++ src/tar.c
@@ -466,11 +466,11 @@
466466
**
467467
** zDir is a "synthetic" subdirectory which all files get
468468
** added to as part of the tarball. It may be 0 or an empty string, in
469469
** which case it is ignored. The intention is to create a tarball which
470470
** politely expands into a subdir instead of filling your current dir
471
-** with source files. For example, pass a UUID or "ProjectName".
471
+** with source files. For example, pass an artifact hash or "ProjectName".
472472
**
473473
*/
474474
void tarball_of_checkin(
475475
int rid, /* The RID of the checkin from which to form a tarball */
476476
Blob *pTar, /* Write the tarball into this blob */
477477
--- src/tar.c
+++ src/tar.c
@@ -466,11 +466,11 @@
466 **
467 ** zDir is a "synthetic" subdirectory which all files get
468 ** added to as part of the tarball. It may be 0 or an empty string, in
469 ** which case it is ignored. The intention is to create a tarball which
470 ** politely expands into a subdir instead of filling your current dir
471 ** with source files. For example, pass a UUID or "ProjectName".
472 **
473 */
474 void tarball_of_checkin(
475 int rid, /* The RID of the checkin from which to form a tarball */
476 Blob *pTar, /* Write the tarball into this blob */
477
--- src/tar.c
+++ src/tar.c
@@ -466,11 +466,11 @@
466 **
467 ** zDir is a "synthetic" subdirectory which all files get
468 ** added to as part of the tarball. It may be 0 or an empty string, in
469 ** which case it is ignored. The intention is to create a tarball which
470 ** politely expands into a subdir instead of filling your current dir
471 ** with source files. For example, pass an artifact hash or "ProjectName".
472 **
473 */
474 void tarball_of_checkin(
475 int rid, /* The RID of the checkin from which to form a tarball */
476 Blob *pTar, /* Write the tarball into this blob */
477
+7 -7
--- src/timeline.c
+++ src/timeline.c
@@ -48,15 +48,15 @@
4848
}
4949
5050
/*
5151
** Generate a hyperlink to a version.
5252
*/
53
-void hyperlink_to_uuid(const char *zUuid){
53
+void hyperlink_to_version(const char *zVerHash){
5454
if( g.perm.Hyperlink ){
55
- @ %z(chref("timelineHistLink","%R/info/%!S",zUuid))[%S(zUuid)]</a>
55
+ @ %z(chref("timelineHistLink","%R/info/%!S",zVerHash))[%S(zVerHash)]</a>
5656
}else{
57
- @ <span class="timelineHistDsp">[%S(zUuid)]</span>
57
+ @ <span class="timelineHistDsp">[%S(zVerHash)]</span>
5858
}
5959
}
6060
6161
/*
6262
** Generate a hyperlink to a date & time.
@@ -101,11 +101,11 @@
101101
#define TIMELINE_FCHANGES 0x0000020 /* Detail file changes */
102102
#define TIMELINE_BRCOLOR 0x0000040 /* Background color by branch name */
103103
#define TIMELINE_UCOLOR 0x0000080 /* Background color by user */
104104
#define TIMELINE_FRENAMES 0x0000100 /* Detail only file name changes */
105105
#define TIMELINE_UNHIDE 0x0000200 /* Unhide check-ins with "hidden" tag */
106
-#define TIMELINE_SHOWRID 0x0000400 /* Show RID values in addition to UUIDs */
106
+#define TIMELINE_SHOWRID 0x0000400 /* Show RID values in addition to hashes */
107107
#define TIMELINE_BISECT 0x0000800 /* Show supplimental bisect information */
108108
#define TIMELINE_COMPACT 0x0001000 /* Use the "compact" view style */
109109
#define TIMELINE_VERBOSE 0x0002000 /* Use the "detailed" view style */
110110
#define TIMELINE_MODERN 0x0004000 /* Use the "modern" view style */
111111
#define TIMELINE_COLUMNAR 0x0008000 /* Use the "columns" view style */
@@ -229,11 +229,11 @@
229229
/*
230230
** Output a timeline in the web format given a query. The query
231231
** should return these columns:
232232
**
233233
** 0. rid
234
-** 1. UUID
234
+** 1. artifact hash
235235
** 2. Date/Time
236236
** 3. Comment string
237237
** 4. User
238238
** 5. True if is a leaf
239239
** 6. background color
@@ -533,11 +533,11 @@
533533
}else{
534534
@ <span class='timeline%s(zStyle)Comment'>
535535
}
536536
if( (tmFlags & TIMELINE_CLASSIC)!=0 ){
537537
if( zType[0]=='c' ){
538
- hyperlink_to_uuid(zUuid);
538
+ hyperlink_to_version(zUuid);
539539
if( isLeaf ){
540540
if( db_exists("SELECT 1 FROM tagxref"
541541
" WHERE rid=%d AND tagid=%d AND tagtype>0",
542542
rid, TAG_CLOSED) ){
543543
@ <span class="timelineLeaf">Closed-Leaf:</span>
@@ -546,11 +546,11 @@
546546
}
547547
}
548548
}else if( zType[0]=='e' && tagid ){
549549
hyperlink_to_event_tagid(tagid<0?-tagid:tagid);
550550
}else if( (tmFlags & TIMELINE_ARTID)!=0 ){
551
- hyperlink_to_uuid(zUuid);
551
+ hyperlink_to_version(zUuid);
552552
}
553553
if( tmFlags & TIMELINE_SHOWRID ){
554554
int srcId = delta_source_rid(rid);
555555
if( srcId ){
556556
@ (%d(rid)&larr;%d(srcId))
557557
--- src/timeline.c
+++ src/timeline.c
@@ -48,15 +48,15 @@
48 }
49
50 /*
51 ** Generate a hyperlink to a version.
52 */
53 void hyperlink_to_uuid(const char *zUuid){
54 if( g.perm.Hyperlink ){
55 @ %z(chref("timelineHistLink","%R/info/%!S",zUuid))[%S(zUuid)]</a>
56 }else{
57 @ <span class="timelineHistDsp">[%S(zUuid)]</span>
58 }
59 }
60
61 /*
62 ** Generate a hyperlink to a date & time.
@@ -101,11 +101,11 @@
101 #define TIMELINE_FCHANGES 0x0000020 /* Detail file changes */
102 #define TIMELINE_BRCOLOR 0x0000040 /* Background color by branch name */
103 #define TIMELINE_UCOLOR 0x0000080 /* Background color by user */
104 #define TIMELINE_FRENAMES 0x0000100 /* Detail only file name changes */
105 #define TIMELINE_UNHIDE 0x0000200 /* Unhide check-ins with "hidden" tag */
106 #define TIMELINE_SHOWRID 0x0000400 /* Show RID values in addition to UUIDs */
107 #define TIMELINE_BISECT 0x0000800 /* Show supplimental bisect information */
108 #define TIMELINE_COMPACT 0x0001000 /* Use the "compact" view style */
109 #define TIMELINE_VERBOSE 0x0002000 /* Use the "detailed" view style */
110 #define TIMELINE_MODERN 0x0004000 /* Use the "modern" view style */
111 #define TIMELINE_COLUMNAR 0x0008000 /* Use the "columns" view style */
@@ -229,11 +229,11 @@
229 /*
230 ** Output a timeline in the web format given a query. The query
231 ** should return these columns:
232 **
233 ** 0. rid
234 ** 1. UUID
235 ** 2. Date/Time
236 ** 3. Comment string
237 ** 4. User
238 ** 5. True if is a leaf
239 ** 6. background color
@@ -533,11 +533,11 @@
533 }else{
534 @ <span class='timeline%s(zStyle)Comment'>
535 }
536 if( (tmFlags & TIMELINE_CLASSIC)!=0 ){
537 if( zType[0]=='c' ){
538 hyperlink_to_uuid(zUuid);
539 if( isLeaf ){
540 if( db_exists("SELECT 1 FROM tagxref"
541 " WHERE rid=%d AND tagid=%d AND tagtype>0",
542 rid, TAG_CLOSED) ){
543 @ <span class="timelineLeaf">Closed-Leaf:</span>
@@ -546,11 +546,11 @@
546 }
547 }
548 }else if( zType[0]=='e' && tagid ){
549 hyperlink_to_event_tagid(tagid<0?-tagid:tagid);
550 }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
551 hyperlink_to_uuid(zUuid);
552 }
553 if( tmFlags & TIMELINE_SHOWRID ){
554 int srcId = delta_source_rid(rid);
555 if( srcId ){
556 @ (%d(rid)&larr;%d(srcId))
557
--- src/timeline.c
+++ src/timeline.c
@@ -48,15 +48,15 @@
48 }
49
50 /*
51 ** Generate a hyperlink to a version.
52 */
53 void hyperlink_to_version(const char *zVerHash){
54 if( g.perm.Hyperlink ){
55 @ %z(chref("timelineHistLink","%R/info/%!S",zVerHash))[%S(zVerHash)]</a>
56 }else{
57 @ <span class="timelineHistDsp">[%S(zVerHash)]</span>
58 }
59 }
60
61 /*
62 ** Generate a hyperlink to a date & time.
@@ -101,11 +101,11 @@
101 #define TIMELINE_FCHANGES 0x0000020 /* Detail file changes */
102 #define TIMELINE_BRCOLOR 0x0000040 /* Background color by branch name */
103 #define TIMELINE_UCOLOR 0x0000080 /* Background color by user */
104 #define TIMELINE_FRENAMES 0x0000100 /* Detail only file name changes */
105 #define TIMELINE_UNHIDE 0x0000200 /* Unhide check-ins with "hidden" tag */
106 #define TIMELINE_SHOWRID 0x0000400 /* Show RID values in addition to hashes */
107 #define TIMELINE_BISECT 0x0000800 /* Show supplimental bisect information */
108 #define TIMELINE_COMPACT 0x0001000 /* Use the "compact" view style */
109 #define TIMELINE_VERBOSE 0x0002000 /* Use the "detailed" view style */
110 #define TIMELINE_MODERN 0x0004000 /* Use the "modern" view style */
111 #define TIMELINE_COLUMNAR 0x0008000 /* Use the "columns" view style */
@@ -229,11 +229,11 @@
229 /*
230 ** Output a timeline in the web format given a query. The query
231 ** should return these columns:
232 **
233 ** 0. rid
234 ** 1. artifact hash
235 ** 2. Date/Time
236 ** 3. Comment string
237 ** 4. User
238 ** 5. True if is a leaf
239 ** 6. background color
@@ -533,11 +533,11 @@
533 }else{
534 @ <span class='timeline%s(zStyle)Comment'>
535 }
536 if( (tmFlags & TIMELINE_CLASSIC)!=0 ){
537 if( zType[0]=='c' ){
538 hyperlink_to_version(zUuid);
539 if( isLeaf ){
540 if( db_exists("SELECT 1 FROM tagxref"
541 " WHERE rid=%d AND tagid=%d AND tagtype>0",
542 rid, TAG_CLOSED) ){
543 @ <span class="timelineLeaf">Closed-Leaf:</span>
@@ -546,11 +546,11 @@
546 }
547 }
548 }else if( zType[0]=='e' && tagid ){
549 hyperlink_to_event_tagid(tagid<0?-tagid:tagid);
550 }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
551 hyperlink_to_version(zUuid);
552 }
553 if( tmFlags & TIMELINE_SHOWRID ){
554 int srcId = delta_source_rid(rid);
555 if( srcId ){
556 @ (%d(rid)&larr;%d(srcId))
557
+1 -1
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -448,11 +448,11 @@
448448
);
449449
}
450450
451451
static const char zDefaultView[] =
452452
@ <table cellpadding="5">
453
-@ <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td>
453
+@ <tr><td class="tktDspLabel">Ticket&nbsp;Hash:</td>
454454
@ <th1>
455455
@ if {[info exists tkt_uuid]} {
456456
@ html "<td class='tktDspValue' colspan='3'>"
457457
@ copybtn hash-tk 0 $tkt_uuid 2
458458
@ if {[hascap s]} {
459459
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -448,11 +448,11 @@
448 );
449 }
450
451 static const char zDefaultView[] =
452 @ <table cellpadding="5">
453 @ <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td>
454 @ <th1>
455 @ if {[info exists tkt_uuid]} {
456 @ html "<td class='tktDspValue' colspan='3'>"
457 @ copybtn hash-tk 0 $tkt_uuid 2
458 @ if {[hascap s]} {
459
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -448,11 +448,11 @@
448 );
449 }
450
451 static const char zDefaultView[] =
452 @ <table cellpadding="5">
453 @ <tr><td class="tktDspLabel">Ticket&nbsp;Hash:</td>
454 @ <th1>
455 @ if {[info exists tkt_uuid]} {
456 @ html "<td class='tktDspValue' colspan='3'>"
457 @ copybtn hash-tk 0 $tkt_uuid 2
458 @ if {[hascap s]} {
459
+1 -1
--- src/util.c
+++ src/util.c
@@ -416,11 +416,11 @@
416416
417417
/*
418418
** Returns TRUE if zSym is exactly HNAME_LEN_SHA1 or HNAME_LEN_K256
419419
** bytes long and contains only lower-case ASCII hexadecimal values.
420420
*/
421
-int fossil_is_uuid(const char *zSym){
421
+int fossil_is_artifact_hash(const char *zSym){
422422
int sz = zSym ? (int)strlen(zSym) : 0;
423423
return (HNAME_LEN_SHA1==sz || HNAME_LEN_K256==sz) && validate16(zSym, sz);
424424
}
425425
426426
/*
427427
--- src/util.c
+++ src/util.c
@@ -416,11 +416,11 @@
416
417 /*
418 ** Returns TRUE if zSym is exactly HNAME_LEN_SHA1 or HNAME_LEN_K256
419 ** bytes long and contains only lower-case ASCII hexadecimal values.
420 */
421 int fossil_is_uuid(const char *zSym){
422 int sz = zSym ? (int)strlen(zSym) : 0;
423 return (HNAME_LEN_SHA1==sz || HNAME_LEN_K256==sz) && validate16(zSym, sz);
424 }
425
426 /*
427
--- src/util.c
+++ src/util.c
@@ -416,11 +416,11 @@
416
417 /*
418 ** Returns TRUE if zSym is exactly HNAME_LEN_SHA1 or HNAME_LEN_K256
419 ** bytes long and contains only lower-case ASCII hexadecimal values.
420 */
421 int fossil_is_artifact_hash(const char *zSym){
422 int sz = zSym ? (int)strlen(zSym) : 0;
423 return (HNAME_LEN_SHA1==sz || HNAME_LEN_K256==sz) && validate16(zSym, sz);
424 }
425
426 /*
427
+1 -1
--- src/zip.c
+++ src/zip.c
@@ -614,11 +614,11 @@
614614
**
615615
** zDir is a "synthetic" subdirectory which all zipped files get
616616
** added to as part of the zip file. It may be 0 or an empty string,
617617
** in which case it is ignored. The intention is to create a zip which
618618
** politely expands into a subdir instead of filling your current dir
619
-** with source files. For example, pass a UUID or "ProjectName".
619
+** with source files. For example, pass a commit hash or "ProjectName".
620620
**
621621
*/
622622
static void zip_of_checkin(
623623
int eType, /* Type of archive (ZIP or SQLAR) */
624624
int rid, /* The RID of the checkin to build the archive from */
625625
--- src/zip.c
+++ src/zip.c
@@ -614,11 +614,11 @@
614 **
615 ** zDir is a "synthetic" subdirectory which all zipped files get
616 ** added to as part of the zip file. It may be 0 or an empty string,
617 ** in which case it is ignored. The intention is to create a zip which
618 ** politely expands into a subdir instead of filling your current dir
619 ** with source files. For example, pass a UUID or "ProjectName".
620 **
621 */
622 static void zip_of_checkin(
623 int eType, /* Type of archive (ZIP or SQLAR) */
624 int rid, /* The RID of the checkin to build the archive from */
625
--- src/zip.c
+++ src/zip.c
@@ -614,11 +614,11 @@
614 **
615 ** zDir is a "synthetic" subdirectory which all zipped files get
616 ** added to as part of the zip file. It may be 0 or an empty string,
617 ** in which case it is ignored. The intention is to create a zip which
618 ** politely expands into a subdir instead of filling your current dir
619 ** with source files. For example, pass a commit hash or "ProjectName".
620 **
621 */
622 static void zip_of_checkin(
623 int eType, /* Type of archive (ZIP or SQLAR) */
624 int rid, /* The RID of the checkin to build the archive from */
625
+79 -79
--- test/amend.test
+++ test/amend.test
@@ -26,61 +26,61 @@
2626
proc manifest_comment {comment} {
2727
string map [list { } {\\s} \n {\\n} \r {\\r}] $comment
2828
}
2929
3030
proc uuid_from_commit {res var} {
31
- upvar $var UUID
32
- regexp {^New_Version: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID
31
+ upvar $var HASH
32
+ regexp {^New_Version: ([0-9a-f]{40})[0-9a-f]*$} $res m HASH
3333
}
3434
3535
proc uuid_from_branch {res var} {
36
- upvar $var UUID
37
- regexp {^New branch: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID
36
+ upvar $var HASH
37
+ regexp {^New branch: ([0-9a-f]{40})[0-9a-f]*$} $res m HASH
3838
}
3939
4040
proc uuid_from_checkout {var} {
4141
global RESULT
42
- upvar $var UUID
42
+ upvar $var HASH
4343
fossil status
44
- regexp {checkout:\s+([0-9a-f]{40})} $RESULT m UUID
44
+ regexp {checkout:\s+([0-9a-f]{40})[0-9a-f]*} $RESULT m HASH
4545
}
4646
4747
# Make sure we are not in an open repository and initialize new repository
4848
test_setup
4949
5050
########################################
5151
# Setup: Add file and commit #
5252
########################################
5353
54
-if {![uuid_from_checkout UUIDINIT]} {
54
+if {![uuid_from_checkout HASHINIT]} {
5555
test amend-checkout-failure false
5656
test_cleanup_then_return
5757
}
5858
write_file datafile "data"
5959
fossil add datafile
6060
fossil commit -m "c1"
61
-if {![uuid_from_commit $RESULT UUID]} {
61
+if {![uuid_from_commit $RESULT HASH]} {
6262
test amend-setup-failure false
6363
test_cleanup_then_return
6464
}
6565
6666
########################################
6767
# Test: -branch #
6868
########################################
69
-set UUIDB UUIDB
69
+set HASHB HASHB
7070
write_file datafile "data.file"
7171
fossil commit -m "c2"
72
-if {![uuid_from_commit $RESULT UUIDB]} {
72
+if {![uuid_from_commit $RESULT HASHB]} {
7373
test amend-branch.setup false
7474
}
75
-fossil amend $UUIDB -branch amended-branch
75
+fossil amend $HASHB -branch amended-branch
7676
test amend-branch-1.1 {[regexp {tags:\s+amended-branch} $RESULT]}
7777
fossil branch ls
7878
test amend-branch-1.2 {[string first "* amended-branch" $RESULT] != -1}
7979
fossil tag list
8080
test amend-branch-1.3 {[string first amended-branch $RESULT] != -1}
81
-fossil tag list --raw $UUIDB
81
+fossil tag list --raw $HASHB
8282
test amend-branch-1.4 {[string first "branch=amended-branch" $RESULT] != -1}
8383
test amend-branch-1.5 {[string first "sym-amended-branch" $RESULT] != -1}
8484
fossil timeline -n 1
8585
test amend-branch-1.6 {[string match {*Move*to*branch*amended-branch*} $RESULT]}
8686
@@ -102,84 +102,84 @@
102102
#1234 #1234
103103
1234 1234
104104
123456 #123456
105105
} {
106106
incr tc
107
- fossil amend $UUID -bgcolor $color
108
- test amend-bgcolor-1.$tc.a {[string match "*uuid:*$UUID*" $RESULT]}
109
- fossil tag list --raw $UUID
107
+ fossil amend $HASH -bgcolor $color
108
+ test amend-bgcolor-1.$tc.a {[string match "*uuid:*$HASH*" $RESULT]}
109
+ fossil tag list --raw $HASH
110110
test amend-bgcolor-1.$tc.b {[string first "bgcolor=$result" $RESULT] != -1}
111111
fossil timeline -n 1
112112
test amend-bgcolor-1.$tc.c {
113113
[string match "*Change*background*color*to*\"$result\"*" $RESULT]
114114
}
115115
if {[artifact_from_timeline $RESULT artid]} {
116116
fossil artifact $artid
117117
test amend-bgcolor-1.$tc.d {
118
- [string match "*T +bgcolor $UUID* $result*" $RESULT]
118
+ [string match "*T +bgcolor $HASH* $result*" $RESULT]
119119
}
120120
} else {
121121
if {$VERBOSE} { protOut "No artifact found in timeline output" }
122122
test amend-bgcolor-1.$tc.d false
123123
}
124124
}
125
-fossil amend $UUID -bgcolor {}
126
-test amend-bgcolor-2.1 {[string match "*uuid:*$UUID*" $RESULT]}
127
-fossil tag list --raw $UUID
125
+fossil amend $HASH -bgcolor {}
126
+test amend-bgcolor-2.1 {[string match "*uuid:*$HASH*" $RESULT]}
127
+fossil tag list --raw $HASH
128128
test amend-bgcolor-2.2 {
129129
[string first "bgcolor=" $RESULT] == -1 &&
130130
[string first "bgcolor" $RESULT] != -1
131131
}
132132
fossil timeline -n 1
133133
test amend-bgcolor-2.3 {[string match "*Cancel*background*color.*" $RESULT]}
134134
if {[artifact_from_timeline $RESULT artid]} {
135135
fossil artifact $artid
136
- test amend-bgcolor-2.4 {[string match "*T -bgcolor $UUID*" $RESULT]}
136
+ test amend-bgcolor-2.4 {[string match "*T -bgcolor $HASH*" $RESULT]}
137137
} else {
138138
if {$VERBOSE} { protOut "No artifact found in timeline output" }
139139
test amend-bgcolor-2.4 false
140140
}
141141
142142
########################################
143143
# Test: -branchcolor #
144144
########################################
145
-set UUID2 UUID2
146
-fossil branch new brclr $UUID
147
-if {![uuid_from_branch $RESULT UUID2]} {
145
+set HASH2 HASH2
146
+fossil branch new brclr $HASH
147
+if {![uuid_from_branch $RESULT HASH2]} {
148148
test amend-branchcolor.setup false
149149
}
150
-fossil update $UUID2
151
-fossil amend $UUID2 -branchcolor yellow
152
-test amend-branchcolor-1.1 {[string match "*uuid:*$UUID2*" $RESULT]}
153
-fossil tag ls --raw $UUID2
150
+fossil update $HASH2
151
+fossil amend $HASH2 -branchcolor yellow
152
+test amend-branchcolor-1.1 {[string match "*uuid:*$HASH2*" $RESULT]}
153
+fossil tag ls --raw $HASH2
154154
test amend-branchcolor-1.2 {[string first "bgcolor=yellow" $RESULT] != -1}
155155
fossil timeline -n 1
156156
test amend-branchcolor-1.3 {
157157
[string match {*Change*branch*background*color*to*"yellow".*} $RESULT]
158158
}
159159
if {[regexp {(?x)[0-9]{2}(?::[0-9]{2}){2}\s+\[([0-9a-f]+)]} $RESULT m artid]} {
160160
fossil artifact $artid
161161
test amend-branchcolor-1.4 {
162
- [string match "*T \*bgcolor $UUID2* yellow*" $RESULT]
162
+ [string match "*T \*bgcolor $HASH2* yellow*" $RESULT]
163163
}
164164
} else {
165165
if {$VERBOSE} { protOut "No artifact found in timeline output" }
166166
test amend-branchcolor-1.4 false
167167
}
168168
169
-set UUIDN UUIDN
169
+set HASHN HASHN
170170
write_file datafile "brclr"
171171
fossil commit -m "brclr"
172
-if {![uuid_from_commit $RESULT UUIDN]} {
172
+if {![uuid_from_commit $RESULT HASHN]} {
173173
test amend-branchcolor-propagating.setup false
174174
}
175175
write_file datafile "bc1"
176176
fossil commit -m "mc1"
177177
write_file datafile "bc2"
178178
fossil commit -m "mc2"
179
-fossil amend $UUIDN -branchcolor deadbe
180
-test amend-branchcolor-2.1 {[string match "*uuid:*$UUIDN*" $RESULT]}
179
+fossil amend $HASHN -branchcolor deadbe
180
+test amend-branchcolor-2.1 {[string match "*uuid:*$HASHN*" $RESULT]}
181181
fossil tag ls --raw current
182182
test amend-branchcolor-2.2 {[string first "bgcolor=#deadbe" $RESULT] != -1}
183183
fossil timeline -n 1
184184
test amend-branchcolor-2.3 {
185185
[string match {*Change*branch*background*color*to*"#deadbe".*} $RESULT]
@@ -186,13 +186,13 @@
186186
}
187187
188188
########################################
189189
# Test: -author #
190190
########################################
191
-fossil amend $UUID -author author-test
191
+fossil amend $HASH -author author-test
192192
test amend-author-1.1 {[string match {*comment:*(user:*author-test)*} $RESULT]}
193
-fossil tag ls --raw $UUID
193
+fossil tag ls --raw $HASH
194194
test amend-author-1.2 {[string first "user=author-test" $RESULT] != -1}
195195
fossil timeline -n 1
196196
test amend-author-1.3 {[string match {*Change*user*to*"author-test".*} $RESULT]}
197197
198198
########################################
@@ -200,13 +200,13 @@
200200
########################################
201201
set timestamp [clock scan yesterday]
202202
set date [clock format $timestamp -format "%Y-%m-%d" -gmt 1]
203203
set time [clock format $timestamp -format "%H:%M:%S" -gmt 1]
204204
set datetime "$date $time"
205
-fossil amend $UUIDINIT -date $datetime
206
-test amend-date-1.1 {[string match "*uuid:*$UUIDINIT*$datetime*" $RESULT]}
207
-fossil tag ls --raw $UUIDINIT
205
+fossil amend $HASHINIT -date $datetime
206
+test amend-date-1.1 {[string match "*uuid:*$HASHINIT*$datetime*" $RESULT]}
207
+fossil tag ls --raw $HASHINIT
208208
test amend-date-1.2 {[string first "date=$datetime" $RESULT] != -1}
209209
fossil timeline -n 1
210210
test amend-date-1.3 {[string match "*Timestamp*$date*$time*" $RESULT]}
211211
set badformats {
212212
"%+"
@@ -217,67 +217,67 @@
217217
}
218218
set sc 0
219219
foreach badformat $badformats {
220220
incr sc
221221
set datetime [clock format $timestamp -format $badformat -gmt 1]
222
- fossil amend $UUIDINIT -date $datetime -expectError
222
+ fossil amend $HASHINIT -date $datetime -expectError
223223
test amend-date-2.$sc {[string first "YYYY-MM-DD HH:MM:SS" $RESULT] != -1}
224224
}
225225
226226
########################################
227227
# Test: -hide #
228228
########################################
229
-set UUIDH UUIDH
229
+set HASHH HASHH
230230
fossil revert
231231
fossil update trunk
232232
fossil branch new tohide current
233
-if {![uuid_from_branch $RESULT UUIDH]} {
233
+if {![uuid_from_branch $RESULT HASHH]} {
234234
test amend-hide-setup false
235235
}
236
-fossil amend $UUIDH -hide
237
-test amend-hide-1.1 {[string match "*uuid:*$UUIDH*" $RESULT]}
238
-fossil tag ls --raw $UUIDH
236
+fossil amend $HASHH -hide
237
+test amend-hide-1.1 {[string match "*uuid:*$HASHH*" $RESULT]}
238
+fossil tag ls --raw $HASHH
239239
test amend-hide-1.2 {[string first "hidden" $RESULT] != -1}
240240
fossil timeline -n 1
241241
test amend-hide-1.3 {[string match {*Add*propagating*"hidden".*} $RESULT]}
242242
243243
########################################
244244
# Test: -close #
245245
########################################
246
-set UUIDC UUIDC
247
-fossil branch new cllf $UUID
248
-if {![uuid_from_branch $RESULT UUIDC]} {
246
+set HASHC HASHC
247
+fossil branch new cllf $HASH
248
+if {![uuid_from_branch $RESULT HASHC]} {
249249
test amend-close.setup false
250250
}
251
-fossil update $UUIDC
252
-fossil amend $UUIDC -close
253
-test amend-close-1.1.a {[string match "*uuid:*$UUIDC*" $RESULT]}
251
+fossil update $HASHC
252
+fossil amend $HASHC -close
253
+test amend-close-1.1.a {[string match "*uuid:*$HASHC*" $RESULT]}
254254
test amend-close-1.1.b {
255255
[string match "*comment:*Create*new*branch*named*\"cllf\"*" $RESULT]
256256
}
257
-fossil tag ls --raw $UUIDC
257
+fossil tag ls --raw $HASHC
258258
test amend-close-1.2 {[string first "closed" $RESULT] != -1}
259259
fossil timeline -n 1
260260
test amend-close-1.3 {[string match {*Mark*"Closed".*} $RESULT]}
261261
write_file datafile "cllf"
262262
fossil commit -m "should fail" -expectError
263263
test amend-close-2 {[string first "closed leaf" $RESULT] != -1}
264264
265
-set UUID3 UUID3
265
+set HASH3 HASH3
266266
fossil revert
267267
fossil update trunk
268268
write_file datafile "cb"
269269
fossil commit -m "closed-branch" --branch "closebranch"
270
-if {![uuid_from_commit $RESULT UUID3]} {
270
+if {![uuid_from_commit $RESULT HASH3]} {
271271
test amend-close-3.setup false
272272
}
273273
write_file datafile "b1"
274274
fossil commit -m "m1"
275275
write_file datafile "b2"
276276
fossil commit -m "m2"
277
-fossil amend $UUID3 --close
278
-test amend-close-3.1 {[string match "*uuid:*$UUID3*" $RESULT]}
277
+fossil amend $HASH3 --close
278
+test amend-close-3.1 {[string match "*uuid:*$HASH3*" $RESULT]}
279279
fossil tag ls --raw current
280280
test amend-close-3.2 {[string first "closed" $RESULT] != -1}
281281
fossil timeline -n 1
282282
test amend-close-3.3 {
283283
[string match "*Add*propagating*\"closed\".*" $RESULT]
@@ -310,96 +310,96 @@
310310
append t1exp ", $res"
311311
append t2exp "sym-$res*"
312312
append t3exp "Add*tag*\"$res\".*"
313313
append t5exp "Cancel*tag*\"$res\".*"
314314
}
315
- eval fossil amend $UUID $tags
316
- test amend-tag-$tc.1 {[string match "*uuid:*$UUID*tags:*$t1exp*" $RESULT]}
317
- fossil tag ls --raw $UUID
315
+ eval fossil amend $HASH $tags
316
+ test amend-tag-$tc.1 {[string match "*uuid:*$HASH*tags:*$t1exp*" $RESULT]}
317
+ fossil tag ls --raw $HASH
318318
test amend-tag-$tc.2 {[string match $t2exp $RESULT]}
319319
fossil timeline -n 1
320320
test amend-tag-$tc.3 {[string match $t3exp $RESULT]}
321
- eval fossil amend $UUID $cancels
321
+ eval fossil amend $HASH $cancels
322322
test amend-tag-$tc.4 {![string match "*tags:*$t1exp*" $RESULT]}
323323
fossil timeline -n 1
324324
test amend-tag-$tc.5 {[string match $t5exp $RESULT]}
325325
}
326326
327327
########################################
328328
# Test: -comment #
329329
########################################
330330
proc prep-test {comment content} {
331
- global UUID RESULT
331
+ global HASH RESULT
332332
333333
fossil revert
334334
fossil update trunk
335335
write_file datafile $comment
336336
fossil commit -m $content
337
- if {![uuid_from_commit $RESULT UUID]} {
338
- set UUID ""
337
+ if {![uuid_from_commit $RESULT HASH]} {
338
+ set HASH ""
339339
}
340340
}
341341
342
-proc test-comment {name UUID comment} {
342
+proc test-comment {name HASH comment} {
343343
global VERBOSE RESULT
344344
345345
test amend-comment-$name.1 {
346
- [string match "*uuid:*$UUID*comment:*$comment*" $RESULT]
346
+ [string match "*uuid:*$HASH*comment:*$comment*" $RESULT]
347347
}
348348
fossil timeline -n 1
349349
if {[artifact_from_timeline $RESULT artid]} {
350350
fossil artifact $artid
351351
test amend-comment-$name.2 {
352
- [string match "*T +comment $UUID* *[manifest_comment $comment]*" $RESULT]
352
+ [string match "*T +comment $HASH* *[manifest_comment $comment]*" $RESULT]
353353
}
354354
} else {
355355
if {$VERBOSE} { protOut "No artifact found in timeline output: $RESULT" }
356356
test amend-comment-$name.2 false
357357
}
358358
fossil timeline -n 1
359359
test amend-comment-$name.3 {
360
- [string match "*[short_uuid $UUID]*Edit*check-in*comment.*" $RESULT]
360
+ [string match "*[short_uuid $HASH]*Edit*check-in*comment.*" $RESULT]
361361
}
362
- fossil info $UUID
362
+ fossil info $HASH
363363
test amend-comment-$name.4 {
364
- [string match "*uuid:*$UUID*comment:*$comment*" $RESULT]
364
+ [string match "*uuid:*$HASH*comment:*$comment*" $RESULT]
365365
}
366366
}
367367
368368
prep-test "revision 1" "revision 1"
369
-fossil amend $UUID -comment "revised revision 1"
370
-test-comment 1 $UUID "revised revision 1"
369
+fossil amend $HASH -comment "revised revision 1"
370
+test-comment 1 $HASH "revised revision 1"
371371
372372
prep-test "revision 2" "revision 2"
373
-fossil amend $UUID -m "revised revision 2 with -m"
374
-test-comment 2 $UUID "revised revision 2 with -m"
373
+fossil amend $HASH -m "revised revision 2 with -m"
374
+test-comment 2 $HASH "revised revision 2 with -m"
375375
376376
prep-test "revision 3" "revision 3"
377377
write_file commitmsg "revision 3 revised"
378
-fossil amend $UUID -message-file commitmsg
379
-test-comment 3 $UUID "revision 3 revised"
378
+fossil amend $HASH -message-file commitmsg
379
+test-comment 3 $HASH "revision 3 revised"
380380
381381
prep-test "revision 4" "revision 4"
382382
write_file commitmsg "revision 4 revised with -M"
383
-fossil amend $UUID -M commitmsg
384
-test-comment 4 $UUID "revision 4 revised with -M"
383
+fossil amend $HASH -M commitmsg
384
+test-comment 4 $HASH "revision 4 revised with -M"
385385
386386
prep-test "final comment" "final content"
387387
if {[catch {exec which ed} result]} {
388388
if {$VERBOSE} { protOut "Install ed for interactive comment test: $result" }
389
- test-comment 5 $UUID "ed required for interactive edit"
389
+ test-comment 5 $HASH "ed required for interactive edit"
390390
} else {
391391
fossil settings editor "ed -s"
392392
set comment "interactive edited comment"
393
- fossil_maybe_answer "a\n$comment\n.\nw\nq\n" amend $UUID --edit-comment
394
- test-comment 5 $UUID $comment
393
+ fossil_maybe_answer "a\n$comment\n.\nw\nq\n" amend $HASH --edit-comment
394
+ test-comment 5 $HASH $comment
395395
}
396396
397397
########################################
398
-# Test: NULL UUID #
398
+# Test: NULL hash #
399399
########################################
400400
fossil amend {} -close -expectError
401401
test amend-null-uuid {$CODE && [string first "no such check-in" $RESULT] != -1}
402402
403403
###############################################################################
404404
405405
test_cleanup
406406
--- test/amend.test
+++ test/amend.test
@@ -26,61 +26,61 @@
26 proc manifest_comment {comment} {
27 string map [list { } {\\s} \n {\\n} \r {\\r}] $comment
28 }
29
30 proc uuid_from_commit {res var} {
31 upvar $var UUID
32 regexp {^New_Version: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID
33 }
34
35 proc uuid_from_branch {res var} {
36 upvar $var UUID
37 regexp {^New branch: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID
38 }
39
40 proc uuid_from_checkout {var} {
41 global RESULT
42 upvar $var UUID
43 fossil status
44 regexp {checkout:\s+([0-9a-f]{40})} $RESULT m UUID
45 }
46
47 # Make sure we are not in an open repository and initialize new repository
48 test_setup
49
50 ########################################
51 # Setup: Add file and commit #
52 ########################################
53
54 if {![uuid_from_checkout UUIDINIT]} {
55 test amend-checkout-failure false
56 test_cleanup_then_return
57 }
58 write_file datafile "data"
59 fossil add datafile
60 fossil commit -m "c1"
61 if {![uuid_from_commit $RESULT UUID]} {
62 test amend-setup-failure false
63 test_cleanup_then_return
64 }
65
66 ########################################
67 # Test: -branch #
68 ########################################
69 set UUIDB UUIDB
70 write_file datafile "data.file"
71 fossil commit -m "c2"
72 if {![uuid_from_commit $RESULT UUIDB]} {
73 test amend-branch.setup false
74 }
75 fossil amend $UUIDB -branch amended-branch
76 test amend-branch-1.1 {[regexp {tags:\s+amended-branch} $RESULT]}
77 fossil branch ls
78 test amend-branch-1.2 {[string first "* amended-branch" $RESULT] != -1}
79 fossil tag list
80 test amend-branch-1.3 {[string first amended-branch $RESULT] != -1}
81 fossil tag list --raw $UUIDB
82 test amend-branch-1.4 {[string first "branch=amended-branch" $RESULT] != -1}
83 test amend-branch-1.5 {[string first "sym-amended-branch" $RESULT] != -1}
84 fossil timeline -n 1
85 test amend-branch-1.6 {[string match {*Move*to*branch*amended-branch*} $RESULT]}
86
@@ -102,84 +102,84 @@
102 #1234 #1234
103 1234 1234
104 123456 #123456
105 } {
106 incr tc
107 fossil amend $UUID -bgcolor $color
108 test amend-bgcolor-1.$tc.a {[string match "*uuid:*$UUID*" $RESULT]}
109 fossil tag list --raw $UUID
110 test amend-bgcolor-1.$tc.b {[string first "bgcolor=$result" $RESULT] != -1}
111 fossil timeline -n 1
112 test amend-bgcolor-1.$tc.c {
113 [string match "*Change*background*color*to*\"$result\"*" $RESULT]
114 }
115 if {[artifact_from_timeline $RESULT artid]} {
116 fossil artifact $artid
117 test amend-bgcolor-1.$tc.d {
118 [string match "*T +bgcolor $UUID* $result*" $RESULT]
119 }
120 } else {
121 if {$VERBOSE} { protOut "No artifact found in timeline output" }
122 test amend-bgcolor-1.$tc.d false
123 }
124 }
125 fossil amend $UUID -bgcolor {}
126 test amend-bgcolor-2.1 {[string match "*uuid:*$UUID*" $RESULT]}
127 fossil tag list --raw $UUID
128 test amend-bgcolor-2.2 {
129 [string first "bgcolor=" $RESULT] == -1 &&
130 [string first "bgcolor" $RESULT] != -1
131 }
132 fossil timeline -n 1
133 test amend-bgcolor-2.3 {[string match "*Cancel*background*color.*" $RESULT]}
134 if {[artifact_from_timeline $RESULT artid]} {
135 fossil artifact $artid
136 test amend-bgcolor-2.4 {[string match "*T -bgcolor $UUID*" $RESULT]}
137 } else {
138 if {$VERBOSE} { protOut "No artifact found in timeline output" }
139 test amend-bgcolor-2.4 false
140 }
141
142 ########################################
143 # Test: -branchcolor #
144 ########################################
145 set UUID2 UUID2
146 fossil branch new brclr $UUID
147 if {![uuid_from_branch $RESULT UUID2]} {
148 test amend-branchcolor.setup false
149 }
150 fossil update $UUID2
151 fossil amend $UUID2 -branchcolor yellow
152 test amend-branchcolor-1.1 {[string match "*uuid:*$UUID2*" $RESULT]}
153 fossil tag ls --raw $UUID2
154 test amend-branchcolor-1.2 {[string first "bgcolor=yellow" $RESULT] != -1}
155 fossil timeline -n 1
156 test amend-branchcolor-1.3 {
157 [string match {*Change*branch*background*color*to*"yellow".*} $RESULT]
158 }
159 if {[regexp {(?x)[0-9]{2}(?::[0-9]{2}){2}\s+\[([0-9a-f]+)]} $RESULT m artid]} {
160 fossil artifact $artid
161 test amend-branchcolor-1.4 {
162 [string match "*T \*bgcolor $UUID2* yellow*" $RESULT]
163 }
164 } else {
165 if {$VERBOSE} { protOut "No artifact found in timeline output" }
166 test amend-branchcolor-1.4 false
167 }
168
169 set UUIDN UUIDN
170 write_file datafile "brclr"
171 fossil commit -m "brclr"
172 if {![uuid_from_commit $RESULT UUIDN]} {
173 test amend-branchcolor-propagating.setup false
174 }
175 write_file datafile "bc1"
176 fossil commit -m "mc1"
177 write_file datafile "bc2"
178 fossil commit -m "mc2"
179 fossil amend $UUIDN -branchcolor deadbe
180 test amend-branchcolor-2.1 {[string match "*uuid:*$UUIDN*" $RESULT]}
181 fossil tag ls --raw current
182 test amend-branchcolor-2.2 {[string first "bgcolor=#deadbe" $RESULT] != -1}
183 fossil timeline -n 1
184 test amend-branchcolor-2.3 {
185 [string match {*Change*branch*background*color*to*"#deadbe".*} $RESULT]
@@ -186,13 +186,13 @@
186 }
187
188 ########################################
189 # Test: -author #
190 ########################################
191 fossil amend $UUID -author author-test
192 test amend-author-1.1 {[string match {*comment:*(user:*author-test)*} $RESULT]}
193 fossil tag ls --raw $UUID
194 test amend-author-1.2 {[string first "user=author-test" $RESULT] != -1}
195 fossil timeline -n 1
196 test amend-author-1.3 {[string match {*Change*user*to*"author-test".*} $RESULT]}
197
198 ########################################
@@ -200,13 +200,13 @@
200 ########################################
201 set timestamp [clock scan yesterday]
202 set date [clock format $timestamp -format "%Y-%m-%d" -gmt 1]
203 set time [clock format $timestamp -format "%H:%M:%S" -gmt 1]
204 set datetime "$date $time"
205 fossil amend $UUIDINIT -date $datetime
206 test amend-date-1.1 {[string match "*uuid:*$UUIDINIT*$datetime*" $RESULT]}
207 fossil tag ls --raw $UUIDINIT
208 test amend-date-1.2 {[string first "date=$datetime" $RESULT] != -1}
209 fossil timeline -n 1
210 test amend-date-1.3 {[string match "*Timestamp*$date*$time*" $RESULT]}
211 set badformats {
212 "%+"
@@ -217,67 +217,67 @@
217 }
218 set sc 0
219 foreach badformat $badformats {
220 incr sc
221 set datetime [clock format $timestamp -format $badformat -gmt 1]
222 fossil amend $UUIDINIT -date $datetime -expectError
223 test amend-date-2.$sc {[string first "YYYY-MM-DD HH:MM:SS" $RESULT] != -1}
224 }
225
226 ########################################
227 # Test: -hide #
228 ########################################
229 set UUIDH UUIDH
230 fossil revert
231 fossil update trunk
232 fossil branch new tohide current
233 if {![uuid_from_branch $RESULT UUIDH]} {
234 test amend-hide-setup false
235 }
236 fossil amend $UUIDH -hide
237 test amend-hide-1.1 {[string match "*uuid:*$UUIDH*" $RESULT]}
238 fossil tag ls --raw $UUIDH
239 test amend-hide-1.2 {[string first "hidden" $RESULT] != -1}
240 fossil timeline -n 1
241 test amend-hide-1.3 {[string match {*Add*propagating*"hidden".*} $RESULT]}
242
243 ########################################
244 # Test: -close #
245 ########################################
246 set UUIDC UUIDC
247 fossil branch new cllf $UUID
248 if {![uuid_from_branch $RESULT UUIDC]} {
249 test amend-close.setup false
250 }
251 fossil update $UUIDC
252 fossil amend $UUIDC -close
253 test amend-close-1.1.a {[string match "*uuid:*$UUIDC*" $RESULT]}
254 test amend-close-1.1.b {
255 [string match "*comment:*Create*new*branch*named*\"cllf\"*" $RESULT]
256 }
257 fossil tag ls --raw $UUIDC
258 test amend-close-1.2 {[string first "closed" $RESULT] != -1}
259 fossil timeline -n 1
260 test amend-close-1.3 {[string match {*Mark*"Closed".*} $RESULT]}
261 write_file datafile "cllf"
262 fossil commit -m "should fail" -expectError
263 test amend-close-2 {[string first "closed leaf" $RESULT] != -1}
264
265 set UUID3 UUID3
266 fossil revert
267 fossil update trunk
268 write_file datafile "cb"
269 fossil commit -m "closed-branch" --branch "closebranch"
270 if {![uuid_from_commit $RESULT UUID3]} {
271 test amend-close-3.setup false
272 }
273 write_file datafile "b1"
274 fossil commit -m "m1"
275 write_file datafile "b2"
276 fossil commit -m "m2"
277 fossil amend $UUID3 --close
278 test amend-close-3.1 {[string match "*uuid:*$UUID3*" $RESULT]}
279 fossil tag ls --raw current
280 test amend-close-3.2 {[string first "closed" $RESULT] != -1}
281 fossil timeline -n 1
282 test amend-close-3.3 {
283 [string match "*Add*propagating*\"closed\".*" $RESULT]
@@ -310,96 +310,96 @@
310 append t1exp ", $res"
311 append t2exp "sym-$res*"
312 append t3exp "Add*tag*\"$res\".*"
313 append t5exp "Cancel*tag*\"$res\".*"
314 }
315 eval fossil amend $UUID $tags
316 test amend-tag-$tc.1 {[string match "*uuid:*$UUID*tags:*$t1exp*" $RESULT]}
317 fossil tag ls --raw $UUID
318 test amend-tag-$tc.2 {[string match $t2exp $RESULT]}
319 fossil timeline -n 1
320 test amend-tag-$tc.3 {[string match $t3exp $RESULT]}
321 eval fossil amend $UUID $cancels
322 test amend-tag-$tc.4 {![string match "*tags:*$t1exp*" $RESULT]}
323 fossil timeline -n 1
324 test amend-tag-$tc.5 {[string match $t5exp $RESULT]}
325 }
326
327 ########################################
328 # Test: -comment #
329 ########################################
330 proc prep-test {comment content} {
331 global UUID RESULT
332
333 fossil revert
334 fossil update trunk
335 write_file datafile $comment
336 fossil commit -m $content
337 if {![uuid_from_commit $RESULT UUID]} {
338 set UUID ""
339 }
340 }
341
342 proc test-comment {name UUID comment} {
343 global VERBOSE RESULT
344
345 test amend-comment-$name.1 {
346 [string match "*uuid:*$UUID*comment:*$comment*" $RESULT]
347 }
348 fossil timeline -n 1
349 if {[artifact_from_timeline $RESULT artid]} {
350 fossil artifact $artid
351 test amend-comment-$name.2 {
352 [string match "*T +comment $UUID* *[manifest_comment $comment]*" $RESULT]
353 }
354 } else {
355 if {$VERBOSE} { protOut "No artifact found in timeline output: $RESULT" }
356 test amend-comment-$name.2 false
357 }
358 fossil timeline -n 1
359 test amend-comment-$name.3 {
360 [string match "*[short_uuid $UUID]*Edit*check-in*comment.*" $RESULT]
361 }
362 fossil info $UUID
363 test amend-comment-$name.4 {
364 [string match "*uuid:*$UUID*comment:*$comment*" $RESULT]
365 }
366 }
367
368 prep-test "revision 1" "revision 1"
369 fossil amend $UUID -comment "revised revision 1"
370 test-comment 1 $UUID "revised revision 1"
371
372 prep-test "revision 2" "revision 2"
373 fossil amend $UUID -m "revised revision 2 with -m"
374 test-comment 2 $UUID "revised revision 2 with -m"
375
376 prep-test "revision 3" "revision 3"
377 write_file commitmsg "revision 3 revised"
378 fossil amend $UUID -message-file commitmsg
379 test-comment 3 $UUID "revision 3 revised"
380
381 prep-test "revision 4" "revision 4"
382 write_file commitmsg "revision 4 revised with -M"
383 fossil amend $UUID -M commitmsg
384 test-comment 4 $UUID "revision 4 revised with -M"
385
386 prep-test "final comment" "final content"
387 if {[catch {exec which ed} result]} {
388 if {$VERBOSE} { protOut "Install ed for interactive comment test: $result" }
389 test-comment 5 $UUID "ed required for interactive edit"
390 } else {
391 fossil settings editor "ed -s"
392 set comment "interactive edited comment"
393 fossil_maybe_answer "a\n$comment\n.\nw\nq\n" amend $UUID --edit-comment
394 test-comment 5 $UUID $comment
395 }
396
397 ########################################
398 # Test: NULL UUID #
399 ########################################
400 fossil amend {} -close -expectError
401 test amend-null-uuid {$CODE && [string first "no such check-in" $RESULT] != -1}
402
403 ###############################################################################
404
405 test_cleanup
406
--- test/amend.test
+++ test/amend.test
@@ -26,61 +26,61 @@
26 proc manifest_comment {comment} {
27 string map [list { } {\\s} \n {\\n} \r {\\r}] $comment
28 }
29
30 proc uuid_from_commit {res var} {
31 upvar $var HASH
32 regexp {^New_Version: ([0-9a-f]{40})[0-9a-f]*$} $res m HASH
33 }
34
35 proc uuid_from_branch {res var} {
36 upvar $var HASH
37 regexp {^New branch: ([0-9a-f]{40})[0-9a-f]*$} $res m HASH
38 }
39
40 proc uuid_from_checkout {var} {
41 global RESULT
42 upvar $var HASH
43 fossil status
44 regexp {checkout:\s+([0-9a-f]{40})[0-9a-f]*} $RESULT m HASH
45 }
46
47 # Make sure we are not in an open repository and initialize new repository
48 test_setup
49
50 ########################################
51 # Setup: Add file and commit #
52 ########################################
53
54 if {![uuid_from_checkout HASHINIT]} {
55 test amend-checkout-failure false
56 test_cleanup_then_return
57 }
58 write_file datafile "data"
59 fossil add datafile
60 fossil commit -m "c1"
61 if {![uuid_from_commit $RESULT HASH]} {
62 test amend-setup-failure false
63 test_cleanup_then_return
64 }
65
66 ########################################
67 # Test: -branch #
68 ########################################
69 set HASHB HASHB
70 write_file datafile "data.file"
71 fossil commit -m "c2"
72 if {![uuid_from_commit $RESULT HASHB]} {
73 test amend-branch.setup false
74 }
75 fossil amend $HASHB -branch amended-branch
76 test amend-branch-1.1 {[regexp {tags:\s+amended-branch} $RESULT]}
77 fossil branch ls
78 test amend-branch-1.2 {[string first "* amended-branch" $RESULT] != -1}
79 fossil tag list
80 test amend-branch-1.3 {[string first amended-branch $RESULT] != -1}
81 fossil tag list --raw $HASHB
82 test amend-branch-1.4 {[string first "branch=amended-branch" $RESULT] != -1}
83 test amend-branch-1.5 {[string first "sym-amended-branch" $RESULT] != -1}
84 fossil timeline -n 1
85 test amend-branch-1.6 {[string match {*Move*to*branch*amended-branch*} $RESULT]}
86
@@ -102,84 +102,84 @@
102 #1234 #1234
103 1234 1234
104 123456 #123456
105 } {
106 incr tc
107 fossil amend $HASH -bgcolor $color
108 test amend-bgcolor-1.$tc.a {[string match "*uuid:*$HASH*" $RESULT]}
109 fossil tag list --raw $HASH
110 test amend-bgcolor-1.$tc.b {[string first "bgcolor=$result" $RESULT] != -1}
111 fossil timeline -n 1
112 test amend-bgcolor-1.$tc.c {
113 [string match "*Change*background*color*to*\"$result\"*" $RESULT]
114 }
115 if {[artifact_from_timeline $RESULT artid]} {
116 fossil artifact $artid
117 test amend-bgcolor-1.$tc.d {
118 [string match "*T +bgcolor $HASH* $result*" $RESULT]
119 }
120 } else {
121 if {$VERBOSE} { protOut "No artifact found in timeline output" }
122 test amend-bgcolor-1.$tc.d false
123 }
124 }
125 fossil amend $HASH -bgcolor {}
126 test amend-bgcolor-2.1 {[string match "*uuid:*$HASH*" $RESULT]}
127 fossil tag list --raw $HASH
128 test amend-bgcolor-2.2 {
129 [string first "bgcolor=" $RESULT] == -1 &&
130 [string first "bgcolor" $RESULT] != -1
131 }
132 fossil timeline -n 1
133 test amend-bgcolor-2.3 {[string match "*Cancel*background*color.*" $RESULT]}
134 if {[artifact_from_timeline $RESULT artid]} {
135 fossil artifact $artid
136 test amend-bgcolor-2.4 {[string match "*T -bgcolor $HASH*" $RESULT]}
137 } else {
138 if {$VERBOSE} { protOut "No artifact found in timeline output" }
139 test amend-bgcolor-2.4 false
140 }
141
142 ########################################
143 # Test: -branchcolor #
144 ########################################
145 set HASH2 HASH2
146 fossil branch new brclr $HASH
147 if {![uuid_from_branch $RESULT HASH2]} {
148 test amend-branchcolor.setup false
149 }
150 fossil update $HASH2
151 fossil amend $HASH2 -branchcolor yellow
152 test amend-branchcolor-1.1 {[string match "*uuid:*$HASH2*" $RESULT]}
153 fossil tag ls --raw $HASH2
154 test amend-branchcolor-1.2 {[string first "bgcolor=yellow" $RESULT] != -1}
155 fossil timeline -n 1
156 test amend-branchcolor-1.3 {
157 [string match {*Change*branch*background*color*to*"yellow".*} $RESULT]
158 }
159 if {[regexp {(?x)[0-9]{2}(?::[0-9]{2}){2}\s+\[([0-9a-f]+)]} $RESULT m artid]} {
160 fossil artifact $artid
161 test amend-branchcolor-1.4 {
162 [string match "*T \*bgcolor $HASH2* yellow*" $RESULT]
163 }
164 } else {
165 if {$VERBOSE} { protOut "No artifact found in timeline output" }
166 test amend-branchcolor-1.4 false
167 }
168
169 set HASHN HASHN
170 write_file datafile "brclr"
171 fossil commit -m "brclr"
172 if {![uuid_from_commit $RESULT HASHN]} {
173 test amend-branchcolor-propagating.setup false
174 }
175 write_file datafile "bc1"
176 fossil commit -m "mc1"
177 write_file datafile "bc2"
178 fossil commit -m "mc2"
179 fossil amend $HASHN -branchcolor deadbe
180 test amend-branchcolor-2.1 {[string match "*uuid:*$HASHN*" $RESULT]}
181 fossil tag ls --raw current
182 test amend-branchcolor-2.2 {[string first "bgcolor=#deadbe" $RESULT] != -1}
183 fossil timeline -n 1
184 test amend-branchcolor-2.3 {
185 [string match {*Change*branch*background*color*to*"#deadbe".*} $RESULT]
@@ -186,13 +186,13 @@
186 }
187
188 ########################################
189 # Test: -author #
190 ########################################
191 fossil amend $HASH -author author-test
192 test amend-author-1.1 {[string match {*comment:*(user:*author-test)*} $RESULT]}
193 fossil tag ls --raw $HASH
194 test amend-author-1.2 {[string first "user=author-test" $RESULT] != -1}
195 fossil timeline -n 1
196 test amend-author-1.3 {[string match {*Change*user*to*"author-test".*} $RESULT]}
197
198 ########################################
@@ -200,13 +200,13 @@
200 ########################################
201 set timestamp [clock scan yesterday]
202 set date [clock format $timestamp -format "%Y-%m-%d" -gmt 1]
203 set time [clock format $timestamp -format "%H:%M:%S" -gmt 1]
204 set datetime "$date $time"
205 fossil amend $HASHINIT -date $datetime
206 test amend-date-1.1 {[string match "*uuid:*$HASHINIT*$datetime*" $RESULT]}
207 fossil tag ls --raw $HASHINIT
208 test amend-date-1.2 {[string first "date=$datetime" $RESULT] != -1}
209 fossil timeline -n 1
210 test amend-date-1.3 {[string match "*Timestamp*$date*$time*" $RESULT]}
211 set badformats {
212 "%+"
@@ -217,67 +217,67 @@
217 }
218 set sc 0
219 foreach badformat $badformats {
220 incr sc
221 set datetime [clock format $timestamp -format $badformat -gmt 1]
222 fossil amend $HASHINIT -date $datetime -expectError
223 test amend-date-2.$sc {[string first "YYYY-MM-DD HH:MM:SS" $RESULT] != -1}
224 }
225
226 ########################################
227 # Test: -hide #
228 ########################################
229 set HASHH HASHH
230 fossil revert
231 fossil update trunk
232 fossil branch new tohide current
233 if {![uuid_from_branch $RESULT HASHH]} {
234 test amend-hide-setup false
235 }
236 fossil amend $HASHH -hide
237 test amend-hide-1.1 {[string match "*uuid:*$HASHH*" $RESULT]}
238 fossil tag ls --raw $HASHH
239 test amend-hide-1.2 {[string first "hidden" $RESULT] != -1}
240 fossil timeline -n 1
241 test amend-hide-1.3 {[string match {*Add*propagating*"hidden".*} $RESULT]}
242
243 ########################################
244 # Test: -close #
245 ########################################
246 set HASHC HASHC
247 fossil branch new cllf $HASH
248 if {![uuid_from_branch $RESULT HASHC]} {
249 test amend-close.setup false
250 }
251 fossil update $HASHC
252 fossil amend $HASHC -close
253 test amend-close-1.1.a {[string match "*uuid:*$HASHC*" $RESULT]}
254 test amend-close-1.1.b {
255 [string match "*comment:*Create*new*branch*named*\"cllf\"*" $RESULT]
256 }
257 fossil tag ls --raw $HASHC
258 test amend-close-1.2 {[string first "closed" $RESULT] != -1}
259 fossil timeline -n 1
260 test amend-close-1.3 {[string match {*Mark*"Closed".*} $RESULT]}
261 write_file datafile "cllf"
262 fossil commit -m "should fail" -expectError
263 test amend-close-2 {[string first "closed leaf" $RESULT] != -1}
264
265 set HASH3 HASH3
266 fossil revert
267 fossil update trunk
268 write_file datafile "cb"
269 fossil commit -m "closed-branch" --branch "closebranch"
270 if {![uuid_from_commit $RESULT HASH3]} {
271 test amend-close-3.setup false
272 }
273 write_file datafile "b1"
274 fossil commit -m "m1"
275 write_file datafile "b2"
276 fossil commit -m "m2"
277 fossil amend $HASH3 --close
278 test amend-close-3.1 {[string match "*uuid:*$HASH3*" $RESULT]}
279 fossil tag ls --raw current
280 test amend-close-3.2 {[string first "closed" $RESULT] != -1}
281 fossil timeline -n 1
282 test amend-close-3.3 {
283 [string match "*Add*propagating*\"closed\".*" $RESULT]
@@ -310,96 +310,96 @@
310 append t1exp ", $res"
311 append t2exp "sym-$res*"
312 append t3exp "Add*tag*\"$res\".*"
313 append t5exp "Cancel*tag*\"$res\".*"
314 }
315 eval fossil amend $HASH $tags
316 test amend-tag-$tc.1 {[string match "*uuid:*$HASH*tags:*$t1exp*" $RESULT]}
317 fossil tag ls --raw $HASH
318 test amend-tag-$tc.2 {[string match $t2exp $RESULT]}
319 fossil timeline -n 1
320 test amend-tag-$tc.3 {[string match $t3exp $RESULT]}
321 eval fossil amend $HASH $cancels
322 test amend-tag-$tc.4 {![string match "*tags:*$t1exp*" $RESULT]}
323 fossil timeline -n 1
324 test amend-tag-$tc.5 {[string match $t5exp $RESULT]}
325 }
326
327 ########################################
328 # Test: -comment #
329 ########################################
330 proc prep-test {comment content} {
331 global HASH RESULT
332
333 fossil revert
334 fossil update trunk
335 write_file datafile $comment
336 fossil commit -m $content
337 if {![uuid_from_commit $RESULT HASH]} {
338 set HASH ""
339 }
340 }
341
342 proc test-comment {name HASH comment} {
343 global VERBOSE RESULT
344
345 test amend-comment-$name.1 {
346 [string match "*uuid:*$HASH*comment:*$comment*" $RESULT]
347 }
348 fossil timeline -n 1
349 if {[artifact_from_timeline $RESULT artid]} {
350 fossil artifact $artid
351 test amend-comment-$name.2 {
352 [string match "*T +comment $HASH* *[manifest_comment $comment]*" $RESULT]
353 }
354 } else {
355 if {$VERBOSE} { protOut "No artifact found in timeline output: $RESULT" }
356 test amend-comment-$name.2 false
357 }
358 fossil timeline -n 1
359 test amend-comment-$name.3 {
360 [string match "*[short_uuid $HASH]*Edit*check-in*comment.*" $RESULT]
361 }
362 fossil info $HASH
363 test amend-comment-$name.4 {
364 [string match "*uuid:*$HASH*comment:*$comment*" $RESULT]
365 }
366 }
367
368 prep-test "revision 1" "revision 1"
369 fossil amend $HASH -comment "revised revision 1"
370 test-comment 1 $HASH "revised revision 1"
371
372 prep-test "revision 2" "revision 2"
373 fossil amend $HASH -m "revised revision 2 with -m"
374 test-comment 2 $HASH "revised revision 2 with -m"
375
376 prep-test "revision 3" "revision 3"
377 write_file commitmsg "revision 3 revised"
378 fossil amend $HASH -message-file commitmsg
379 test-comment 3 $HASH "revision 3 revised"
380
381 prep-test "revision 4" "revision 4"
382 write_file commitmsg "revision 4 revised with -M"
383 fossil amend $HASH -M commitmsg
384 test-comment 4 $HASH "revision 4 revised with -M"
385
386 prep-test "final comment" "final content"
387 if {[catch {exec which ed} result]} {
388 if {$VERBOSE} { protOut "Install ed for interactive comment test: $result" }
389 test-comment 5 $HASH "ed required for interactive edit"
390 } else {
391 fossil settings editor "ed -s"
392 set comment "interactive edited comment"
393 fossil_maybe_answer "a\n$comment\n.\nw\nq\n" amend $HASH --edit-comment
394 test-comment 5 $HASH $comment
395 }
396
397 ########################################
398 # Test: NULL hash #
399 ########################################
400 fossil amend {} -close -expectError
401 test amend-null-uuid {$CODE && [string first "no such check-in" $RESULT] != -1}
402
403 ###############################################################################
404
405 test_cleanup
406
--- www/concepts.wiki
+++ www/concepts.wiki
@@ -80,11 +80,11 @@
8080
Communication between repositories is via HTTP. Remote
8181
repositories are identified by URL. You can also point a web browser
8282
at a repository and get human-readable status, history, and tracking
8383
information about the project.
8484
85
-<h3>2.1 Identification Of Artifacts</h3>
85
+<h3><a id="artifacts"></a>2.1 Identification Of Artifacts</h3>
8686
8787
A particular version of a particular file is called an "artifact". Each
8888
artifact has a universally unique name which is the <a
8989
href="http://en.wikipedia.org/wiki/SHA1">SHA1</a> or <a
9090
href="http://en.wikipedia.org/wiki/SHA3">SHA3-256</a> hash of the
9191
--- www/concepts.wiki
+++ www/concepts.wiki
@@ -80,11 +80,11 @@
80 Communication between repositories is via HTTP. Remote
81 repositories are identified by URL. You can also point a web browser
82 at a repository and get human-readable status, history, and tracking
83 information about the project.
84
85 <h3>2.1 Identification Of Artifacts</h3>
86
87 A particular version of a particular file is called an "artifact". Each
88 artifact has a universally unique name which is the <a
89 href="http://en.wikipedia.org/wiki/SHA1">SHA1</a> or <a
90 href="http://en.wikipedia.org/wiki/SHA3">SHA3-256</a> hash of the
91
--- www/concepts.wiki
+++ www/concepts.wiki
@@ -80,11 +80,11 @@
80 Communication between repositories is via HTTP. Remote
81 repositories are identified by URL. You can also point a web browser
82 at a repository and get human-readable status, history, and tracking
83 information about the project.
84
85 <h3><a id="artifacts"></a>2.1 Identification Of Artifacts</h3>
86
87 A particular version of a particular file is called an "artifact". Each
88 artifact has a universally unique name which is the <a
89 href="http://en.wikipedia.org/wiki/SHA1">SHA1</a> or <a
90 href="http://en.wikipedia.org/wiki/SHA3">SHA3-256</a> hash of the
91
--- www/fiveminutes.wiki
+++ www/fiveminutes.wiki
@@ -58,12 +58,12 @@
5858
<h2>Compare two revisions of a file</h2>
5959
<p>If you wish to compare the last revision of a file and its checked out version
6060
in your work directory:</p>
6161
<p>fossil gdiff myfile.c</p>
6262
<p>If you wish to compare two different revisions of a file in the repository:</p>
63
-<p>fossil finfo myfile: Note the first hash, which is the UUID of the commit
63
+<p>fossil finfo myfile: Note the first hash, which is the hash of the commit
6464
when the file was committed</p>
65
-<p>fossil gdiff --from UUID#1 --to UUID#2 myfile.c</p>
65
+<p>fossil gdiff --from HASH#1 --to HASH#2 myfile.c</p>
6666
<h2>Cancel changes and go back to previous revision</h2>
6767
<p>fossil revert myfile.c</p>
6868
<p>Fossil does not prompt when reverting a file. It simply reminds the user about the
6969
"undo" command, just in case the revert was a mistake.</p>
7070
--- www/fiveminutes.wiki
+++ www/fiveminutes.wiki
@@ -58,12 +58,12 @@
58 <h2>Compare two revisions of a file</h2>
59 <p>If you wish to compare the last revision of a file and its checked out version
60 in your work directory:</p>
61 <p>fossil gdiff myfile.c</p>
62 <p>If you wish to compare two different revisions of a file in the repository:</p>
63 <p>fossil finfo myfile: Note the first hash, which is the UUID of the commit
64 when the file was committed</p>
65 <p>fossil gdiff --from UUID#1 --to UUID#2 myfile.c</p>
66 <h2>Cancel changes and go back to previous revision</h2>
67 <p>fossil revert myfile.c</p>
68 <p>Fossil does not prompt when reverting a file. It simply reminds the user about the
69 "undo" command, just in case the revert was a mistake.</p>
70
--- www/fiveminutes.wiki
+++ www/fiveminutes.wiki
@@ -58,12 +58,12 @@
58 <h2>Compare two revisions of a file</h2>
59 <p>If you wish to compare the last revision of a file and its checked out version
60 in your work directory:</p>
61 <p>fossil gdiff myfile.c</p>
62 <p>If you wish to compare two different revisions of a file in the repository:</p>
63 <p>fossil finfo myfile: Note the first hash, which is the hash of the commit
64 when the file was committed</p>
65 <p>fossil gdiff --from HASH#1 --to HASH#2 myfile.c</p>
66 <h2>Cancel changes and go back to previous revision</h2>
67 <p>fossil revert myfile.c</p>
68 <p>Fossil does not prompt when reverting a file. It simply reminds the user about the
69 "undo" command, just in case the revert was a mistake.</p>
70
--- www/json-api/api-artifact.md
+++ www/json-api/api-artifact.md
@@ -14,11 +14,11 @@
1414
1515
Returns information about checkin artifacts (commits).
1616
1717
**Status:** implemented 201110xx
1818
19
-**Request:** `/json/artifact/COMMIT_UUID`
19
+**Request:** `/json/artifact/COMMIT_HASH`
2020
2121
**Required permissions:** "o" (was "h" prior to 20120408)
2222
2323
**Response payload example: (CHANGED SIGNIFICANTLY ON 20120713)**
2424
@@ -30,43 +30,44 @@
3030
"isLeaf":false,
3131
"user":"drh",
3232
"comment":"Merge wideAnnotateUser and jsonWarnings into trunk.",
3333
"timestamp":1330090810,
3434
"parents":[
35
- // 1st entry is primary parent UUID:
35
+ // 1st entry is primary parent hash:
3636
"3a44f95f40a193739aaafc2409f155df43e74a6f",
37
- // Remaining entries are merged-in branch UUIDs:
37
+ // Remaining entries are merged-in branch hashes:
3838
"86f6e675eb3f8761d70d8b82b052ce2b297fffd2",\
3939
"dbf4ecf414881c9aad6f4f125dab9762589ef3d7"\
4040
],
4141
"tags":["trunk"],
4242
"files":[{
4343
"name":"src/diff.c",
44
- // BLOB uuids, NOT commit UUIDs:
44
+ // BLOB hashes, NOT commit hashes:
4545
"uuid":"78c74c3b37e266f8f7e570d5cf476854b7af9d76",
4646
"parent":"b1fa7e636cf4e7b6ed20bba2d2680397f80c096a",
4747
"state":"modified",
4848
"downloadPath":"/raw/src/diff.c?name=78c74c3b37e266f8f7e570d5cf476854b7af9d76"
4949
},
5050
...]
5151
}
5252
```
5353
54
-The "parents" property lists the parent UUIDs of the checkin. The
55
-"parent" property of file entries refers to the parent UUID of that
54
+The "parents" property lists the parent hashes of the checkin. The
55
+"parent" property of file entries refers to the parent hash of that
5656
file. In the case of a merge there may be essentially an arbitrary
5757
number. The first entry in the list is the "primary" parent. The primary
5858
parent is the parent which was not pulled in via a merge operation. The
5959
ordering of remaining entries is unspecified and may even change between
6060
calls. For example: if, from branch C, we merge in A and B and then
61
-commit, then in the artifact response for that commit the UUID of branch
62
-C will be in the first (primary) position, with the UUIDs for branches A
61
+commit, then in the artifact response for that commit the hash of branch
62
+C will be in the first (primary) position, with the hashes for branches A
6363
and B in the following entries (in an unspecified, and possibly
6464
unstable, order).
6565
6666
Note that the "uuid" and "parent" properties of the "files" entries
67
-refer to raw blob uuids, not commit uuids (i.e. not checkins).
67
+refer to raw blob hashes, not commit (a.k.a. check-in) hashes. See also
68
+[the UUID vs. Hash discussion][uvh].
6869
6970
<a id="file"></a>
7071
# File Artifacts
7172
7273
Fetches information about file artifacts.
@@ -77,11 +78,11 @@
7778
7879
**Status:** implemented 20111020
7980
8081
**Required permissions:** "o"
8182
82
-**Request:** `/json/artifact/FILE_UUID`
83
+**Request:** `/json/artifact/FILE_HASH`
8384
8485
**Request options:**
8586
8687
- `format=(raw|html|none)` (default=none). If set, the contents of the
8788
artifact are included if they are text, else they are not (JSON does
@@ -98,13 +99,13 @@
9899
**Response payload example: (CHANGED SIGNIFICANTLY ON 20120713)**
99100
100101
```json
101102
{
102103
"type":"file",
103
-"name":"same name specified as FILE_UUID argument",
104
+"name":"same name specified as FILE_HASH argument",
104105
"size": 12345, // in bytes, independent of format=...
105
-"parent": "uuid of parent file blob. Not set for first generation.",
106
+"parent": "hash of parent file blob. Not set for first generation.",
106107
"checkins":[{
107108
"name":"src/json_detail.h",
108109
"timestamp":1319058803,
109110
"comment":"...",
110111
"user":"stephan",
@@ -121,21 +122,21 @@
121122
}
122123
```
123124
124125
The "checkins" array lists all checkins which include this file, and a
125126
file might have different names across different branches. The size and
126
-uuid, however, are the same across all checkins for a given blob.
127
+hash, however, are the same across all checkins for a given blob.
127128
128129
<a id="wiki"></a>
129130
# Wiki Artifacts
130131
131132
Returns information about wiki artifacts.
132133
133134
**Status:** implemented 20111020, fixed to return the requested version
134135
(instead of the latest) on 20120302.
135136
136
-**Request:** `/json/artifact/WIKI_UUID`
137
+**Request:** `/json/artifact/WIKI_HASH`
137138
138139
**Required permissions:** "j"
139140
140141
**Options:**
141142
@@ -149,5 +150,6 @@
149150
150151
**Response payload example:**
151152
152153
Currently the same as [`/json/wiki/get`](api-wiki.md#get).
153154
155
+[uvh]: ../hashes.md#uvh
154156
--- www/json-api/api-artifact.md
+++ www/json-api/api-artifact.md
@@ -14,11 +14,11 @@
14
15 Returns information about checkin artifacts (commits).
16
17 **Status:** implemented 201110xx
18
19 **Request:** `/json/artifact/COMMIT_UUID`
20
21 **Required permissions:** "o" (was "h" prior to 20120408)
22
23 **Response payload example: (CHANGED SIGNIFICANTLY ON 20120713)**
24
@@ -30,43 +30,44 @@
30 "isLeaf":false,
31 "user":"drh",
32 "comment":"Merge wideAnnotateUser and jsonWarnings into trunk.",
33 "timestamp":1330090810,
34 "parents":[
35 // 1st entry is primary parent UUID:
36 "3a44f95f40a193739aaafc2409f155df43e74a6f",
37 // Remaining entries are merged-in branch UUIDs:
38 "86f6e675eb3f8761d70d8b82b052ce2b297fffd2",\
39 "dbf4ecf414881c9aad6f4f125dab9762589ef3d7"\
40 ],
41 "tags":["trunk"],
42 "files":[{
43 "name":"src/diff.c",
44 // BLOB uuids, NOT commit UUIDs:
45 "uuid":"78c74c3b37e266f8f7e570d5cf476854b7af9d76",
46 "parent":"b1fa7e636cf4e7b6ed20bba2d2680397f80c096a",
47 "state":"modified",
48 "downloadPath":"/raw/src/diff.c?name=78c74c3b37e266f8f7e570d5cf476854b7af9d76"
49 },
50 ...]
51 }
52 ```
53
54 The "parents" property lists the parent UUIDs of the checkin. The
55 "parent" property of file entries refers to the parent UUID of that
56 file. In the case of a merge there may be essentially an arbitrary
57 number. The first entry in the list is the "primary" parent. The primary
58 parent is the parent which was not pulled in via a merge operation. The
59 ordering of remaining entries is unspecified and may even change between
60 calls. For example: if, from branch C, we merge in A and B and then
61 commit, then in the artifact response for that commit the UUID of branch
62 C will be in the first (primary) position, with the UUIDs for branches A
63 and B in the following entries (in an unspecified, and possibly
64 unstable, order).
65
66 Note that the "uuid" and "parent" properties of the "files" entries
67 refer to raw blob uuids, not commit uuids (i.e. not checkins).
 
68
69 <a id="file"></a>
70 # File Artifacts
71
72 Fetches information about file artifacts.
@@ -77,11 +78,11 @@
77
78 **Status:** implemented 20111020
79
80 **Required permissions:** "o"
81
82 **Request:** `/json/artifact/FILE_UUID`
83
84 **Request options:**
85
86 - `format=(raw|html|none)` (default=none). If set, the contents of the
87 artifact are included if they are text, else they are not (JSON does
@@ -98,13 +99,13 @@
98 **Response payload example: (CHANGED SIGNIFICANTLY ON 20120713)**
99
100 ```json
101 {
102 "type":"file",
103 "name":"same name specified as FILE_UUID argument",
104 "size": 12345, // in bytes, independent of format=...
105 "parent": "uuid of parent file blob. Not set for first generation.",
106 "checkins":[{
107 "name":"src/json_detail.h",
108 "timestamp":1319058803,
109 "comment":"...",
110 "user":"stephan",
@@ -121,21 +122,21 @@
121 }
122 ```
123
124 The "checkins" array lists all checkins which include this file, and a
125 file might have different names across different branches. The size and
126 uuid, however, are the same across all checkins for a given blob.
127
128 <a id="wiki"></a>
129 # Wiki Artifacts
130
131 Returns information about wiki artifacts.
132
133 **Status:** implemented 20111020, fixed to return the requested version
134 (instead of the latest) on 20120302.
135
136 **Request:** `/json/artifact/WIKI_UUID`
137
138 **Required permissions:** "j"
139
140 **Options:**
141
@@ -149,5 +150,6 @@
149
150 **Response payload example:**
151
152 Currently the same as [`/json/wiki/get`](api-wiki.md#get).
153
 
154
--- www/json-api/api-artifact.md
+++ www/json-api/api-artifact.md
@@ -14,11 +14,11 @@
14
15 Returns information about checkin artifacts (commits).
16
17 **Status:** implemented 201110xx
18
19 **Request:** `/json/artifact/COMMIT_HASH`
20
21 **Required permissions:** "o" (was "h" prior to 20120408)
22
23 **Response payload example: (CHANGED SIGNIFICANTLY ON 20120713)**
24
@@ -30,43 +30,44 @@
30 "isLeaf":false,
31 "user":"drh",
32 "comment":"Merge wideAnnotateUser and jsonWarnings into trunk.",
33 "timestamp":1330090810,
34 "parents":[
35 // 1st entry is primary parent hash:
36 "3a44f95f40a193739aaafc2409f155df43e74a6f",
37 // Remaining entries are merged-in branch hashes:
38 "86f6e675eb3f8761d70d8b82b052ce2b297fffd2",\
39 "dbf4ecf414881c9aad6f4f125dab9762589ef3d7"\
40 ],
41 "tags":["trunk"],
42 "files":[{
43 "name":"src/diff.c",
44 // BLOB hashes, NOT commit hashes:
45 "uuid":"78c74c3b37e266f8f7e570d5cf476854b7af9d76",
46 "parent":"b1fa7e636cf4e7b6ed20bba2d2680397f80c096a",
47 "state":"modified",
48 "downloadPath":"/raw/src/diff.c?name=78c74c3b37e266f8f7e570d5cf476854b7af9d76"
49 },
50 ...]
51 }
52 ```
53
54 The "parents" property lists the parent hashes of the checkin. The
55 "parent" property of file entries refers to the parent hash of that
56 file. In the case of a merge there may be essentially an arbitrary
57 number. The first entry in the list is the "primary" parent. The primary
58 parent is the parent which was not pulled in via a merge operation. The
59 ordering of remaining entries is unspecified and may even change between
60 calls. For example: if, from branch C, we merge in A and B and then
61 commit, then in the artifact response for that commit the hash of branch
62 C will be in the first (primary) position, with the hashes for branches A
63 and B in the following entries (in an unspecified, and possibly
64 unstable, order).
65
66 Note that the "uuid" and "parent" properties of the "files" entries
67 refer to raw blob hashes, not commit (a.k.a. check-in) hashes. See also
68 [the UUID vs. Hash discussion][uvh].
69
70 <a id="file"></a>
71 # File Artifacts
72
73 Fetches information about file artifacts.
@@ -77,11 +78,11 @@
78
79 **Status:** implemented 20111020
80
81 **Required permissions:** "o"
82
83 **Request:** `/json/artifact/FILE_HASH`
84
85 **Request options:**
86
87 - `format=(raw|html|none)` (default=none). If set, the contents of the
88 artifact are included if they are text, else they are not (JSON does
@@ -98,13 +99,13 @@
99 **Response payload example: (CHANGED SIGNIFICANTLY ON 20120713)**
100
101 ```json
102 {
103 "type":"file",
104 "name":"same name specified as FILE_HASH argument",
105 "size": 12345, // in bytes, independent of format=...
106 "parent": "hash of parent file blob. Not set for first generation.",
107 "checkins":[{
108 "name":"src/json_detail.h",
109 "timestamp":1319058803,
110 "comment":"...",
111 "user":"stephan",
@@ -121,21 +122,21 @@
122 }
123 ```
124
125 The "checkins" array lists all checkins which include this file, and a
126 file might have different names across different branches. The size and
127 hash, however, are the same across all checkins for a given blob.
128
129 <a id="wiki"></a>
130 # Wiki Artifacts
131
132 Returns information about wiki artifacts.
133
134 **Status:** implemented 20111020, fixed to return the requested version
135 (instead of the latest) on 20120302.
136
137 **Request:** `/json/artifact/WIKI_HASH`
138
139 **Required permissions:** "j"
140
141 **Options:**
142
@@ -149,5 +150,6 @@
150
151 **Response payload example:**
152
153 Currently the same as [`/json/wiki/get`](api-wiki.md#get).
154
155 [uvh]: ../hashes.md#uvh
156
--- www/json-api/api-diff.md
+++ www/json-api/api-diff.md
@@ -33,12 +33,12 @@
3333
}
3434
```
3535
3636
TODOs:
3737
38
-- Unlike the standard diff command, which apparently requires commit
39
- UUID, this one diffs individual file versions. If a commit UUID is
38
+- Unlike the standard diff command, which apparently requires a commit
39
+ hash, this one diffs individual file versions. If a commit hash is
4040
provided, a diff of the manifests is returned. (That should be
4141
considered a bug - we should return a combined diff in that case.)
42
-- If UUIDs from two different types of artifacts are given, results
42
+- If hashes from two different types of artifacts are given, results
4343
are unspecified. Garbage in, garbage out, and all that.
4444
- For file diffs, add the file name(s) to the response payload.
4545
--- www/json-api/api-diff.md
+++ www/json-api/api-diff.md
@@ -33,12 +33,12 @@
33 }
34 ```
35
36 TODOs:
37
38 - Unlike the standard diff command, which apparently requires commit
39 UUID, this one diffs individual file versions. If a commit UUID is
40 provided, a diff of the manifests is returned. (That should be
41 considered a bug - we should return a combined diff in that case.)
42 - If UUIDs from two different types of artifacts are given, results
43 are unspecified. Garbage in, garbage out, and all that.
44 - For file diffs, add the file name(s) to the response payload.
45
--- www/json-api/api-diff.md
+++ www/json-api/api-diff.md
@@ -33,12 +33,12 @@
33 }
34 ```
35
36 TODOs:
37
38 - Unlike the standard diff command, which apparently requires a commit
39 hash, this one diffs individual file versions. If a commit hash is
40 provided, a diff of the manifests is returned. (That should be
41 considered a bug - we should return a combined diff in that case.)
42 - If hashes from two different types of artifacts are given, results
43 are unspecified. Garbage in, garbage out, and all that.
44 - For file diffs, add the file name(s) to the response payload.
45
--- www/json-api/api-tag.md
+++ www/json-api/api-tag.md
@@ -47,12 +47,12 @@
4747
"raw":false,
4848
"appliedTo":"626ab2f3743543122cc11bc082a0603d2b5b2b1b"
4949
}
5050
```
5151
52
-The appliedTo property is the UUID of the checkin to which the tag was
53
-applied. This is the "resolved" version of the checkin name provided by
52
+The `appliedTo` property is the hash of the check-in to which the tag was
53
+applied. This is the "resolved" version of the check-in name provided by
5454
the client.
5555
5656
<a id="cancel"></a>
5757
# Cancel Tag
5858
@@ -99,12 +99,13 @@
9999
- `limit=int` (defalt=0) Limits the number of results (0=no limit).
100100
Since they are ordered from oldest to newest, the newest N results
101101
will be returned.
102102
- `type=string` (default=`*`) Searches only for the given type of
103103
artifact (using fossil's conventional type naming: ci, e, t, w.
104
-- `raw=bool` (=false) If enabled, the response is an array of UUID
105
- strings, else it is an array of higher-level objects. If this is
104
+- `raw=bool` (=false) If enabled, the response is an array of hashes
105
+ of the requested artifact type; otherwise,
106
+ it is an array of higher-level objects. If this is
106107
true, the "name" property is interpretted as-is. If it is false, the
107108
name is automatically prepended with "sym-" (meaning a branch).
108109
(FIXME: the current semantics are confusing and hard to remember.
109110
Re-do them.)
110111
111112
--- www/json-api/api-tag.md
+++ www/json-api/api-tag.md
@@ -47,12 +47,12 @@
47 "raw":false,
48 "appliedTo":"626ab2f3743543122cc11bc082a0603d2b5b2b1b"
49 }
50 ```
51
52 The appliedTo property is the UUID of the checkin to which the tag was
53 applied. This is the "resolved" version of the checkin name provided by
54 the client.
55
56 <a id="cancel"></a>
57 # Cancel Tag
58
@@ -99,12 +99,13 @@
99 - `limit=int` (defalt=0) Limits the number of results (0=no limit).
100 Since they are ordered from oldest to newest, the newest N results
101 will be returned.
102 - `type=string` (default=`*`) Searches only for the given type of
103 artifact (using fossil's conventional type naming: ci, e, t, w.
104 - `raw=bool` (=false) If enabled, the response is an array of UUID
105 strings, else it is an array of higher-level objects. If this is
 
106 true, the "name" property is interpretted as-is. If it is false, the
107 name is automatically prepended with "sym-" (meaning a branch).
108 (FIXME: the current semantics are confusing and hard to remember.
109 Re-do them.)
110
111
--- www/json-api/api-tag.md
+++ www/json-api/api-tag.md
@@ -47,12 +47,12 @@
47 "raw":false,
48 "appliedTo":"626ab2f3743543122cc11bc082a0603d2b5b2b1b"
49 }
50 ```
51
52 The `appliedTo` property is the hash of the check-in to which the tag was
53 applied. This is the "resolved" version of the check-in name provided by
54 the client.
55
56 <a id="cancel"></a>
57 # Cancel Tag
58
@@ -99,12 +99,13 @@
99 - `limit=int` (defalt=0) Limits the number of results (0=no limit).
100 Since they are ordered from oldest to newest, the newest N results
101 will be returned.
102 - `type=string` (default=`*`) Searches only for the given type of
103 artifact (using fossil's conventional type naming: ci, e, t, w.
104 - `raw=bool` (=false) If enabled, the response is an array of hashes
105 of the requested artifact type; otherwise,
106 it is an array of higher-level objects. If this is
107 true, the "name" property is interpretted as-is. If it is false, the
108 name is automatically prepended with "sym-" (meaning a branch).
109 (FIXME: the current semantics are confusing and hard to remember.
110 Re-do them.)
111
112
--- www/json-api/api-timeline.md
+++ www/json-api/api-timeline.md
@@ -79,11 +79,11 @@
7979
"comment":"Added /json/timeline/ci showFiles to ajax test page.",
8080
"user":"stephan",
8181
"isLeaf":true,
8282
"bgColor":null, /* not quite sure why this is null? */
8383
"type":"ci",
84
- "parents": ["primary parent UUID", "...other parent UUIDs"],
84
+ "parents": ["primary parent hash", "...other parent hashes"],
8585
"tags":["json"],
8686
"files":[{
8787
"name":"ajax/index.html",
8888
"uuid":"9f00773a94cea6191dc3289aa24c0811b6d0d8fe",
8989
"parent":"50e337c33c27529e08a7037a8679fb84b976ad0b",
@@ -101,12 +101,12 @@
101101
102102
**Request options:**
103103
104104
- `files=bool` toggles the addition of a "files" array property which
105105
contains objects describing the files changed by the commit,
106
- including their uuid, previous uuid, and state change type
107
- (modified, added, or removed).\
106
+ including their hash, previous hash, and state change type
107
+ (modified, added, or removed). ([“uuid” here means hash][uvh])\
108108
CLI mode: `--show-files|-f`
109109
- `tag|branch=string` selects only entries with the given tag or "close
110110
to" the given branch. Only one of these may be specified and if both
111111
are specified, which one takes precedence is unspecified. If the
112112
given tag/branch does not exist, an error response is generated. The
@@ -172,15 +172,15 @@
172172
"ticketUuid":"b64435dba9cceb709bd54fbc5883884d73f93491"
173173
},...]
174174
}
175175
```
176176
177
-**Notice that there are two UUIDs for tickets** - `uuid` is the change
178
-UUID and `ticketUuid` is the actual ticket. This is an unfortunate
177
+**Notice that there are two [hashes][uvh] for tickets** - `uuid` is the change
178
+hash and `ticketUuid` is the actual ticket’s hash. This is an unfortunate
179179
discrepancy vis-a-vis the other timeline entries, which only have one
180
-uuid. We may want to swap uuid to mean the ticket uuid and change uuid
181
-to commitUuid.
180
+hash. We may want to swap `uuid` to mean the ticket hash and change `uuid`
181
+to `commitHash`.
182182
183183
<a id="wiki"></a>
184184
# Wiki Timeline
185185
186186
**Status:** implemented 201109xx
@@ -206,8 +206,9 @@
206206
},...]
207207
}
208208
```
209209
210210
The `uuid` of each entry can be passed to `/json/artifact` or
211
-`/json/wiki/get?uuid=...` to fetch the raw page and the uuid of the
211
+`/json/wiki/get?uuid=...` to fetch the raw page and the hash of the
212212
parent version.
213213
214
+[uvh]: ../hashes.md#uvh
214215
--- www/json-api/api-timeline.md
+++ www/json-api/api-timeline.md
@@ -79,11 +79,11 @@
79 "comment":"Added /json/timeline/ci showFiles to ajax test page.",
80 "user":"stephan",
81 "isLeaf":true,
82 "bgColor":null, /* not quite sure why this is null? */
83 "type":"ci",
84 "parents": ["primary parent UUID", "...other parent UUIDs"],
85 "tags":["json"],
86 "files":[{
87 "name":"ajax/index.html",
88 "uuid":"9f00773a94cea6191dc3289aa24c0811b6d0d8fe",
89 "parent":"50e337c33c27529e08a7037a8679fb84b976ad0b",
@@ -101,12 +101,12 @@
101
102 **Request options:**
103
104 - `files=bool` toggles the addition of a "files" array property which
105 contains objects describing the files changed by the commit,
106 including their uuid, previous uuid, and state change type
107 (modified, added, or removed).\
108 CLI mode: `--show-files|-f`
109 - `tag|branch=string` selects only entries with the given tag or "close
110 to" the given branch. Only one of these may be specified and if both
111 are specified, which one takes precedence is unspecified. If the
112 given tag/branch does not exist, an error response is generated. The
@@ -172,15 +172,15 @@
172 "ticketUuid":"b64435dba9cceb709bd54fbc5883884d73f93491"
173 },...]
174 }
175 ```
176
177 **Notice that there are two UUIDs for tickets** - `uuid` is the change
178 UUID and `ticketUuid` is the actual ticket. This is an unfortunate
179 discrepancy vis-a-vis the other timeline entries, which only have one
180 uuid. We may want to swap uuid to mean the ticket uuid and change uuid
181 to commitUuid.
182
183 <a id="wiki"></a>
184 # Wiki Timeline
185
186 **Status:** implemented 201109xx
@@ -206,8 +206,9 @@
206 },...]
207 }
208 ```
209
210 The `uuid` of each entry can be passed to `/json/artifact` or
211 `/json/wiki/get?uuid=...` to fetch the raw page and the uuid of the
212 parent version.
213
 
214
--- www/json-api/api-timeline.md
+++ www/json-api/api-timeline.md
@@ -79,11 +79,11 @@
79 "comment":"Added /json/timeline/ci showFiles to ajax test page.",
80 "user":"stephan",
81 "isLeaf":true,
82 "bgColor":null, /* not quite sure why this is null? */
83 "type":"ci",
84 "parents": ["primary parent hash", "...other parent hashes"],
85 "tags":["json"],
86 "files":[{
87 "name":"ajax/index.html",
88 "uuid":"9f00773a94cea6191dc3289aa24c0811b6d0d8fe",
89 "parent":"50e337c33c27529e08a7037a8679fb84b976ad0b",
@@ -101,12 +101,12 @@
101
102 **Request options:**
103
104 - `files=bool` toggles the addition of a "files" array property which
105 contains objects describing the files changed by the commit,
106 including their hash, previous hash, and state change type
107 (modified, added, or removed). ([“uuid” here means hash][uvh])\
108 CLI mode: `--show-files|-f`
109 - `tag|branch=string` selects only entries with the given tag or "close
110 to" the given branch. Only one of these may be specified and if both
111 are specified, which one takes precedence is unspecified. If the
112 given tag/branch does not exist, an error response is generated. The
@@ -172,15 +172,15 @@
172 "ticketUuid":"b64435dba9cceb709bd54fbc5883884d73f93491"
173 },...]
174 }
175 ```
176
177 **Notice that there are two [hashes][uvh] for tickets** - `uuid` is the change
178 hash and `ticketUuid` is the actual ticket’s hash. This is an unfortunate
179 discrepancy vis-a-vis the other timeline entries, which only have one
180 hash. We may want to swap `uuid` to mean the ticket hash and change `uuid`
181 to `commitHash`.
182
183 <a id="wiki"></a>
184 # Wiki Timeline
185
186 **Status:** implemented 201109xx
@@ -206,8 +206,9 @@
206 },...]
207 }
208 ```
209
210 The `uuid` of each entry can be passed to `/json/artifact` or
211 `/json/wiki/get?uuid=...` to fetch the raw page and the hash of the
212 parent version.
213
214 [uvh]: ../hashes.md#uvh
215
--- www/json-api/conventions.md
+++ www/json-api/conventions.md
@@ -584,11 +584,12 @@
584584
- `FOSSIL-3001`: Invalid argument/parameter type(s) or value(s) in
585585
request
586586
- `FOSSIL-3002`: Required argument(s)/parameter(s) missing from
587587
request
588588
- `FOSSIL-3003`: Requested resource identifier is ambiguous (e.g. a
589
- shortened UUID can be ambiguous).
589
+ shortened hash that matches multiple artifacts, an abbreviated
590
+ date that matches multiple commits, etc.)
590591
- `FOSSIL-3004`: Unresolved resource identifier. A branch/tag/uuid
591592
provided by client code could not be resolved. This is a special
592593
case of #3006.
593594
- `FOSSIL-3005`: Resource already exists and overwriting/replacing is
594595
not allowed. e.g. trying to create a wiki page or user which already
595596
--- www/json-api/conventions.md
+++ www/json-api/conventions.md
@@ -584,11 +584,12 @@
584 - `FOSSIL-3001`: Invalid argument/parameter type(s) or value(s) in
585 request
586 - `FOSSIL-3002`: Required argument(s)/parameter(s) missing from
587 request
588 - `FOSSIL-3003`: Requested resource identifier is ambiguous (e.g. a
589 shortened UUID can be ambiguous).
 
590 - `FOSSIL-3004`: Unresolved resource identifier. A branch/tag/uuid
591 provided by client code could not be resolved. This is a special
592 case of #3006.
593 - `FOSSIL-3005`: Resource already exists and overwriting/replacing is
594 not allowed. e.g. trying to create a wiki page or user which already
595
--- www/json-api/conventions.md
+++ www/json-api/conventions.md
@@ -584,11 +584,12 @@
584 - `FOSSIL-3001`: Invalid argument/parameter type(s) or value(s) in
585 request
586 - `FOSSIL-3002`: Required argument(s)/parameter(s) missing from
587 request
588 - `FOSSIL-3003`: Requested resource identifier is ambiguous (e.g. a
589 shortened hash that matches multiple artifacts, an abbreviated
590 date that matches multiple commits, etc.)
591 - `FOSSIL-3004`: Unresolved resource identifier. A branch/tag/uuid
592 provided by client code could not be resolved. This is a special
593 case of #3006.
594 - `FOSSIL-3005`: Resource already exists and overwriting/replacing is
595 not allowed. e.g. trying to create a wiki page or user which already
596

Keyboard Shortcuts

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