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)
Commit
8ad5e4690854a81a4666fa67a6b2d4b0790d0a6b488e87926649a11a7adee4d1
Parent
3d808c4d0c71b5e…
42 files changed
+1
-1
+1
-1
+19
-15
+4
-4
+4
-4
+4
-4
+1
-1
+6
-5
+6
-5
+1
-1
+8
-8
+8
-8
+10
-9
+29
-27
+29
-27
+1
-1
+1
-1
+1
-1
+1
-1
+1
-1
+1
-1
+18
-11
+1
-1
+1
-1
+6
-6
+1
-1
+1
-1
+3
-3
+5
-5
+1
-1
+7
-7
+1
-1
+1
-1
+1
-1
+79
-79
+1
-1
+2
-2
+16
-14
+3
-3
+5
-4
+9
-8
+2
-1
~
skins/blitz/ticket.txt
~
skins/blitz_no_logo/ticket.txt
~
src/attach.c
~
src/bundle.c
~
src/checkin.c
~
src/checkin.c
~
src/checkout.c
~
src/content.c
~
src/content.c
~
src/event.c
~
src/finfo.c
~
src/finfo.c
~
src/import.c
~
src/info.c
~
src/info.c
~
src/json_finfo.c
~
src/json_tag.c
~
src/main.c
~
src/main.c
~
src/manifest.c
~
src/manifest.c
~
src/name.c
~
src/printf.c
~
src/printf.c
~
src/purge.c
~
src/rebuild.c
~
src/report.c
~
src/rss.c
~
src/schema.c
~
src/tar.c
~
src/timeline.c
~
src/tktsetup.c
~
src/util.c
~
src/zip.c
~
test/amend.test
~
www/concepts.wiki
~
www/fiveminutes.wiki
~
www/json-api/api-artifact.md
~
www/json-api/api-diff.md
~
www/json-api/api-tag.md
~
www/json-api/api-timeline.md
~
www/json-api/conventions.md
+1
-1
| --- skins/blitz/ticket.txt | ||
| +++ skins/blitz/ticket.txt | ||
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <h4>$<title></h4> |
| 2 | 2 | <table class="tktDsp"> |
| 3 | -<tr><td class="tktDspLabel">Ticket UUID</td> | |
| 3 | +<tr><td class="tktDspLabel">Ticket Hash</td> | |
| 4 | 4 | <th1> |
| 5 | 5 | if {[info exists tkt_uuid]} { |
| 6 | 6 | if {[hascap s]} { |
| 7 | 7 | html "<td class='tktDspValue' colspan='3'>$tkt_uuid " |
| 8 | 8 | html "($tkt_id)</td></tr>\n" |
| 9 | 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 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 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 |
+1
-1
| --- skins/blitz_no_logo/ticket.txt | ||
| +++ skins/blitz_no_logo/ticket.txt | ||
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <h4>$<title></h4> |
| 2 | 2 | <table class="tktDsp"> |
| 3 | -<tr><td class="tktDspLabel">Ticket UUID</td> | |
| 3 | +<tr><td class="tktDspLabel">Ticket Hash</td> | |
| 4 | 4 | <th1> |
| 5 | 5 | if {[info exists tkt_uuid]} { |
| 6 | 6 | if {[hascap s]} { |
| 7 | 7 | html "<td class='tktDspValue' colspan='3'>$tkt_uuid " |
| 8 | 8 | html "($tkt_id)</td></tr>\n" |
| 9 | 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 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 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 @@ | ||
| 23 | 23 | |
| 24 | 24 | /* |
| 25 | 25 | ** WEBPAGE: attachlist |
| 26 | 26 | ** List attachments. |
| 27 | 27 | ** |
| 28 | -** tkt=TICKETUUID | |
| 28 | +** tkt=HASH | |
| 29 | 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. | |
| 30 | 36 | ** |
| 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. | |
| 37 | 40 | */ |
| 38 | 41 | void attachlist_page(void){ |
| 39 | 42 | const char *zPage = P("page"); |
| 40 | 43 | const char *zTkt = P("tkt"); |
| 41 | 44 | const char *zTechNote = P("technote"); |
| @@ -152,15 +155,16 @@ | ||
| 152 | 155 | ** WEBPAGE: attachdownload |
| 153 | 156 | ** WEBPAGE: attachimage |
| 154 | 157 | ** WEBPAGE: attachview |
| 155 | 158 | ** |
| 156 | 159 | ** Download or display an attachment. |
| 160 | +** | |
| 157 | 161 | ** Query parameters: |
| 158 | 162 | ** |
| 159 | -** tkt=TICKETUUID | |
| 163 | +** tkt=HASH | |
| 160 | 164 | ** page=WIKIPAGE |
| 161 | -** technote=TECHNOTEUUID | |
| 165 | +** technote=HASH | |
| 162 | 166 | ** file=FILENAME |
| 163 | 167 | ** attachid=ID |
| 164 | 168 | ** |
| 165 | 169 | */ |
| 166 | 170 | void attachview_page(void){ |
| @@ -250,11 +254,11 @@ | ||
| 250 | 254 | /* |
| 251 | 255 | ** Commit a new attachment into the repository |
| 252 | 256 | */ |
| 253 | 257 | void attach_commit( |
| 254 | 258 | 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 */ | |
| 256 | 260 | const char *aContent, /* The content of the attachment */ |
| 257 | 261 | int szContent, /* The length of the attachment */ |
| 258 | 262 | int needModerator, /* Moderate the attachment? */ |
| 259 | 263 | const char *zComment /* The comment for the attachment */ |
| 260 | 264 | ){ |
| @@ -305,13 +309,13 @@ | ||
| 305 | 309 | |
| 306 | 310 | /* |
| 307 | 311 | ** WEBPAGE: attachadd |
| 308 | 312 | ** Add a new attachment. |
| 309 | 313 | ** |
| 310 | -** tkt=TICKETUUID | |
| 314 | +** tkt=HASH | |
| 311 | 315 | ** page=WIKIPAGE |
| 312 | -** technote=TECHNOTEUUID | |
| 316 | +** technote=HASH | |
| 313 | 317 | ** from=URL |
| 314 | 318 | ** |
| 315 | 319 | */ |
| 316 | 320 | void attachadd_page(void){ |
| 317 | 321 | const char *zPage = P("page"); |
| @@ -420,14 +424,14 @@ | ||
| 420 | 424 | */ |
| 421 | 425 | void ainfo_page(void){ |
| 422 | 426 | int rid; /* RID for the control artifact */ |
| 423 | 427 | int ridSrc; /* RID for the attached file */ |
| 424 | 428 | char *zDate; /* Date attached */ |
| 425 | - const char *zUuid; /* UUID of the control artifact */ | |
| 429 | + const char *zUuid; /* Hash of the control artifact */ | |
| 426 | 430 | Manifest *pAttach; /* Parse of the control artifact */ |
| 427 | 431 | 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 */ | |
| 429 | 433 | const char *zName; /* Name of the attached file */ |
| 430 | 434 | const char *zDesc; /* Description of the attached file */ |
| 431 | 435 | const char *zWikiName = 0; /* Wiki page name when attached to Wiki */ |
| 432 | 436 | const char *zTNUuid = 0; /* Tech Note ID when attached to tech note */ |
| 433 | 437 | const char *zTktUuid = 0; /* Ticket ID when attached to a ticket */ |
| @@ -763,11 +767,11 @@ | ||
| 763 | 767 | } |
| 764 | 768 | blob_read_from_file(&content, zFile, ExtFILE); |
| 765 | 769 | user_select(); |
| 766 | 770 | attach_commit( |
| 767 | 771 | zFile, /* The filename of the attachment */ |
| 768 | - zTarget, /* The artifact uuid to attach to */ | |
| 772 | + zTarget, /* The artifact hash to attach to */ | |
| 769 | 773 | blob_buffer(&content), /* The content of the attachment */ |
| 770 | 774 | blob_size(&content), /* The length of the attachment */ |
| 771 | 775 | 0, /* No need to moderate the attachment */ |
| 772 | 776 | "" /* Empty attachment comment */ |
| 773 | 777 | ); |
| 774 | 778 |
| --- 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 @@ | ||
| 530 | 530 | blob_reset(&h1); |
| 531 | 531 | bag_remove(&busy, blobid); |
| 532 | 532 | db_finalize(&q); |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | -/* fossil bundle cat BUNDLE UUID... | |
| 535 | +/* fossil bundle cat BUNDLE HASH... | |
| 536 | 536 | ** |
| 537 | 537 | ** Write elements of a bundle on standard output |
| 538 | 538 | */ |
| 539 | 539 | static void bundle_cat_cmd(void){ |
| 540 | 540 | int i; |
| 541 | 541 | Blob x; |
| 542 | 542 | verify_all_options(); |
| 543 | - if( g.argc<5 ) usage("cat BUNDLE UUID..."); | |
| 543 | + if( g.argc<5 ) usage("cat BUNDLE HASH..."); | |
| 544 | 544 | bundle_attach_file(g.argv[3], "b1", 1); |
| 545 | 545 | blob_zero(&x); |
| 546 | 546 | for(i=4; i<g.argc; i++){ |
| 547 | 547 | int blobid = db_int(0,"SELECT blobid FROM bblob WHERE uuid LIKE '%q%%'", |
| 548 | 548 | g.argv[i]); |
| @@ -725,11 +725,11 @@ | ||
| 725 | 725 | ** fossil bundle append BUNDLE FILE... |
| 726 | 726 | ** |
| 727 | 727 | ** Add files named on the command line to BUNDLE. This subcommand has |
| 728 | 728 | ** little practical use and is mostly intended for testing. |
| 729 | 729 | ** |
| 730 | -** fossil bundle cat BUNDLE UUID... | |
| 730 | +** fossil bundle cat BUNDLE HASH... | |
| 731 | 731 | ** |
| 732 | 732 | ** Extract one or more artifacts from the bundle and write them |
| 733 | 733 | ** consecutively on standard output. This subcommand was designed |
| 734 | 734 | ** for testing and introspection of bundles and is not something |
| 735 | 735 | ** commonly used. |
| @@ -770,11 +770,11 @@ | ||
| 770 | 770 | ** by check-ins in BUNDLE. This has the effect of undoing a |
| 771 | 771 | ** "fossil bundle import". |
| 772 | 772 | ** |
| 773 | 773 | ** SUMMARY: |
| 774 | 774 | ** 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 | |
| 776 | 776 | ** fossil bundle export BUNDLE ?OPTIONS? Create a new BUNDLE |
| 777 | 777 | ** --branch BRANCH --from TAG1 --to TAG2 Check-ins to include |
| 778 | 778 | ** --checkin TAG Use only check-in TAG |
| 779 | 779 | ** --standalone Omit dependencies |
| 780 | 780 | ** fossil bundle extend BUNDLE Update with newer content |
| 781 | 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 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 @@ | ||
| 1424 | 1424 | ** Make sure the current check-in with timestamp zDate is younger than its |
| 1425 | 1425 | ** ancestor identified rid and zUuid. Throw a fatal error if not. |
| 1426 | 1426 | */ |
| 1427 | 1427 | static void checkin_verify_younger( |
| 1428 | 1428 | 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 */ | |
| 1430 | 1430 | const char *zDate /* Date & time of the current check-in */ |
| 1431 | 1431 | ){ |
| 1432 | 1432 | #ifndef FOSSIL_ALLOW_OUT_OF_ORDER_DATES |
| 1433 | 1433 | if(checkin_is_younger(rid,zDate)==0){ |
| 1434 | 1434 | fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)" |
| @@ -1500,18 +1500,18 @@ | ||
| 1500 | 1500 | /* |
| 1501 | 1501 | ** Create a manifest. |
| 1502 | 1502 | */ |
| 1503 | 1503 | static void create_manifest( |
| 1504 | 1504 | Blob *pOut, /* Write the manifest here */ |
| 1505 | - const char *zBaselineUuid, /* UUID of baseline, or zero */ | |
| 1505 | + const char *zBaselineUuid, /* Hash of baseline, or zero */ | |
| 1506 | 1506 | Manifest *pBaseline, /* Make it a delta manifest if not zero */ |
| 1507 | 1507 | int vid, /* BLOB.id for the parent check-in */ |
| 1508 | 1508 | CheckinInfo *p, /* Information about the check-in */ |
| 1509 | 1509 | int *pnFBcard /* OUT: Number of generated B- and F-cards */ |
| 1510 | 1510 | ){ |
| 1511 | 1511 | 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 */ | |
| 1513 | 1513 | Blob filename; /* A single filename */ |
| 1514 | 1514 | int nBasename; /* Size of base filename */ |
| 1515 | 1515 | Stmt q; /* Various queries */ |
| 1516 | 1516 | Blob mcksum; /* Manifest checksum */ |
| 1517 | 1517 | ManifestFile *pFile; /* File from the baseline */ |
| @@ -2058,11 +2058,11 @@ | ||
| 2058 | 2058 | int nrid; /* blob-id of a modified file */ |
| 2059 | 2059 | int nvid; /* Blob-id of the new check-in */ |
| 2060 | 2060 | Blob comment; /* Check-in comment */ |
| 2061 | 2061 | const char *zComment; /* Check-in comment */ |
| 2062 | 2062 | Stmt q; /* Various queries */ |
| 2063 | - char *zUuid; /* UUID of the new check-in */ | |
| 2063 | + char *zUuid; /* Hash of the new check-in */ | |
| 2064 | 2064 | int useHash = 0; /* True to verify file status using hashing */ |
| 2065 | 2065 | int noSign = 0; /* True to omit signing the manifest using GPG */ |
| 2066 | 2066 | int privateFlag = 0; /* True if the --private option is present */ |
| 2067 | 2067 | int privateParent = 0; /* True if the parent check-in is private */ |
| 2068 | 2068 | int isAMerge = 0; /* True if checking in a merge */ |
| 2069 | 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 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 @@ | ||
| 1424 | 1424 | ** Make sure the current check-in with timestamp zDate is younger than its |
| 1425 | 1425 | ** ancestor identified rid and zUuid. Throw a fatal error if not. |
| 1426 | 1426 | */ |
| 1427 | 1427 | static void checkin_verify_younger( |
| 1428 | 1428 | 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 */ | |
| 1430 | 1430 | const char *zDate /* Date & time of the current check-in */ |
| 1431 | 1431 | ){ |
| 1432 | 1432 | #ifndef FOSSIL_ALLOW_OUT_OF_ORDER_DATES |
| 1433 | 1433 | if(checkin_is_younger(rid,zDate)==0){ |
| 1434 | 1434 | fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)" |
| @@ -1500,18 +1500,18 @@ | ||
| 1500 | 1500 | /* |
| 1501 | 1501 | ** Create a manifest. |
| 1502 | 1502 | */ |
| 1503 | 1503 | static void create_manifest( |
| 1504 | 1504 | Blob *pOut, /* Write the manifest here */ |
| 1505 | - const char *zBaselineUuid, /* UUID of baseline, or zero */ | |
| 1505 | + const char *zBaselineUuid, /* Hash of baseline, or zero */ | |
| 1506 | 1506 | Manifest *pBaseline, /* Make it a delta manifest if not zero */ |
| 1507 | 1507 | int vid, /* BLOB.id for the parent check-in */ |
| 1508 | 1508 | CheckinInfo *p, /* Information about the check-in */ |
| 1509 | 1509 | int *pnFBcard /* OUT: Number of generated B- and F-cards */ |
| 1510 | 1510 | ){ |
| 1511 | 1511 | 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 */ | |
| 1513 | 1513 | Blob filename; /* A single filename */ |
| 1514 | 1514 | int nBasename; /* Size of base filename */ |
| 1515 | 1515 | Stmt q; /* Various queries */ |
| 1516 | 1516 | Blob mcksum; /* Manifest checksum */ |
| 1517 | 1517 | ManifestFile *pFile; /* File from the baseline */ |
| @@ -2058,11 +2058,11 @@ | ||
| 2058 | 2058 | int nrid; /* blob-id of a modified file */ |
| 2059 | 2059 | int nvid; /* Blob-id of the new check-in */ |
| 2060 | 2060 | Blob comment; /* Check-in comment */ |
| 2061 | 2061 | const char *zComment; /* Check-in comment */ |
| 2062 | 2062 | Stmt q; /* Various queries */ |
| 2063 | - char *zUuid; /* UUID of the new check-in */ | |
| 2063 | + char *zUuid; /* Hash of the new check-in */ | |
| 2064 | 2064 | int useHash = 0; /* True to verify file status using hashing */ |
| 2065 | 2065 | int noSign = 0; /* True to omit signing the manifest using GPG */ |
| 2066 | 2066 | int privateFlag = 0; /* True if the --private option is present */ |
| 2067 | 2067 | int privateParent = 0; /* True if the parent check-in is private */ |
| 2068 | 2068 | int isAMerge = 0; /* True if checking in a merge */ |
| 2069 | 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 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 @@ | ||
| 87 | 87 | db_multi_exec("DELETE FROM vfile WHERE vid=%d", vid); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | |
| 91 | 91 | /* |
| 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 | |
| 93 | 93 | ** version in the VFILE table. Return the VID for the version. |
| 94 | 94 | ** |
| 95 | 95 | ** If anything goes wrong, panic. |
| 96 | 96 | */ |
| 97 | 97 | int load_vfile(const char *zName, int forceMissingFlag){ |
| 98 | 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 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 @@ | ||
| 564 | 564 | db_finalize(&s1); |
| 565 | 565 | db_end_transaction(0); |
| 566 | 566 | return rid; |
| 567 | 567 | } |
| 568 | 568 | }else{ |
| 569 | - rid = 0; /* No entry with the same UUID currently exists */ | |
| 569 | + rid = 0; /* No entry with the same hash currently exists */ | |
| 570 | 570 | markAsUnclustered = 1; |
| 571 | 571 | } |
| 572 | 572 | db_finalize(&s1); |
| 573 | 573 | |
| 574 | 574 | /* Construct a received-from ID if we do not already have one */ |
| @@ -659,11 +659,11 @@ | ||
| 659 | 659 | return content_put_ex(pBlob, 0, 0, 0, 0); |
| 660 | 660 | } |
| 661 | 661 | |
| 662 | 662 | |
| 663 | 663 | /* |
| 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. | |
| 665 | 665 | */ |
| 666 | 666 | int content_new(const char *zUuid, int isPrivate){ |
| 667 | 667 | int rid; |
| 668 | 668 | static Stmt s1, s2, s3; |
| 669 | 669 | |
| @@ -1110,15 +1110,16 @@ | ||
| 1110 | 1110 | /* Allowed flags for check_exists */ |
| 1111 | 1111 | #define MISSING_SHUNNED 0x0001 /* Do not report shunned artifacts */ |
| 1112 | 1112 | |
| 1113 | 1113 | /* This is a helper routine for test-artifacts. |
| 1114 | 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. | |
| 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. | |
| 1117 | 1118 | */ |
| 1118 | 1119 | 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 */ | |
| 1120 | 1121 | unsigned flags, /* Flags */ |
| 1121 | 1122 | Manifest *p, /* The control artifact that references zUuid */ |
| 1122 | 1123 | const char *zRole, /* Role of zUuid in p */ |
| 1123 | 1124 | const char *zDetail /* Additional information, such as a filename */ |
| 1124 | 1125 | ){ |
| 1125 | 1126 |
| --- 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 @@ | ||
| 564 | 564 | db_finalize(&s1); |
| 565 | 565 | db_end_transaction(0); |
| 566 | 566 | return rid; |
| 567 | 567 | } |
| 568 | 568 | }else{ |
| 569 | - rid = 0; /* No entry with the same UUID currently exists */ | |
| 569 | + rid = 0; /* No entry with the same hash currently exists */ | |
| 570 | 570 | markAsUnclustered = 1; |
| 571 | 571 | } |
| 572 | 572 | db_finalize(&s1); |
| 573 | 573 | |
| 574 | 574 | /* Construct a received-from ID if we do not already have one */ |
| @@ -659,11 +659,11 @@ | ||
| 659 | 659 | return content_put_ex(pBlob, 0, 0, 0, 0); |
| 660 | 660 | } |
| 661 | 661 | |
| 662 | 662 | |
| 663 | 663 | /* |
| 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. | |
| 665 | 665 | */ |
| 666 | 666 | int content_new(const char *zUuid, int isPrivate){ |
| 667 | 667 | int rid; |
| 668 | 668 | static Stmt s1, s2, s3; |
| 669 | 669 | |
| @@ -1110,15 +1110,16 @@ | ||
| 1110 | 1110 | /* Allowed flags for check_exists */ |
| 1111 | 1111 | #define MISSING_SHUNNED 0x0001 /* Do not report shunned artifacts */ |
| 1112 | 1112 | |
| 1113 | 1113 | /* This is a helper routine for test-artifacts. |
| 1114 | 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. | |
| 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. | |
| 1117 | 1118 | */ |
| 1118 | 1119 | 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 */ | |
| 1120 | 1121 | unsigned flags, /* Flags */ |
| 1121 | 1122 | Manifest *p, /* The control artifact that references zUuid */ |
| 1122 | 1123 | const char *zRole, /* Role of zUuid in p */ |
| 1123 | 1124 | const char *zDetail /* Additional information, such as a filename */ |
| 1124 | 1125 | ){ |
| 1125 | 1126 |
| --- 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 @@ | ||
| 63 | 63 | ** Display an existing tech-note identified by its ID, optionally at a |
| 64 | 64 | ** specific version, and optionally with additional details. |
| 65 | 65 | */ |
| 66 | 66 | void event_page(void){ |
| 67 | 67 | int rid = 0; /* rid of the event artifact */ |
| 68 | - char *zUuid; /* UUID corresponding to rid */ | |
| 68 | + char *zUuid; /* artifact hash corresponding to rid */ | |
| 69 | 69 | const char *zId; /* Event identifier */ |
| 70 | 70 | const char *zVerbose; /* Value of verbose option */ |
| 71 | 71 | char *zETime; /* Time of the tech-note */ |
| 72 | 72 | char *zATime; /* Time the artifact was created */ |
| 73 | 73 | int specRid; /* rid specified by aid= parameter */ |
| 74 | 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; /* 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 @@ | ||
| 284 | 284 | ** b=DATETIME Only show changes before DATETIME |
| 285 | 285 | ** m=HASH Mark this particular file version |
| 286 | 286 | ** n=NUM Show the first NUM changes only |
| 287 | 287 | ** brbg Background color by branch name |
| 288 | 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 | |
| 289 | +** ci=HASH Ancestors of a particular check-in | |
| 290 | +** orig=HASH If both ci and orig are supplied, only show those | |
| 291 | 291 | ** changes on a direct path from orig to ci. |
| 292 | 292 | ** showid Show RID values for debugging |
| 293 | 293 | ** |
| 294 | 294 | ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in |
| 295 | 295 | ** year-month-day form, it may be truncated, and it may also name a |
| @@ -371,13 +371,13 @@ | ||
| 371 | 371 | " datetime(min(event.mtime),toLocal())," /* Date of change */ |
| 372 | 372 | " coalesce(event.ecomment, event.comment)," /* Check-in comment */ |
| 373 | 373 | " coalesce(event.euser, event.user)," /* User who made chng */ |
| 374 | 374 | " mlink.pid," /* Parent file rid */ |
| 375 | 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 */ | |
| 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 | 379 | " event.bgcolor," /* Background color */ |
| 380 | 380 | " (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0" |
| 381 | 381 | " AND tagxref.rid=mlink.mid)," /* Branchname */ |
| 382 | 382 | " mlink.mid," /* check-in ID */ |
| 383 | 383 | " mlink.pfnid," /* Previous filename */ |
| @@ -541,13 +541,13 @@ | ||
| 541 | 541 | if( tmFlags & TIMELINE_COMPACT ){ |
| 542 | 542 | @ <span class='timelineCompactComment' data-id='%d(frid)'> |
| 543 | 543 | }else{ |
| 544 | 544 | @ <span class='timeline%s(zStyle)Comment'> |
| 545 | 545 | if( (tmFlags & TIMELINE_VERBOSE)!=0 && zUuid ){ |
| 546 | - hyperlink_to_uuid(zUuid); | |
| 546 | + hyperlink_to_version(zUuid); | |
| 547 | 547 | @ part of check-in \ |
| 548 | - hyperlink_to_uuid(zCkin); | |
| 548 | + hyperlink_to_version(zCkin); | |
| 549 | 549 | } |
| 550 | 550 | } |
| 551 | 551 | @ %W(zCom)</span> |
| 552 | 552 | if( (tmFlags & TIMELINE_COMPACT)!=0 ){ |
| 553 | 553 | @ <span class='timelineEllipsis' data-id='%d(frid)' \ |
| @@ -576,11 +576,11 @@ | ||
| 576 | 576 | @ id: %d(frid) |
| 577 | 577 | } |
| 578 | 578 | } |
| 579 | 579 | } |
| 580 | 580 | @ check-in: \ |
| 581 | - hyperlink_to_uuid(zCkin); | |
| 581 | + hyperlink_to_version(zCkin); | |
| 582 | 582 | if( fShowId ){ |
| 583 | 583 | @ (%d(fmid)) |
| 584 | 584 | } |
| 585 | 585 | @ user: \ |
| 586 | 586 | hyperlink_to_user(zUser, zDate, ","); |
| 587 | 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=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: %d(frid) |
| 577 | } |
| 578 | } |
| 579 | } |
| 580 | @ check-in: \ |
| 581 | hyperlink_to_uuid(zCkin); |
| 582 | if( fShowId ){ |
| 583 | @ (%d(fmid)) |
| 584 | } |
| 585 | @ user: \ |
| 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: %d(frid) |
| 577 | } |
| 578 | } |
| 579 | } |
| 580 | @ check-in: \ |
| 581 | hyperlink_to_version(zCkin); |
| 582 | if( fShowId ){ |
| 583 | @ (%d(fmid)) |
| 584 | } |
| 585 | @ user: \ |
| 586 | hyperlink_to_user(zUser, zDate, ","); |
| 587 |
+8
-8
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -284,12 +284,12 @@ | ||
| 284 | 284 | ** b=DATETIME Only show changes before DATETIME |
| 285 | 285 | ** m=HASH Mark this particular file version |
| 286 | 286 | ** n=NUM Show the first NUM changes only |
| 287 | 287 | ** brbg Background color by branch name |
| 288 | 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 | |
| 289 | +** ci=HASH Ancestors of a particular check-in | |
| 290 | +** orig=HASH If both ci and orig are supplied, only show those | |
| 291 | 291 | ** changes on a direct path from orig to ci. |
| 292 | 292 | ** showid Show RID values for debugging |
| 293 | 293 | ** |
| 294 | 294 | ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in |
| 295 | 295 | ** year-month-day form, it may be truncated, and it may also name a |
| @@ -371,13 +371,13 @@ | ||
| 371 | 371 | " datetime(min(event.mtime),toLocal())," /* Date of change */ |
| 372 | 372 | " coalesce(event.ecomment, event.comment)," /* Check-in comment */ |
| 373 | 373 | " coalesce(event.euser, event.user)," /* User who made chng */ |
| 374 | 374 | " mlink.pid," /* Parent file rid */ |
| 375 | 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 */ | |
| 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 | 379 | " event.bgcolor," /* Background color */ |
| 380 | 380 | " (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0" |
| 381 | 381 | " AND tagxref.rid=mlink.mid)," /* Branchname */ |
| 382 | 382 | " mlink.mid," /* check-in ID */ |
| 383 | 383 | " mlink.pfnid," /* Previous filename */ |
| @@ -541,13 +541,13 @@ | ||
| 541 | 541 | if( tmFlags & TIMELINE_COMPACT ){ |
| 542 | 542 | @ <span class='timelineCompactComment' data-id='%d(frid)'> |
| 543 | 543 | }else{ |
| 544 | 544 | @ <span class='timeline%s(zStyle)Comment'> |
| 545 | 545 | if( (tmFlags & TIMELINE_VERBOSE)!=0 && zUuid ){ |
| 546 | - hyperlink_to_uuid(zUuid); | |
| 546 | + hyperlink_to_version(zUuid); | |
| 547 | 547 | @ part of check-in \ |
| 548 | - hyperlink_to_uuid(zCkin); | |
| 548 | + hyperlink_to_version(zCkin); | |
| 549 | 549 | } |
| 550 | 550 | } |
| 551 | 551 | @ %W(zCom)</span> |
| 552 | 552 | if( (tmFlags & TIMELINE_COMPACT)!=0 ){ |
| 553 | 553 | @ <span class='timelineEllipsis' data-id='%d(frid)' \ |
| @@ -576,11 +576,11 @@ | ||
| 576 | 576 | @ id: %d(frid) |
| 577 | 577 | } |
| 578 | 578 | } |
| 579 | 579 | } |
| 580 | 580 | @ check-in: \ |
| 581 | - hyperlink_to_uuid(zCkin); | |
| 581 | + hyperlink_to_version(zCkin); | |
| 582 | 582 | if( fShowId ){ |
| 583 | 583 | @ (%d(fmid)) |
| 584 | 584 | } |
| 585 | 585 | @ user: \ |
| 586 | 586 | hyperlink_to_user(zUser, zDate, ","); |
| 587 | 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=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: %d(frid) |
| 577 | } |
| 578 | } |
| 579 | } |
| 580 | @ check-in: \ |
| 581 | hyperlink_to_uuid(zCkin); |
| 582 | if( fShowId ){ |
| 583 | @ (%d(fmid)) |
| 584 | } |
| 585 | @ user: \ |
| 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: %d(frid) |
| 577 | } |
| 578 | } |
| 579 | } |
| 580 | @ check-in: \ |
| 581 | hyperlink_to_version(zCkin); |
| 582 | if( fShowId ){ |
| 583 | @ (%d(fmid)) |
| 584 | } |
| 585 | @ user: \ |
| 586 | hyperlink_to_user(zUser, zDate, ","); |
| 587 |
+10
-9
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -26,11 +26,11 @@ | ||
| 26 | 26 | /* |
| 27 | 27 | ** A single file change record. |
| 28 | 28 | */ |
| 29 | 29 | struct ImportFile { |
| 30 | 30 | char *zName; /* Name of a file */ |
| 31 | - char *zUuid; /* UUID of the file */ | |
| 31 | + char *zUuid; /* Hash of the file */ | |
| 32 | 32 | char *zPrior; /* Prior name if the name was changed */ |
| 33 | 33 | char isFrom; /* True if obtained from the parent */ |
| 34 | 34 | char isExe; /* True if executable */ |
| 35 | 35 | char isLink; /* True if symlink */ |
| 36 | 36 | }; |
| @@ -59,11 +59,11 @@ | ||
| 59 | 59 | char *aData; /* Data content */ |
| 60 | 60 | char *zMark; /* The current mark */ |
| 61 | 61 | char *zDate; /* Date/time stamp */ |
| 62 | 62 | char *zUser; /* User name */ |
| 63 | 63 | char *zComment; /* Comment of a commit */ |
| 64 | - char *zFrom; /* from value as a UUID */ | |
| 64 | + char *zFrom; /* from value as a hash */ | |
| 65 | 65 | char *zPrevCheckin; /* Name of the previous check-in */ |
| 66 | 66 | char *zFromMark; /* The mark of the "from" field */ |
| 67 | 67 | int nMerge; /* Number of merge values */ |
| 68 | 68 | int nMergeAlloc; /* Number of slots in azMerge[] */ |
| 69 | 69 | char **azMerge; /* Merge values */ |
| @@ -143,17 +143,17 @@ | ||
| 143 | 143 | /* |
| 144 | 144 | ** Insert an artifact into the BLOB table if it isn't there already. |
| 145 | 145 | ** If zMark is not zero, create a cross-reference from that mark back |
| 146 | 146 | ** to the newly inserted artifact. |
| 147 | 147 | ** |
| 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. | |
| 150 | 150 | */ |
| 151 | 151 | static int fast_insert_content( |
| 152 | 152 | Blob *pContent, /* Content to insert */ |
| 153 | 153 | 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 */ | |
| 155 | 155 | int doParse /* Invoke manifest_crosslink() */ |
| 156 | 156 | ){ |
| 157 | 157 | Blob hash; |
| 158 | 158 | Blob cmpr; |
| 159 | 159 | int rid; |
| @@ -187,11 +187,11 @@ | ||
| 187 | 187 | "INSERT OR IGNORE INTO xmark(tname, trid, tuuid)" |
| 188 | 188 | "VALUES(%B,%d,%B)", |
| 189 | 189 | &hash, rid, &hash |
| 190 | 190 | ); |
| 191 | 191 | } |
| 192 | - if( saveUuid ){ | |
| 192 | + if( saveHash ){ | |
| 193 | 193 | fossil_free(gg.zPrevCheckin); |
| 194 | 194 | gg.zPrevCheckin = fossil_strdup(blob_str(&hash)); |
| 195 | 195 | } |
| 196 | 196 | blob_reset(&hash); |
| 197 | 197 | return rid; |
| @@ -411,11 +411,11 @@ | ||
| 411 | 411 | } |
| 412 | 412 | return z; |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | /* |
| 416 | -** Convert a "mark" or "committish" into the UUID. | |
| 416 | +** Convert a "mark" or "committish" into the artifact hash. | |
| 417 | 417 | */ |
| 418 | 418 | static char *resolve_committish(const char *zCommittish){ |
| 419 | 419 | char *zRes; |
| 420 | 420 | |
| 421 | 421 | zRes = db_text(0, "SELECT tuuid FROM xmark WHERE tname=%Q", zCommittish); |
| @@ -1828,13 +1828,14 @@ | ||
| 1828 | 1828 | bag_init(&vers); |
| 1829 | 1829 | /* The following temp-tables are used to hold information needed for |
| 1830 | 1830 | ** the import. |
| 1831 | 1831 | ** |
| 1832 | 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). | |
| 1833 | + ** into artifact hashes. | |
| 1834 | + ** | |
| 1834 | 1835 | ** 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. | |
| 1836 | 1837 | ** |
| 1837 | 1838 | ** The XBRANCH table maps commit marks and symbols into the branch those |
| 1838 | 1839 | ** commits belong to. If xbranch.tname is a fast-import symbol for a |
| 1839 | 1840 | ** check-in then xbranch.brnm is the branch that check-in is part of. |
| 1840 | 1841 | ** |
| 1841 | 1842 |
| --- 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 @@ | ||
| 44 | 44 | |
| 45 | 45 | |
| 46 | 46 | /* |
| 47 | 47 | ** Print common information about a particular record. |
| 48 | 48 | ** |
| 49 | -** * The UUID | |
| 49 | +** * The artifact hash | |
| 50 | 50 | ** * The record ID |
| 51 | 51 | ** * mtime and ctime |
| 52 | 52 | ** * who signed it |
| 53 | 53 | ** |
| 54 | 54 | */ |
| 55 | 55 | void show_common_info( |
| 56 | 56 | 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:" */ | |
| 58 | 58 | int showComment, /* True to show the check-in comment */ |
| 59 | 59 | int showFamily /* True to show parents and children */ |
| 60 | 60 | ){ |
| 61 | 61 | Stmt q; |
| 62 | 62 | char *zComment = 0; |
| @@ -68,11 +68,11 @@ | ||
| 68 | 68 | zDate = db_text(0, |
| 69 | 69 | "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d", |
| 70 | 70 | rid |
| 71 | 71 | ); |
| 72 | 72 | /* 01234567890123 */ |
| 73 | - fossil_print("%-13s %.40s %s\n", zUuidName, zUuid, zDate ? zDate : ""); | |
| 73 | + fossil_print("%-13s %.40s %s\n", zRecDesc, zUuid, zDate ? zDate : ""); | |
| 74 | 74 | free(zDate); |
| 75 | 75 | if( showComment ){ |
| 76 | 76 | zComment = db_text(0, |
| 77 | 77 | "SELECT coalesce(ecomment,comment) || " |
| 78 | 78 | " ' (user: ' || coalesce(euser,user,'?') || ')' " |
| @@ -264,11 +264,11 @@ | ||
| 264 | 264 | int rid; |
| 265 | 265 | rid = name_to_rid(g.argv[2]); |
| 266 | 266 | if( rid==0 ){ |
| 267 | 267 | fossil_fatal("no such object: %s", g.argv[2]); |
| 268 | 268 | } |
| 269 | - show_common_info(rid, "uuid:", 1, 1); | |
| 269 | + show_common_info(rid, "hash:", 1, 1); | |
| 270 | 270 | } |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | /* |
| 274 | 274 | ** Show the context graph (immediate parents and children) for |
| @@ -536,11 +536,11 @@ | ||
| 536 | 536 | @ <span class="infoTag">%h(zTagname)</span> |
| 537 | 537 | } |
| 538 | 538 | if( tagtype==2 ){ |
| 539 | 539 | if( zOrigUuid && zOrigUuid[0] ){ |
| 540 | 540 | @ inherited from |
| 541 | - hyperlink_to_uuid(zOrigUuid); | |
| 541 | + hyperlink_to_version(zOrigUuid); | |
| 542 | 542 | }else{ |
| 543 | 543 | @ propagates to descendants |
| 544 | 544 | } |
| 545 | 545 | } |
| 546 | 546 | if( zSrcUuid && zSrcUuid[0] ){ |
| @@ -547,11 +547,11 @@ | ||
| 547 | 547 | if( tagtype==0 ){ |
| 548 | 548 | @ by |
| 549 | 549 | }else{ |
| 550 | 550 | @ added by |
| 551 | 551 | } |
| 552 | - hyperlink_to_uuid(zSrcUuid); | |
| 552 | + hyperlink_to_version(zSrcUuid); | |
| 553 | 553 | @ on |
| 554 | 554 | hyperlink_to_date(zDate,0); |
| 555 | 555 | } |
| 556 | 556 | @ </li> |
| 557 | 557 | } |
| @@ -613,12 +613,12 @@ | ||
| 613 | 613 | int rid; |
| 614 | 614 | int isLeaf; |
| 615 | 615 | int diffType; /* 0: no diff, 1: unified, 2: side-by-side */ |
| 616 | 616 | u64 diffFlags; /* Flag parameter for text_diff() */ |
| 617 | 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) */ | |
| 618 | + const char *zUuid; /* Hash of zName, found via blob.uuid */ | |
| 619 | + const char *zParent; /* Hash of the parent check-in (if any) */ | |
| 620 | 620 | const char *zRe; /* regex parameter */ |
| 621 | 621 | ReCompiled *pRe = 0; /* regex */ |
| 622 | 622 | const char *zW; /* URL param for ignoring whitespace */ |
| 623 | 623 | const char *zPage = "vinfo"; /* Page that shows diffs */ |
| 624 | 624 | const char *zPageHide = "ci"; /* Page that hides diffs */ |
| @@ -939,11 +939,11 @@ | ||
| 939 | 939 | style_footer(); |
| 940 | 940 | } |
| 941 | 941 | |
| 942 | 942 | /* |
| 943 | 943 | ** WEBPAGE: winfo |
| 944 | -** URL: /winfo?name=UUID | |
| 944 | +** URL: /winfo?name=HASH | |
| 945 | 945 | ** |
| 946 | 946 | ** Display information about a wiki page. |
| 947 | 947 | */ |
| 948 | 948 | void winfo_page(void){ |
| 949 | 949 | int rid; |
| @@ -1100,11 +1100,11 @@ | ||
| 1100 | 1100 | Blob comment; |
| 1101 | 1101 | int wikiFlags = WIKI_INLINE|WIKI_NOBADLINKS; |
| 1102 | 1102 | if( db_get_boolean("timeline-block-markup", 0)==0 ){ |
| 1103 | 1103 | wikiFlags |= WIKI_NOBLOCK; |
| 1104 | 1104 | } |
| 1105 | - hyperlink_to_uuid(zUuid); | |
| 1105 | + hyperlink_to_version(zUuid); | |
| 1106 | 1106 | blob_zero(&comment); |
| 1107 | 1107 | db_column_blob(&q, 2, &comment); |
| 1108 | 1108 | wiki_convert(&comment, 0, wikiFlags); |
| 1109 | 1109 | blob_reset(&comment); |
| 1110 | 1110 | @ (user: |
| @@ -1428,14 +1428,14 @@ | ||
| 1428 | 1428 | } |
| 1429 | 1429 | if( showDetail ){ |
| 1430 | 1430 | @ <li> |
| 1431 | 1431 | hyperlink_to_date(zDate,""); |
| 1432 | 1432 | @ — part of check-in |
| 1433 | - hyperlink_to_uuid(zVers); | |
| 1433 | + hyperlink_to_version(zVers); | |
| 1434 | 1434 | }else{ |
| 1435 | 1435 | @ — part of check-in |
| 1436 | - hyperlink_to_uuid(zVers); | |
| 1436 | + hyperlink_to_version(zVers); | |
| 1437 | 1437 | @ at |
| 1438 | 1438 | hyperlink_to_date(zDate,""); |
| 1439 | 1439 | } |
| 1440 | 1440 | if( zBr && zBr[0] ){ |
| 1441 | 1441 | @ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a> |
| @@ -1534,11 +1534,11 @@ | ||
| 1534 | 1534 | @ Forum post |
| 1535 | 1535 | }else{ |
| 1536 | 1536 | @ Tag referencing |
| 1537 | 1537 | } |
| 1538 | 1538 | if( zType[0]!='e' || eventTagId == 0){ |
| 1539 | - hyperlink_to_uuid(zUuid); | |
| 1539 | + hyperlink_to_version(zUuid); | |
| 1540 | 1540 | } |
| 1541 | 1541 | @ - %!W(zCom) by |
| 1542 | 1542 | hyperlink_to_user(zUser,zDate," on"); |
| 1543 | 1543 | hyperlink_to_date(zDate, "."); |
| 1544 | 1544 | if( pDownloadName && blob_size(pDownloadName)==0 ){ |
| @@ -1566,11 +1566,11 @@ | ||
| 1566 | 1566 | @ Also attachment "%h(zFilename)" to |
| 1567 | 1567 | }else{ |
| 1568 | 1568 | @ Attachment "%h(zFilename)" to |
| 1569 | 1569 | } |
| 1570 | 1570 | objType |= OBJTYPE_ATTACHMENT; |
| 1571 | - if( fossil_is_uuid(zTarget) ){ | |
| 1571 | + if( fossil_is_artifact_hash(zTarget) ){ | |
| 1572 | 1572 | if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'", |
| 1573 | 1573 | zTarget) |
| 1574 | 1574 | ){ |
| 1575 | 1575 | if( g.perm.Hyperlink && g.anon.RdTkt ){ |
| 1576 | 1576 | @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>] |
| @@ -1625,11 +1625,11 @@ | ||
| 1625 | 1625 | } |
| 1626 | 1626 | |
| 1627 | 1627 | |
| 1628 | 1628 | /* |
| 1629 | 1629 | ** WEBPAGE: fdiff |
| 1630 | -** URL: fdiff?v1=UUID&v2=UUID | |
| 1630 | +** URL: fdiff?v1=HASH&v2=HASH | |
| 1631 | 1631 | ** |
| 1632 | 1632 | ** Two arguments, v1 and v2, identify the artifacts to be diffed. |
| 1633 | 1633 | ** Show diff side by side unless sbs is 0. Generate plain text if |
| 1634 | 1634 | ** "patch" is present, otherwise generate "pretty" HTML. |
| 1635 | 1635 | ** |
| @@ -1801,18 +1801,18 @@ | ||
| 1801 | 1801 | ** is by the full-length SHA1 or SHA3 hash. Abbreviations are not |
| 1802 | 1802 | ** accepted. |
| 1803 | 1803 | */ |
| 1804 | 1804 | void secure_rawartifact_page(void){ |
| 1805 | 1805 | int rid = 0; |
| 1806 | - const char *zUuid = PD("name", ""); | |
| 1806 | + const char *zName = PD("name", ""); | |
| 1807 | 1807 | |
| 1808 | 1808 | login_check_credentials(); |
| 1809 | 1809 | 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); | |
| 1811 | 1811 | if( rid==0 ){ |
| 1812 | 1812 | cgi_set_status(404, "Not Found"); |
| 1813 | - @ Unknown artifact: "%h(zUuid)" | |
| 1813 | + @ Unknown artifact: "%h(zName)" | |
| 1814 | 1814 | return; |
| 1815 | 1815 | } |
| 1816 | 1816 | g.isConst = 1; |
| 1817 | 1817 | deliver_artifact(rid, P("m")); |
| 1818 | 1818 | } |
| @@ -2527,16 +2527,18 @@ | ||
| 2527 | 2527 | } |
| 2528 | 2528 | |
| 2529 | 2529 | |
| 2530 | 2530 | /* |
| 2531 | 2531 | ** WEBPAGE: info |
| 2532 | -** URL: info/ARTIFACTID | |
| 2532 | +** URL: info/NAME | |
| 2533 | 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. | |
| 2534 | +** The NAME argument is any valid artifact name: an artifact hash, | |
| 2535 | +** a timestamp, a tag name, etc. | |
| 2536 | 2536 | ** |
| 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. | |
| 2538 | 2540 | */ |
| 2539 | 2541 | void info_page(void){ |
| 2540 | 2542 | const char *zName; |
| 2541 | 2543 | Blob uuid; |
| 2542 | 2544 | int rid; |
| @@ -3146,17 +3148,17 @@ | ||
| 3146 | 3148 | blob_append(&prompt, ".\n# Lines beginning with a # are ignored.\n", -1); |
| 3147 | 3149 | prompt_for_user_comment(pComment, &prompt); |
| 3148 | 3150 | blob_reset(&prompt); |
| 3149 | 3151 | } |
| 3150 | 3152 | |
| 3151 | -#define AMEND_USAGE_STMT "UUID OPTION ?OPTION ...?" | |
| 3153 | +#define AMEND_USAGE_STMT "HASH OPTION ?OPTION ...?" | |
| 3152 | 3154 | /* |
| 3153 | 3155 | ** COMMAND: amend |
| 3154 | 3156 | ** |
| 3155 | -** Usage: %fossil amend UUID OPTION ?OPTION ...? | |
| 3157 | +** Usage: %fossil amend HASH OPTION ?OPTION ...? | |
| 3156 | 3158 | ** |
| 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. | |
| 3158 | 3160 | ** |
| 3159 | 3161 | ** Options: |
| 3160 | 3162 | ** |
| 3161 | 3163 | ** --author USER Make USER the author for check-in |
| 3162 | 3164 | ** -m|--comment COMMENT Make COMMENT the check-in comment |
| @@ -3240,11 +3242,11 @@ | ||
| 3240 | 3242 | verify_all_options(); |
| 3241 | 3243 | if( g.argc<3 || g.argc>=4 ) usage(AMEND_USAGE_STMT); |
| 3242 | 3244 | rid = name_to_typed_rid(g.argv[2], "ci"); |
| 3243 | 3245 | if( rid==0 && !is_a_version(rid) ) fossil_fatal("no such check-in"); |
| 3244 | 3246 | 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"); | |
| 3246 | 3248 | zComment = db_text(0, "SELECT coalesce(ecomment,comment)" |
| 3247 | 3249 | " FROM event WHERE objid=%d", rid); |
| 3248 | 3250 | zUser = db_text(0, "SELECT coalesce(euser,user)" |
| 3249 | 3251 | " FROM event WHERE objid=%d", rid); |
| 3250 | 3252 | zDate = db_text(0, "SELECT datetime(mtime)" |
| @@ -3330,11 +3332,11 @@ | ||
| 3330 | 3332 | if( fHide && !fHasHidden ) hide_branch(); |
| 3331 | 3333 | if( fClose && !fHasClosed ) close_leaf(rid); |
| 3332 | 3334 | if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch); |
| 3333 | 3335 | apply_newtags(&ctrl, rid, zUuid, zUserOvrd, fDryRun); |
| 3334 | 3336 | if( fDryRun==0 ){ |
| 3335 | - show_common_info(rid, "uuid:", 1, 0); | |
| 3337 | + show_common_info(rid, "hash:", 1, 0); | |
| 3336 | 3338 | } |
| 3337 | 3339 | if( g.localOpen ){ |
| 3338 | 3340 | manifest_to_disk(rid); |
| 3339 | 3341 | } |
| 3340 | 3342 | } |
| 3341 | 3343 |
| --- 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 | @ — part of check-in |
| 1433 | hyperlink_to_uuid(zVers); |
| 1434 | }else{ |
| 1435 | @ — 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 | @ — part of check-in |
| 1433 | hyperlink_to_version(zVers); |
| 1434 | }else{ |
| 1435 | @ — 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 @@ | ||
| 44 | 44 | |
| 45 | 45 | |
| 46 | 46 | /* |
| 47 | 47 | ** Print common information about a particular record. |
| 48 | 48 | ** |
| 49 | -** * The UUID | |
| 49 | +** * The artifact hash | |
| 50 | 50 | ** * The record ID |
| 51 | 51 | ** * mtime and ctime |
| 52 | 52 | ** * who signed it |
| 53 | 53 | ** |
| 54 | 54 | */ |
| 55 | 55 | void show_common_info( |
| 56 | 56 | 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:" */ | |
| 58 | 58 | int showComment, /* True to show the check-in comment */ |
| 59 | 59 | int showFamily /* True to show parents and children */ |
| 60 | 60 | ){ |
| 61 | 61 | Stmt q; |
| 62 | 62 | char *zComment = 0; |
| @@ -68,11 +68,11 @@ | ||
| 68 | 68 | zDate = db_text(0, |
| 69 | 69 | "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d", |
| 70 | 70 | rid |
| 71 | 71 | ); |
| 72 | 72 | /* 01234567890123 */ |
| 73 | - fossil_print("%-13s %.40s %s\n", zUuidName, zUuid, zDate ? zDate : ""); | |
| 73 | + fossil_print("%-13s %.40s %s\n", zRecDesc, zUuid, zDate ? zDate : ""); | |
| 74 | 74 | free(zDate); |
| 75 | 75 | if( showComment ){ |
| 76 | 76 | zComment = db_text(0, |
| 77 | 77 | "SELECT coalesce(ecomment,comment) || " |
| 78 | 78 | " ' (user: ' || coalesce(euser,user,'?') || ')' " |
| @@ -264,11 +264,11 @@ | ||
| 264 | 264 | int rid; |
| 265 | 265 | rid = name_to_rid(g.argv[2]); |
| 266 | 266 | if( rid==0 ){ |
| 267 | 267 | fossil_fatal("no such object: %s", g.argv[2]); |
| 268 | 268 | } |
| 269 | - show_common_info(rid, "uuid:", 1, 1); | |
| 269 | + show_common_info(rid, "hash:", 1, 1); | |
| 270 | 270 | } |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | /* |
| 274 | 274 | ** Show the context graph (immediate parents and children) for |
| @@ -536,11 +536,11 @@ | ||
| 536 | 536 | @ <span class="infoTag">%h(zTagname)</span> |
| 537 | 537 | } |
| 538 | 538 | if( tagtype==2 ){ |
| 539 | 539 | if( zOrigUuid && zOrigUuid[0] ){ |
| 540 | 540 | @ inherited from |
| 541 | - hyperlink_to_uuid(zOrigUuid); | |
| 541 | + hyperlink_to_version(zOrigUuid); | |
| 542 | 542 | }else{ |
| 543 | 543 | @ propagates to descendants |
| 544 | 544 | } |
| 545 | 545 | } |
| 546 | 546 | if( zSrcUuid && zSrcUuid[0] ){ |
| @@ -547,11 +547,11 @@ | ||
| 547 | 547 | if( tagtype==0 ){ |
| 548 | 548 | @ by |
| 549 | 549 | }else{ |
| 550 | 550 | @ added by |
| 551 | 551 | } |
| 552 | - hyperlink_to_uuid(zSrcUuid); | |
| 552 | + hyperlink_to_version(zSrcUuid); | |
| 553 | 553 | @ on |
| 554 | 554 | hyperlink_to_date(zDate,0); |
| 555 | 555 | } |
| 556 | 556 | @ </li> |
| 557 | 557 | } |
| @@ -613,12 +613,12 @@ | ||
| 613 | 613 | int rid; |
| 614 | 614 | int isLeaf; |
| 615 | 615 | int diffType; /* 0: no diff, 1: unified, 2: side-by-side */ |
| 616 | 616 | u64 diffFlags; /* Flag parameter for text_diff() */ |
| 617 | 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) */ | |
| 618 | + const char *zUuid; /* Hash of zName, found via blob.uuid */ | |
| 619 | + const char *zParent; /* Hash of the parent check-in (if any) */ | |
| 620 | 620 | const char *zRe; /* regex parameter */ |
| 621 | 621 | ReCompiled *pRe = 0; /* regex */ |
| 622 | 622 | const char *zW; /* URL param for ignoring whitespace */ |
| 623 | 623 | const char *zPage = "vinfo"; /* Page that shows diffs */ |
| 624 | 624 | const char *zPageHide = "ci"; /* Page that hides diffs */ |
| @@ -939,11 +939,11 @@ | ||
| 939 | 939 | style_footer(); |
| 940 | 940 | } |
| 941 | 941 | |
| 942 | 942 | /* |
| 943 | 943 | ** WEBPAGE: winfo |
| 944 | -** URL: /winfo?name=UUID | |
| 944 | +** URL: /winfo?name=HASH | |
| 945 | 945 | ** |
| 946 | 946 | ** Display information about a wiki page. |
| 947 | 947 | */ |
| 948 | 948 | void winfo_page(void){ |
| 949 | 949 | int rid; |
| @@ -1100,11 +1100,11 @@ | ||
| 1100 | 1100 | Blob comment; |
| 1101 | 1101 | int wikiFlags = WIKI_INLINE|WIKI_NOBADLINKS; |
| 1102 | 1102 | if( db_get_boolean("timeline-block-markup", 0)==0 ){ |
| 1103 | 1103 | wikiFlags |= WIKI_NOBLOCK; |
| 1104 | 1104 | } |
| 1105 | - hyperlink_to_uuid(zUuid); | |
| 1105 | + hyperlink_to_version(zUuid); | |
| 1106 | 1106 | blob_zero(&comment); |
| 1107 | 1107 | db_column_blob(&q, 2, &comment); |
| 1108 | 1108 | wiki_convert(&comment, 0, wikiFlags); |
| 1109 | 1109 | blob_reset(&comment); |
| 1110 | 1110 | @ (user: |
| @@ -1428,14 +1428,14 @@ | ||
| 1428 | 1428 | } |
| 1429 | 1429 | if( showDetail ){ |
| 1430 | 1430 | @ <li> |
| 1431 | 1431 | hyperlink_to_date(zDate,""); |
| 1432 | 1432 | @ — part of check-in |
| 1433 | - hyperlink_to_uuid(zVers); | |
| 1433 | + hyperlink_to_version(zVers); | |
| 1434 | 1434 | }else{ |
| 1435 | 1435 | @ — part of check-in |
| 1436 | - hyperlink_to_uuid(zVers); | |
| 1436 | + hyperlink_to_version(zVers); | |
| 1437 | 1437 | @ at |
| 1438 | 1438 | hyperlink_to_date(zDate,""); |
| 1439 | 1439 | } |
| 1440 | 1440 | if( zBr && zBr[0] ){ |
| 1441 | 1441 | @ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a> |
| @@ -1534,11 +1534,11 @@ | ||
| 1534 | 1534 | @ Forum post |
| 1535 | 1535 | }else{ |
| 1536 | 1536 | @ Tag referencing |
| 1537 | 1537 | } |
| 1538 | 1538 | if( zType[0]!='e' || eventTagId == 0){ |
| 1539 | - hyperlink_to_uuid(zUuid); | |
| 1539 | + hyperlink_to_version(zUuid); | |
| 1540 | 1540 | } |
| 1541 | 1541 | @ - %!W(zCom) by |
| 1542 | 1542 | hyperlink_to_user(zUser,zDate," on"); |
| 1543 | 1543 | hyperlink_to_date(zDate, "."); |
| 1544 | 1544 | if( pDownloadName && blob_size(pDownloadName)==0 ){ |
| @@ -1566,11 +1566,11 @@ | ||
| 1566 | 1566 | @ Also attachment "%h(zFilename)" to |
| 1567 | 1567 | }else{ |
| 1568 | 1568 | @ Attachment "%h(zFilename)" to |
| 1569 | 1569 | } |
| 1570 | 1570 | objType |= OBJTYPE_ATTACHMENT; |
| 1571 | - if( fossil_is_uuid(zTarget) ){ | |
| 1571 | + if( fossil_is_artifact_hash(zTarget) ){ | |
| 1572 | 1572 | if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'", |
| 1573 | 1573 | zTarget) |
| 1574 | 1574 | ){ |
| 1575 | 1575 | if( g.perm.Hyperlink && g.anon.RdTkt ){ |
| 1576 | 1576 | @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>] |
| @@ -1625,11 +1625,11 @@ | ||
| 1625 | 1625 | } |
| 1626 | 1626 | |
| 1627 | 1627 | |
| 1628 | 1628 | /* |
| 1629 | 1629 | ** WEBPAGE: fdiff |
| 1630 | -** URL: fdiff?v1=UUID&v2=UUID | |
| 1630 | +** URL: fdiff?v1=HASH&v2=HASH | |
| 1631 | 1631 | ** |
| 1632 | 1632 | ** Two arguments, v1 and v2, identify the artifacts to be diffed. |
| 1633 | 1633 | ** Show diff side by side unless sbs is 0. Generate plain text if |
| 1634 | 1634 | ** "patch" is present, otherwise generate "pretty" HTML. |
| 1635 | 1635 | ** |
| @@ -1801,18 +1801,18 @@ | ||
| 1801 | 1801 | ** is by the full-length SHA1 or SHA3 hash. Abbreviations are not |
| 1802 | 1802 | ** accepted. |
| 1803 | 1803 | */ |
| 1804 | 1804 | void secure_rawartifact_page(void){ |
| 1805 | 1805 | int rid = 0; |
| 1806 | - const char *zUuid = PD("name", ""); | |
| 1806 | + const char *zName = PD("name", ""); | |
| 1807 | 1807 | |
| 1808 | 1808 | login_check_credentials(); |
| 1809 | 1809 | 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); | |
| 1811 | 1811 | if( rid==0 ){ |
| 1812 | 1812 | cgi_set_status(404, "Not Found"); |
| 1813 | - @ Unknown artifact: "%h(zUuid)" | |
| 1813 | + @ Unknown artifact: "%h(zName)" | |
| 1814 | 1814 | return; |
| 1815 | 1815 | } |
| 1816 | 1816 | g.isConst = 1; |
| 1817 | 1817 | deliver_artifact(rid, P("m")); |
| 1818 | 1818 | } |
| @@ -2527,16 +2527,18 @@ | ||
| 2527 | 2527 | } |
| 2528 | 2528 | |
| 2529 | 2529 | |
| 2530 | 2530 | /* |
| 2531 | 2531 | ** WEBPAGE: info |
| 2532 | -** URL: info/ARTIFACTID | |
| 2532 | +** URL: info/NAME | |
| 2533 | 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. | |
| 2534 | +** The NAME argument is any valid artifact name: an artifact hash, | |
| 2535 | +** a timestamp, a tag name, etc. | |
| 2536 | 2536 | ** |
| 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. | |
| 2538 | 2540 | */ |
| 2539 | 2541 | void info_page(void){ |
| 2540 | 2542 | const char *zName; |
| 2541 | 2543 | Blob uuid; |
| 2542 | 2544 | int rid; |
| @@ -3146,17 +3148,17 @@ | ||
| 3146 | 3148 | blob_append(&prompt, ".\n# Lines beginning with a # are ignored.\n", -1); |
| 3147 | 3149 | prompt_for_user_comment(pComment, &prompt); |
| 3148 | 3150 | blob_reset(&prompt); |
| 3149 | 3151 | } |
| 3150 | 3152 | |
| 3151 | -#define AMEND_USAGE_STMT "UUID OPTION ?OPTION ...?" | |
| 3153 | +#define AMEND_USAGE_STMT "HASH OPTION ?OPTION ...?" | |
| 3152 | 3154 | /* |
| 3153 | 3155 | ** COMMAND: amend |
| 3154 | 3156 | ** |
| 3155 | -** Usage: %fossil amend UUID OPTION ?OPTION ...? | |
| 3157 | +** Usage: %fossil amend HASH OPTION ?OPTION ...? | |
| 3156 | 3158 | ** |
| 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. | |
| 3158 | 3160 | ** |
| 3159 | 3161 | ** Options: |
| 3160 | 3162 | ** |
| 3161 | 3163 | ** --author USER Make USER the author for check-in |
| 3162 | 3164 | ** -m|--comment COMMENT Make COMMENT the check-in comment |
| @@ -3240,11 +3242,11 @@ | ||
| 3240 | 3242 | verify_all_options(); |
| 3241 | 3243 | if( g.argc<3 || g.argc>=4 ) usage(AMEND_USAGE_STMT); |
| 3242 | 3244 | rid = name_to_typed_rid(g.argv[2], "ci"); |
| 3243 | 3245 | if( rid==0 && !is_a_version(rid) ) fossil_fatal("no such check-in"); |
| 3244 | 3246 | 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"); | |
| 3246 | 3248 | zComment = db_text(0, "SELECT coalesce(ecomment,comment)" |
| 3247 | 3249 | " FROM event WHERE objid=%d", rid); |
| 3248 | 3250 | zUser = db_text(0, "SELECT coalesce(euser,user)" |
| 3249 | 3251 | " FROM event WHERE objid=%d", rid); |
| 3250 | 3252 | zDate = db_text(0, "SELECT datetime(mtime)" |
| @@ -3330,11 +3332,11 @@ | ||
| 3330 | 3332 | if( fHide && !fHasHidden ) hide_branch(); |
| 3331 | 3333 | if( fClose && !fHasClosed ) close_leaf(rid); |
| 3332 | 3334 | if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch); |
| 3333 | 3335 | apply_newtags(&ctrl, rid, zUuid, zUserOvrd, fDryRun); |
| 3334 | 3336 | if( fDryRun==0 ){ |
| 3335 | - show_common_info(rid, "uuid:", 1, 0); | |
| 3337 | + show_common_info(rid, "hash:", 1, 0); | |
| 3336 | 3338 | } |
| 3337 | 3339 | if( g.localOpen ){ |
| 3338 | 3340 | manifest_to_disk(rid); |
| 3339 | 3341 | } |
| 3340 | 3342 | } |
| 3341 | 3343 |
| --- 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 | @ — part of check-in |
| 1433 | hyperlink_to_uuid(zVers); |
| 1434 | }else{ |
| 1435 | @ — 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 | @ — part of check-in |
| 1433 | hyperlink_to_version(zVers); |
| 1434 | }else{ |
| 1435 | @ — 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 |
+1
-1
| --- src/json_finfo.c | ||
| +++ src/json_finfo.c | ||
| @@ -89,11 +89,11 @@ | ||
| 89 | 89 | char * zU = NULL; |
| 90 | 90 | int rc = name_to_uuid2( zCheckin, "ci", &zU ); |
| 91 | 91 | /*printf("zCheckin=[%s], zU=[%s]", zCheckin, zU);*/ |
| 92 | 92 | if(rc<=0){ |
| 93 | 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"); | |
| 94 | + "Check-in hash %s.", (rc<0) ? "is ambiguous" : "not found"); | |
| 95 | 95 | blob_reset(&sql); |
| 96 | 96 | return NULL; |
| 97 | 97 | } |
| 98 | 98 | blob_append_sql(&sql, " AND ci.uuid='%q'", zU); |
| 99 | 99 | free(zU); |
| 100 | 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 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 @@ | ||
| 117 | 117 | Blob uu = empty_blob; |
| 118 | 118 | int rc; |
| 119 | 119 | blob_append(&uu, zName, -1); |
| 120 | 120 | rc = name_to_uuid(&uu, 9, "*"); |
| 121 | 121 | 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!"); | |
| 123 | 123 | blob_reset(&uu); |
| 124 | 124 | goto error; |
| 125 | 125 | } |
| 126 | 126 | cson_object_set(pay, "appliedTo", json_new_string(blob_buffer(&uu))); |
| 127 | 127 | blob_reset(&uu); |
| 128 | 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 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 @@ | ||
| 159 | 159 | char *zLocalDbName; /* Name of the local database file */ |
| 160 | 160 | char *zOpenRevision; /* Check-in version to use during database open */ |
| 161 | 161 | const char *zCmdName; /* Name of the Fossil command currently running */ |
| 162 | 162 | int localOpen; /* True if the local database is open */ |
| 163 | 163 | 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 */ | |
| 165 | 165 | int eHashPolicy; /* Current hash policy. One of HPOLICY_* */ |
| 166 | 166 | int fSqlTrace; /* True if --sqltrace flag is present */ |
| 167 | 167 | int fSqlStats; /* True if --sqltrace or --sqlstats are present */ |
| 168 | 168 | int fSqlPrint; /* True if --sqlprint flag is present */ |
| 169 | 169 | int fCgiTrace; /* True if --cgitrace is enabled */ |
| 170 | 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 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 @@ | ||
| 159 | 159 | char *zLocalDbName; /* Name of the local database file */ |
| 160 | 160 | char *zOpenRevision; /* Check-in version to use during database open */ |
| 161 | 161 | const char *zCmdName; /* Name of the Fossil command currently running */ |
| 162 | 162 | int localOpen; /* True if the local database is open */ |
| 163 | 163 | 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 */ | |
| 165 | 165 | int eHashPolicy; /* Current hash policy. One of HPOLICY_* */ |
| 166 | 166 | int fSqlTrace; /* True if --sqltrace flag is present */ |
| 167 | 167 | int fSqlStats; /* True if --sqltrace or --sqlstats are present */ |
| 168 | 168 | int fSqlPrint; /* True if --sqlprint flag is present */ |
| 169 | 169 | int fCgiTrace; /* True if --cgitrace is enabled */ |
| 170 | 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 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 @@ | ||
| 2434 | 2434 | /* We assume that we're attaching to a wiki page until we |
| 2435 | 2435 | ** prove otherwise (which could on a later artifact if we |
| 2436 | 2436 | ** process the attachment artifact before the artifact to |
| 2437 | 2437 | ** which it is attached!) */ |
| 2438 | 2438 | char attachToType = 'w'; |
| 2439 | - if( fossil_is_uuid(p->zAttachTarget) ){ | |
| 2439 | + if( fossil_is_artifact_hash(p->zAttachTarget) ){ | |
| 2440 | 2440 | if( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'", |
| 2441 | 2441 | p->zAttachTarget) |
| 2442 | 2442 | ){ |
| 2443 | 2443 | attachToType = 't'; /* Attaching to known ticket */ |
| 2444 | 2444 | }else if( db_exists("SELECT 1 FROM tag WHERE tagname='event-%q'", |
| 2445 | 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_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 @@ | ||
| 2434 | 2434 | /* We assume that we're attaching to a wiki page until we |
| 2435 | 2435 | ** prove otherwise (which could on a later artifact if we |
| 2436 | 2436 | ** process the attachment artifact before the artifact to |
| 2437 | 2437 | ** which it is attached!) */ |
| 2438 | 2438 | char attachToType = 'w'; |
| 2439 | - if( fossil_is_uuid(p->zAttachTarget) ){ | |
| 2439 | + if( fossil_is_artifact_hash(p->zAttachTarget) ){ | |
| 2440 | 2440 | if( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'", |
| 2441 | 2441 | p->zAttachTarget) |
| 2442 | 2442 | ){ |
| 2443 | 2443 | attachToType = 't'; /* Attaching to known ticket */ |
| 2444 | 2444 | }else if( db_exists("SELECT 1 FROM tag WHERE tagname='event-%q'", |
| 2445 | 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_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 @@ | ||
| 446 | 446 | } |
| 447 | 447 | return rid; |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 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. | |
| 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. | |
| 454 | 458 | ** |
| 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 | |
| 456 | 460 | ** 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") | |
| 458 | 464 | ** |
| 459 | 465 | ** If the input is not a tag, then try to match it as an ISO-8601 date |
| 460 | 466 | ** string YYYY-MM-DD HH:MM:SS and pick the nearest check-in to that date. |
| 461 | 467 | ** If the input is of the form "date:*" then always resolve the name as |
| 462 | 468 | ** a date. The forms "utc:*" and "local:" are deprecated. |
| @@ -481,16 +487,16 @@ | ||
| 481 | 487 | } |
| 482 | 488 | |
| 483 | 489 | /* |
| 484 | 490 | ** This routine is similar to name_to_uuid() except in the form it |
| 485 | 491 | ** 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 | |
| 488 | 494 | ** zName does not resolve, 0 is returned. If it is ambiguous, a |
| 489 | 495 | ** negative value is returned. On success the rid is returned and |
| 490 | 496 | ** 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. | |
| 492 | 498 | */ |
| 493 | 499 | int name_to_uuid2(const char *zName, const char *zType, char **pUuid){ |
| 494 | 500 | int rid = symbolic_name_to_rid(zName, zType); |
| 495 | 501 | if((rid>0) && pUuid){ |
| 496 | 502 | *pUuid = db_text(NULL, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| @@ -499,12 +505,13 @@ | ||
| 499 | 505 | } |
| 500 | 506 | |
| 501 | 507 | |
| 502 | 508 | /* |
| 503 | 509 | ** 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. | |
| 506 | 513 | */ |
| 507 | 514 | int name_collisions(const char *zName){ |
| 508 | 515 | int c = 0; /* count of collisions for zName */ |
| 509 | 516 | int nLen; /* length of zName */ |
| 510 | 517 | nLen = strlen(zName); |
| @@ -633,11 +640,11 @@ | ||
| 633 | 640 | const char *zTitle = db_column_text(&q, 2); |
| 634 | 641 | @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)"> |
| 635 | 642 | @ %s(zUuid)</a> - |
| 636 | 643 | @ <ul></ul> |
| 637 | 644 | @ Ticket |
| 638 | - hyperlink_to_uuid(zUuid); | |
| 645 | + hyperlink_to_version(zUuid); | |
| 639 | 646 | @ - %h(zTitle). |
| 640 | 647 | @ <ul><li> |
| 641 | 648 | object_description(rid, 0, 0, 0); |
| 642 | 649 | @ </li></ul> |
| 643 | 650 | @ </p></li> |
| 644 | 651 |
| --- 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 @@ | ||
| 97 | 97 | #define etHTTPIZE 18 /* Make text safe for HTTP. "/" encoded as %2f */ |
| 98 | 98 | #define etURLIZE 19 /* Make text safe for HTTP. "/" not encoded */ |
| 99 | 99 | #define etFOSSILIZE 20 /* The fossil header encoding format. */ |
| 100 | 100 | #define etPATH 21 /* Path type */ |
| 101 | 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 */ | |
| 102 | +#define etSTRINGID 23 /* String with length limit for a hash prefix: %S */ | |
| 103 | 103 | #define etROOT 24 /* String value of g.zTop: %R */ |
| 104 | 104 | #define etJSONSTR 25 /* String encoded as a JSON string literal: %j |
| 105 | 105 | Use %!j to include double-quotes around it. */ |
| 106 | 106 | |
| 107 | 107 | |
| 108 | 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 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 @@ | ||
| 97 | 97 | #define etHTTPIZE 18 /* Make text safe for HTTP. "/" encoded as %2f */ |
| 98 | 98 | #define etURLIZE 19 /* Make text safe for HTTP. "/" not encoded */ |
| 99 | 99 | #define etFOSSILIZE 20 /* The fossil header encoding format. */ |
| 100 | 100 | #define etPATH 21 /* Path type */ |
| 101 | 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 */ | |
| 102 | +#define etSTRINGID 23 /* String with length limit for a hash prefix: %S */ | |
| 103 | 103 | #define etROOT 24 /* String value of g.zTop: %R */ |
| 104 | 104 | #define etJSONSTR 25 /* String encoded as a JSON string literal: %j |
| 105 | 105 | Use %!j to include double-quotes around it. */ |
| 106 | 106 | |
| 107 | 107 | |
| 108 | 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 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 @@ | ||
| 456 | 456 | ** ==== Make a backup of your repository before using this command! ==== |
| 457 | 457 | ** |
| 458 | 458 | ** ==== FURTHER WARNING: This command is a work-in-progress and may yet ==== |
| 459 | 459 | ** ==== contain bugs. ==== |
| 460 | 460 | ** |
| 461 | -** fossil purge artifacts UUID... ?OPTIONS? | |
| 461 | +** fossil purge artifacts HASH... ?OPTIONS? | |
| 462 | 462 | ** |
| 463 | -** Move arbitrary artifacts identified by the UUID list into the | |
| 463 | +** Move arbitrary artifacts identified by the HASH list into the | |
| 464 | 464 | ** graveyard. |
| 465 | 465 | ** |
| 466 | -** fossil purge cat UUID... | |
| 466 | +** fossil purge cat HASH... | |
| 467 | 467 | ** |
| 468 | 468 | ** Write the content of one or more artifacts in the graveyard onto |
| 469 | 469 | ** standard output. |
| 470 | 470 | ** |
| 471 | 471 | ** fossil purge checkins TAGS... ?OPTIONS? |
| @@ -509,12 +509,12 @@ | ||
| 509 | 509 | ** |
| 510 | 510 | ** --explain Make no changes, but show what would happen. |
| 511 | 511 | ** --dry-run An alias for --explain |
| 512 | 512 | ** |
| 513 | 513 | ** SUMMARY: |
| 514 | -** fossil purge artifacts UUID.. [OPTIONS] | |
| 515 | -** fossil purge cat UUID... | |
| 514 | +** fossil purge artifacts HASH.. [OPTIONS] | |
| 515 | +** fossil purge cat HASH... | |
| 516 | 516 | ** fossil purge checkins TAGS... [OPTIONS] |
| 517 | 517 | ** fossil purge files FILENAME... [OPTIONS] |
| 518 | 518 | ** fossil purge list |
| 519 | 519 | ** fossil purge obliterate ID... |
| 520 | 520 | ** fossil purge tickets NAME... [OPTIONS] |
| @@ -547,11 +547,11 @@ | ||
| 547 | 547 | purge_artifact_list("ok", "", purgeFlags); |
| 548 | 548 | db_end_transaction(0); |
| 549 | 549 | }else if( strncmp(zSubcmd, "cat", n)==0 ){ |
| 550 | 550 | int i, piid; |
| 551 | 551 | Blob content; |
| 552 | - if( g.argc<4 ) usage("cat UUID..."); | |
| 552 | + if( g.argc<4 ) usage("cat HASH..."); | |
| 553 | 553 | for(i=3; i<g.argc; i++){ |
| 554 | 554 | piid = db_int(0, "SELECT piid FROM purgeitem WHERE uuid LIKE '%q%%'", |
| 555 | 555 | g.argv[i]); |
| 556 | 556 | if( piid==0 ) fossil_fatal("no such item: %s", g.argv[3]); |
| 557 | 557 | purge_extract_item(piid, &content); |
| 558 | 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 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 @@ | ||
| 1149 | 1149 | */ |
| 1150 | 1150 | void private_export(char *zFileName) |
| 1151 | 1151 | { |
| 1152 | 1152 | Stmt q; |
| 1153 | 1153 | 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); | |
| 1155 | 1155 | db_prepare(&q, |
| 1156 | 1156 | "SELECT uuid FROM blob WHERE rid IN ( SELECT rid FROM private );"); |
| 1157 | 1157 | while( db_step(&q)==SQLITE_ROW ){ |
| 1158 | 1158 | const char *zUuid = db_column_text(&q, 0); |
| 1159 | 1159 | blob_append(&fctx, zUuid, -1); |
| 1160 | 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 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 @@ | ||
| 670 | 670 | const char **azArg, /* Text of data in all columns */ |
| 671 | 671 | const char **azName /* Names of the columns */ |
| 672 | 672 | ){ |
| 673 | 673 | struct GenerateHTML *pState = (struct GenerateHTML*)pUser; |
| 674 | 674 | int i; |
| 675 | - const char *zTid; /* Ticket UUID. (value of column named '#') */ | |
| 675 | + const char *zTid; /* Ticket hash. (value of column named '#') */ | |
| 676 | 676 | const char *zBg = 0; /* Use this background color */ |
| 677 | 677 | |
| 678 | 678 | /* Do initialization |
| 679 | 679 | */ |
| 680 | 680 | if( pState->nCount==0 ){ |
| 681 | 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 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 @@ | ||
| 22 | 22 | #include "rss.h" |
| 23 | 23 | #include <assert.h> |
| 24 | 24 | |
| 25 | 25 | /* |
| 26 | 26 | ** 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 | |
| 28 | 28 | ** |
| 29 | 29 | ** Produce an RSS feed of the timeline. |
| 30 | 30 | ** |
| 31 | 31 | ** TYPE may be: all, ci (show check-ins only), t (show ticket changes only), |
| 32 | 32 | ** w (show wiki only), e (show tech notes only), f (show forum posts only), |
| 33 | 33 | ** g (show tag/branch changes only). |
| 34 | 34 | ** |
| 35 | 35 | ** LIMIT is the number of items to show. |
| 36 | 36 | ** |
| 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 | |
| 38 | 38 | ** filters for a tag, and wiki=NAME for a wiki page. Only one may be used. |
| 39 | 39 | ** |
| 40 | 40 | ** In addition, name=FILENAME filters for a specific file. This may be |
| 41 | 41 | ** combined with one of the other filters (useful for looking at a specific |
| 42 | 42 | ** branch). |
| @@ -231,11 +231,11 @@ | ||
| 231 | 231 | ** w (show wiki only). |
| 232 | 232 | ** |
| 233 | 233 | ** -limit|n LIMIT |
| 234 | 234 | ** The maximum number of items to show. |
| 235 | 235 | ** |
| 236 | -** -tkt UUID | |
| 236 | +** -tkt HASH | |
| 237 | 237 | ** Filters for only those events for the specified ticket. |
| 238 | 238 | ** |
| 239 | 239 | ** -tag TAG |
| 240 | 240 | ** filters for a tag |
| 241 | 241 | ** |
| 242 | 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=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 @@ | ||
| 321 | 321 | @ omtime DATETIME -- Original unchanged date+time, or NULL |
| 322 | 322 | @ ); |
| 323 | 323 | @ CREATE INDEX event_i1 ON event(mtime); |
| 324 | 324 | @ |
| 325 | 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. | |
| 326 | +@ -- file hash but we do not (yet) know the file content. | |
| 327 | 327 | @ -- |
| 328 | 328 | @ CREATE TABLE phantom( |
| 329 | 329 | @ rid INTEGER PRIMARY KEY -- Record ID of the phantom |
| 330 | 330 | @ ); |
| 331 | 331 | @ |
| @@ -362,12 +362,12 @@ | ||
| 362 | 362 | @ |
| 363 | 363 | @ -- Each artifact can have one or more tags. A tag |
| 364 | 364 | @ -- is defined by a row in the next table. |
| 365 | 365 | @ -- |
| 366 | 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 | |
| 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 | 369 | @ -- names to baselines are branches are of the form "sym-NAME" where |
| 370 | 370 | @ -- NAME is the symbolic name. |
| 371 | 371 | @ -- |
| 372 | 372 | @ CREATE TABLE tag( |
| 373 | 373 | @ tagid INTEGER PRIMARY KEY, -- Numeric tag ID |
| @@ -421,12 +421,12 @@ | ||
| 421 | 421 | @ -- |
| 422 | 422 | @ CREATE TABLE attachment( |
| 423 | 423 | @ attachid INTEGER PRIMARY KEY, -- Local id for this attachment |
| 424 | 424 | @ isLatest BOOLEAN DEFAULT 0, -- True if this is the one to use |
| 425 | 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 | |
| 426 | +@ src TEXT, -- Hash of the attachment. NULL to delete | |
| 427 | +@ target TEXT, -- Object attached to. Wikiname or Tkt hash | |
| 428 | 428 | @ filename TEXT, -- Filename for the attachment |
| 429 | 429 | @ comment TEXT, -- Comment associated with this attachment |
| 430 | 430 | @ user TEXT -- Name of user adding attachment |
| 431 | 431 | @ ); |
| 432 | 432 | @ CREATE INDEX attachment_idx1 ON attachment(target, filename, mtime); |
| 433 | 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 | @ -- 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 @@ | ||
| 466 | 466 | ** |
| 467 | 467 | ** zDir is a "synthetic" subdirectory which all files get |
| 468 | 468 | ** added to as part of the tarball. It may be 0 or an empty string, in |
| 469 | 469 | ** which case it is ignored. The intention is to create a tarball which |
| 470 | 470 | ** 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". | |
| 472 | 472 | ** |
| 473 | 473 | */ |
| 474 | 474 | void tarball_of_checkin( |
| 475 | 475 | int rid, /* The RID of the checkin from which to form a tarball */ |
| 476 | 476 | Blob *pTar, /* Write the tarball into this blob */ |
| 477 | 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 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 @@ | ||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /* |
| 51 | 51 | ** Generate a hyperlink to a version. |
| 52 | 52 | */ |
| 53 | -void hyperlink_to_uuid(const char *zUuid){ | |
| 53 | +void hyperlink_to_version(const char *zVerHash){ | |
| 54 | 54 | 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> | |
| 56 | 56 | }else{ |
| 57 | - @ <span class="timelineHistDsp">[%S(zUuid)]</span> | |
| 57 | + @ <span class="timelineHistDsp">[%S(zVerHash)]</span> | |
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /* |
| 62 | 62 | ** Generate a hyperlink to a date & time. |
| @@ -101,11 +101,11 @@ | ||
| 101 | 101 | #define TIMELINE_FCHANGES 0x0000020 /* Detail file changes */ |
| 102 | 102 | #define TIMELINE_BRCOLOR 0x0000040 /* Background color by branch name */ |
| 103 | 103 | #define TIMELINE_UCOLOR 0x0000080 /* Background color by user */ |
| 104 | 104 | #define TIMELINE_FRENAMES 0x0000100 /* Detail only file name changes */ |
| 105 | 105 | #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 */ | |
| 107 | 107 | #define TIMELINE_BISECT 0x0000800 /* Show supplimental bisect information */ |
| 108 | 108 | #define TIMELINE_COMPACT 0x0001000 /* Use the "compact" view style */ |
| 109 | 109 | #define TIMELINE_VERBOSE 0x0002000 /* Use the "detailed" view style */ |
| 110 | 110 | #define TIMELINE_MODERN 0x0004000 /* Use the "modern" view style */ |
| 111 | 111 | #define TIMELINE_COLUMNAR 0x0008000 /* Use the "columns" view style */ |
| @@ -229,11 +229,11 @@ | ||
| 229 | 229 | /* |
| 230 | 230 | ** Output a timeline in the web format given a query. The query |
| 231 | 231 | ** should return these columns: |
| 232 | 232 | ** |
| 233 | 233 | ** 0. rid |
| 234 | -** 1. UUID | |
| 234 | +** 1. artifact hash | |
| 235 | 235 | ** 2. Date/Time |
| 236 | 236 | ** 3. Comment string |
| 237 | 237 | ** 4. User |
| 238 | 238 | ** 5. True if is a leaf |
| 239 | 239 | ** 6. background color |
| @@ -533,11 +533,11 @@ | ||
| 533 | 533 | }else{ |
| 534 | 534 | @ <span class='timeline%s(zStyle)Comment'> |
| 535 | 535 | } |
| 536 | 536 | if( (tmFlags & TIMELINE_CLASSIC)!=0 ){ |
| 537 | 537 | if( zType[0]=='c' ){ |
| 538 | - hyperlink_to_uuid(zUuid); | |
| 538 | + hyperlink_to_version(zUuid); | |
| 539 | 539 | if( isLeaf ){ |
| 540 | 540 | if( db_exists("SELECT 1 FROM tagxref" |
| 541 | 541 | " WHERE rid=%d AND tagid=%d AND tagtype>0", |
| 542 | 542 | rid, TAG_CLOSED) ){ |
| 543 | 543 | @ <span class="timelineLeaf">Closed-Leaf:</span> |
| @@ -546,11 +546,11 @@ | ||
| 546 | 546 | } |
| 547 | 547 | } |
| 548 | 548 | }else if( zType[0]=='e' && tagid ){ |
| 549 | 549 | hyperlink_to_event_tagid(tagid<0?-tagid:tagid); |
| 550 | 550 | }else if( (tmFlags & TIMELINE_ARTID)!=0 ){ |
| 551 | - hyperlink_to_uuid(zUuid); | |
| 551 | + hyperlink_to_version(zUuid); | |
| 552 | 552 | } |
| 553 | 553 | if( tmFlags & TIMELINE_SHOWRID ){ |
| 554 | 554 | int srcId = delta_source_rid(rid); |
| 555 | 555 | if( srcId ){ |
| 556 | 556 | @ (%d(rid)←%d(srcId)) |
| 557 | 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_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)←%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)←%d(srcId)) |
| 557 |
+1
-1
| --- src/tktsetup.c | ||
| +++ src/tktsetup.c | ||
| @@ -448,11 +448,11 @@ | ||
| 448 | 448 | ); |
| 449 | 449 | } |
| 450 | 450 | |
| 451 | 451 | static const char zDefaultView[] = |
| 452 | 452 | @ <table cellpadding="5"> |
| 453 | -@ <tr><td class="tktDspLabel">Ticket UUID:</td> | |
| 453 | +@ <tr><td class="tktDspLabel">Ticket Hash:</td> | |
| 454 | 454 | @ <th1> |
| 455 | 455 | @ if {[info exists tkt_uuid]} { |
| 456 | 456 | @ html "<td class='tktDspValue' colspan='3'>" |
| 457 | 457 | @ copybtn hash-tk 0 $tkt_uuid 2 |
| 458 | 458 | @ if {[hascap s]} { |
| 459 | 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 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 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 @@ | ||
| 416 | 416 | |
| 417 | 417 | /* |
| 418 | 418 | ** Returns TRUE if zSym is exactly HNAME_LEN_SHA1 or HNAME_LEN_K256 |
| 419 | 419 | ** bytes long and contains only lower-case ASCII hexadecimal values. |
| 420 | 420 | */ |
| 421 | -int fossil_is_uuid(const char *zSym){ | |
| 421 | +int fossil_is_artifact_hash(const char *zSym){ | |
| 422 | 422 | int sz = zSym ? (int)strlen(zSym) : 0; |
| 423 | 423 | return (HNAME_LEN_SHA1==sz || HNAME_LEN_K256==sz) && validate16(zSym, sz); |
| 424 | 424 | } |
| 425 | 425 | |
| 426 | 426 | /* |
| 427 | 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_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 @@ | ||
| 614 | 614 | ** |
| 615 | 615 | ** zDir is a "synthetic" subdirectory which all zipped files get |
| 616 | 616 | ** added to as part of the zip file. It may be 0 or an empty string, |
| 617 | 617 | ** in which case it is ignored. The intention is to create a zip which |
| 618 | 618 | ** 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". | |
| 620 | 620 | ** |
| 621 | 621 | */ |
| 622 | 622 | static void zip_of_checkin( |
| 623 | 623 | int eType, /* Type of archive (ZIP or SQLAR) */ |
| 624 | 624 | int rid, /* The RID of the checkin to build the archive from */ |
| 625 | 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 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 @@ | ||
| 26 | 26 | proc manifest_comment {comment} { |
| 27 | 27 | string map [list { } {\\s} \n {\\n} \r {\\r}] $comment |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 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 | |
| 31 | + upvar $var HASH | |
| 32 | + regexp {^New_Version: ([0-9a-f]{40})[0-9a-f]*$} $res m HASH | |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 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 | |
| 36 | + upvar $var HASH | |
| 37 | + regexp {^New branch: ([0-9a-f]{40})[0-9a-f]*$} $res m HASH | |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | proc uuid_from_checkout {var} { |
| 41 | 41 | global RESULT |
| 42 | - upvar $var UUID | |
| 42 | + upvar $var HASH | |
| 43 | 43 | 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 | |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | # Make sure we are not in an open repository and initialize new repository |
| 48 | 48 | test_setup |
| 49 | 49 | |
| 50 | 50 | ######################################## |
| 51 | 51 | # Setup: Add file and commit # |
| 52 | 52 | ######################################## |
| 53 | 53 | |
| 54 | -if {![uuid_from_checkout UUIDINIT]} { | |
| 54 | +if {![uuid_from_checkout HASHINIT]} { | |
| 55 | 55 | test amend-checkout-failure false |
| 56 | 56 | test_cleanup_then_return |
| 57 | 57 | } |
| 58 | 58 | write_file datafile "data" |
| 59 | 59 | fossil add datafile |
| 60 | 60 | fossil commit -m "c1" |
| 61 | -if {![uuid_from_commit $RESULT UUID]} { | |
| 61 | +if {![uuid_from_commit $RESULT HASH]} { | |
| 62 | 62 | test amend-setup-failure false |
| 63 | 63 | test_cleanup_then_return |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | ######################################## |
| 67 | 67 | # Test: -branch # |
| 68 | 68 | ######################################## |
| 69 | -set UUIDB UUIDB | |
| 69 | +set HASHB HASHB | |
| 70 | 70 | write_file datafile "data.file" |
| 71 | 71 | fossil commit -m "c2" |
| 72 | -if {![uuid_from_commit $RESULT UUIDB]} { | |
| 72 | +if {![uuid_from_commit $RESULT HASHB]} { | |
| 73 | 73 | test amend-branch.setup false |
| 74 | 74 | } |
| 75 | -fossil amend $UUIDB -branch amended-branch | |
| 75 | +fossil amend $HASHB -branch amended-branch | |
| 76 | 76 | test amend-branch-1.1 {[regexp {tags:\s+amended-branch} $RESULT]} |
| 77 | 77 | fossil branch ls |
| 78 | 78 | test amend-branch-1.2 {[string first "* amended-branch" $RESULT] != -1} |
| 79 | 79 | fossil tag list |
| 80 | 80 | test amend-branch-1.3 {[string first amended-branch $RESULT] != -1} |
| 81 | -fossil tag list --raw $UUIDB | |
| 81 | +fossil tag list --raw $HASHB | |
| 82 | 82 | test amend-branch-1.4 {[string first "branch=amended-branch" $RESULT] != -1} |
| 83 | 83 | test amend-branch-1.5 {[string first "sym-amended-branch" $RESULT] != -1} |
| 84 | 84 | fossil timeline -n 1 |
| 85 | 85 | test amend-branch-1.6 {[string match {*Move*to*branch*amended-branch*} $RESULT]} |
| 86 | 86 | |
| @@ -102,84 +102,84 @@ | ||
| 102 | 102 | #1234 #1234 |
| 103 | 103 | 1234 1234 |
| 104 | 104 | 123456 #123456 |
| 105 | 105 | } { |
| 106 | 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 | |
| 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 | 110 | test amend-bgcolor-1.$tc.b {[string first "bgcolor=$result" $RESULT] != -1} |
| 111 | 111 | fossil timeline -n 1 |
| 112 | 112 | test amend-bgcolor-1.$tc.c { |
| 113 | 113 | [string match "*Change*background*color*to*\"$result\"*" $RESULT] |
| 114 | 114 | } |
| 115 | 115 | if {[artifact_from_timeline $RESULT artid]} { |
| 116 | 116 | fossil artifact $artid |
| 117 | 117 | test amend-bgcolor-1.$tc.d { |
| 118 | - [string match "*T +bgcolor $UUID* $result*" $RESULT] | |
| 118 | + [string match "*T +bgcolor $HASH* $result*" $RESULT] | |
| 119 | 119 | } |
| 120 | 120 | } else { |
| 121 | 121 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 122 | 122 | test amend-bgcolor-1.$tc.d false |
| 123 | 123 | } |
| 124 | 124 | } |
| 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 | |
| 128 | 128 | test amend-bgcolor-2.2 { |
| 129 | 129 | [string first "bgcolor=" $RESULT] == -1 && |
| 130 | 130 | [string first "bgcolor" $RESULT] != -1 |
| 131 | 131 | } |
| 132 | 132 | fossil timeline -n 1 |
| 133 | 133 | test amend-bgcolor-2.3 {[string match "*Cancel*background*color.*" $RESULT]} |
| 134 | 134 | if {[artifact_from_timeline $RESULT artid]} { |
| 135 | 135 | 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]} | |
| 137 | 137 | } else { |
| 138 | 138 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 139 | 139 | test amend-bgcolor-2.4 false |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | ######################################## |
| 143 | 143 | # Test: -branchcolor # |
| 144 | 144 | ######################################## |
| 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]} { | |
| 148 | 148 | test amend-branchcolor.setup false |
| 149 | 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 | |
| 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 | 154 | test amend-branchcolor-1.2 {[string first "bgcolor=yellow" $RESULT] != -1} |
| 155 | 155 | fossil timeline -n 1 |
| 156 | 156 | test amend-branchcolor-1.3 { |
| 157 | 157 | [string match {*Change*branch*background*color*to*"yellow".*} $RESULT] |
| 158 | 158 | } |
| 159 | 159 | if {[regexp {(?x)[0-9]{2}(?::[0-9]{2}){2}\s+\[([0-9a-f]+)]} $RESULT m artid]} { |
| 160 | 160 | fossil artifact $artid |
| 161 | 161 | test amend-branchcolor-1.4 { |
| 162 | - [string match "*T \*bgcolor $UUID2* yellow*" $RESULT] | |
| 162 | + [string match "*T \*bgcolor $HASH2* yellow*" $RESULT] | |
| 163 | 163 | } |
| 164 | 164 | } else { |
| 165 | 165 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 166 | 166 | test amend-branchcolor-1.4 false |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | -set UUIDN UUIDN | |
| 169 | +set HASHN HASHN | |
| 170 | 170 | write_file datafile "brclr" |
| 171 | 171 | fossil commit -m "brclr" |
| 172 | -if {![uuid_from_commit $RESULT UUIDN]} { | |
| 172 | +if {![uuid_from_commit $RESULT HASHN]} { | |
| 173 | 173 | test amend-branchcolor-propagating.setup false |
| 174 | 174 | } |
| 175 | 175 | write_file datafile "bc1" |
| 176 | 176 | fossil commit -m "mc1" |
| 177 | 177 | write_file datafile "bc2" |
| 178 | 178 | 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]} | |
| 181 | 181 | fossil tag ls --raw current |
| 182 | 182 | test amend-branchcolor-2.2 {[string first "bgcolor=#deadbe" $RESULT] != -1} |
| 183 | 183 | fossil timeline -n 1 |
| 184 | 184 | test amend-branchcolor-2.3 { |
| 185 | 185 | [string match {*Change*branch*background*color*to*"#deadbe".*} $RESULT] |
| @@ -186,13 +186,13 @@ | ||
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | ######################################## |
| 189 | 189 | # Test: -author # |
| 190 | 190 | ######################################## |
| 191 | -fossil amend $UUID -author author-test | |
| 191 | +fossil amend $HASH -author author-test | |
| 192 | 192 | test amend-author-1.1 {[string match {*comment:*(user:*author-test)*} $RESULT]} |
| 193 | -fossil tag ls --raw $UUID | |
| 193 | +fossil tag ls --raw $HASH | |
| 194 | 194 | test amend-author-1.2 {[string first "user=author-test" $RESULT] != -1} |
| 195 | 195 | fossil timeline -n 1 |
| 196 | 196 | test amend-author-1.3 {[string match {*Change*user*to*"author-test".*} $RESULT]} |
| 197 | 197 | |
| 198 | 198 | ######################################## |
| @@ -200,13 +200,13 @@ | ||
| 200 | 200 | ######################################## |
| 201 | 201 | set timestamp [clock scan yesterday] |
| 202 | 202 | set date [clock format $timestamp -format "%Y-%m-%d" -gmt 1] |
| 203 | 203 | set time [clock format $timestamp -format "%H:%M:%S" -gmt 1] |
| 204 | 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 | |
| 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 | 208 | test amend-date-1.2 {[string first "date=$datetime" $RESULT] != -1} |
| 209 | 209 | fossil timeline -n 1 |
| 210 | 210 | test amend-date-1.3 {[string match "*Timestamp*$date*$time*" $RESULT]} |
| 211 | 211 | set badformats { |
| 212 | 212 | "%+" |
| @@ -217,67 +217,67 @@ | ||
| 217 | 217 | } |
| 218 | 218 | set sc 0 |
| 219 | 219 | foreach badformat $badformats { |
| 220 | 220 | incr sc |
| 221 | 221 | set datetime [clock format $timestamp -format $badformat -gmt 1] |
| 222 | - fossil amend $UUIDINIT -date $datetime -expectError | |
| 222 | + fossil amend $HASHINIT -date $datetime -expectError | |
| 223 | 223 | test amend-date-2.$sc {[string first "YYYY-MM-DD HH:MM:SS" $RESULT] != -1} |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | ######################################## |
| 227 | 227 | # Test: -hide # |
| 228 | 228 | ######################################## |
| 229 | -set UUIDH UUIDH | |
| 229 | +set HASHH HASHH | |
| 230 | 230 | fossil revert |
| 231 | 231 | fossil update trunk |
| 232 | 232 | fossil branch new tohide current |
| 233 | -if {![uuid_from_branch $RESULT UUIDH]} { | |
| 233 | +if {![uuid_from_branch $RESULT HASHH]} { | |
| 234 | 234 | test amend-hide-setup false |
| 235 | 235 | } |
| 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 | |
| 239 | 239 | test amend-hide-1.2 {[string first "hidden" $RESULT] != -1} |
| 240 | 240 | fossil timeline -n 1 |
| 241 | 241 | test amend-hide-1.3 {[string match {*Add*propagating*"hidden".*} $RESULT]} |
| 242 | 242 | |
| 243 | 243 | ######################################## |
| 244 | 244 | # Test: -close # |
| 245 | 245 | ######################################## |
| 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]} { | |
| 249 | 249 | test amend-close.setup false |
| 250 | 250 | } |
| 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]} | |
| 254 | 254 | test amend-close-1.1.b { |
| 255 | 255 | [string match "*comment:*Create*new*branch*named*\"cllf\"*" $RESULT] |
| 256 | 256 | } |
| 257 | -fossil tag ls --raw $UUIDC | |
| 257 | +fossil tag ls --raw $HASHC | |
| 258 | 258 | test amend-close-1.2 {[string first "closed" $RESULT] != -1} |
| 259 | 259 | fossil timeline -n 1 |
| 260 | 260 | test amend-close-1.3 {[string match {*Mark*"Closed".*} $RESULT]} |
| 261 | 261 | write_file datafile "cllf" |
| 262 | 262 | fossil commit -m "should fail" -expectError |
| 263 | 263 | test amend-close-2 {[string first "closed leaf" $RESULT] != -1} |
| 264 | 264 | |
| 265 | -set UUID3 UUID3 | |
| 265 | +set HASH3 HASH3 | |
| 266 | 266 | fossil revert |
| 267 | 267 | fossil update trunk |
| 268 | 268 | write_file datafile "cb" |
| 269 | 269 | fossil commit -m "closed-branch" --branch "closebranch" |
| 270 | -if {![uuid_from_commit $RESULT UUID3]} { | |
| 270 | +if {![uuid_from_commit $RESULT HASH3]} { | |
| 271 | 271 | test amend-close-3.setup false |
| 272 | 272 | } |
| 273 | 273 | write_file datafile "b1" |
| 274 | 274 | fossil commit -m "m1" |
| 275 | 275 | write_file datafile "b2" |
| 276 | 276 | 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]} | |
| 279 | 279 | fossil tag ls --raw current |
| 280 | 280 | test amend-close-3.2 {[string first "closed" $RESULT] != -1} |
| 281 | 281 | fossil timeline -n 1 |
| 282 | 282 | test amend-close-3.3 { |
| 283 | 283 | [string match "*Add*propagating*\"closed\".*" $RESULT] |
| @@ -310,96 +310,96 @@ | ||
| 310 | 310 | append t1exp ", $res" |
| 311 | 311 | append t2exp "sym-$res*" |
| 312 | 312 | append t3exp "Add*tag*\"$res\".*" |
| 313 | 313 | append t5exp "Cancel*tag*\"$res\".*" |
| 314 | 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 | |
| 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 | 318 | test amend-tag-$tc.2 {[string match $t2exp $RESULT]} |
| 319 | 319 | fossil timeline -n 1 |
| 320 | 320 | test amend-tag-$tc.3 {[string match $t3exp $RESULT]} |
| 321 | - eval fossil amend $UUID $cancels | |
| 321 | + eval fossil amend $HASH $cancels | |
| 322 | 322 | test amend-tag-$tc.4 {![string match "*tags:*$t1exp*" $RESULT]} |
| 323 | 323 | fossil timeline -n 1 |
| 324 | 324 | test amend-tag-$tc.5 {[string match $t5exp $RESULT]} |
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | ######################################## |
| 328 | 328 | # Test: -comment # |
| 329 | 329 | ######################################## |
| 330 | 330 | proc prep-test {comment content} { |
| 331 | - global UUID RESULT | |
| 331 | + global HASH RESULT | |
| 332 | 332 | |
| 333 | 333 | fossil revert |
| 334 | 334 | fossil update trunk |
| 335 | 335 | write_file datafile $comment |
| 336 | 336 | fossil commit -m $content |
| 337 | - if {![uuid_from_commit $RESULT UUID]} { | |
| 338 | - set UUID "" | |
| 337 | + if {![uuid_from_commit $RESULT HASH]} { | |
| 338 | + set HASH "" | |
| 339 | 339 | } |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | -proc test-comment {name UUID comment} { | |
| 342 | +proc test-comment {name HASH comment} { | |
| 343 | 343 | global VERBOSE RESULT |
| 344 | 344 | |
| 345 | 345 | test amend-comment-$name.1 { |
| 346 | - [string match "*uuid:*$UUID*comment:*$comment*" $RESULT] | |
| 346 | + [string match "*uuid:*$HASH*comment:*$comment*" $RESULT] | |
| 347 | 347 | } |
| 348 | 348 | fossil timeline -n 1 |
| 349 | 349 | if {[artifact_from_timeline $RESULT artid]} { |
| 350 | 350 | fossil artifact $artid |
| 351 | 351 | 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] | |
| 353 | 353 | } |
| 354 | 354 | } else { |
| 355 | 355 | if {$VERBOSE} { protOut "No artifact found in timeline output: $RESULT" } |
| 356 | 356 | test amend-comment-$name.2 false |
| 357 | 357 | } |
| 358 | 358 | fossil timeline -n 1 |
| 359 | 359 | 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] | |
| 361 | 361 | } |
| 362 | - fossil info $UUID | |
| 362 | + fossil info $HASH | |
| 363 | 363 | test amend-comment-$name.4 { |
| 364 | - [string match "*uuid:*$UUID*comment:*$comment*" $RESULT] | |
| 364 | + [string match "*uuid:*$HASH*comment:*$comment*" $RESULT] | |
| 365 | 365 | } |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | 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" | |
| 371 | 371 | |
| 372 | 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" | |
| 373 | +fossil amend $HASH -m "revised revision 2 with -m" | |
| 374 | +test-comment 2 $HASH "revised revision 2 with -m" | |
| 375 | 375 | |
| 376 | 376 | prep-test "revision 3" "revision 3" |
| 377 | 377 | 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" | |
| 380 | 380 | |
| 381 | 381 | prep-test "revision 4" "revision 4" |
| 382 | 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" | |
| 383 | +fossil amend $HASH -M commitmsg | |
| 384 | +test-comment 4 $HASH "revision 4 revised with -M" | |
| 385 | 385 | |
| 386 | 386 | prep-test "final comment" "final content" |
| 387 | 387 | if {[catch {exec which ed} result]} { |
| 388 | 388 | 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" | |
| 390 | 390 | } else { |
| 391 | 391 | fossil settings editor "ed -s" |
| 392 | 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 | |
| 393 | + fossil_maybe_answer "a\n$comment\n.\nw\nq\n" amend $HASH --edit-comment | |
| 394 | + test-comment 5 $HASH $comment | |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | ######################################## |
| 398 | -# Test: NULL UUID # | |
| 398 | +# Test: NULL hash # | |
| 399 | 399 | ######################################## |
| 400 | 400 | fossil amend {} -close -expectError |
| 401 | 401 | test amend-null-uuid {$CODE && [string first "no such check-in" $RESULT] != -1} |
| 402 | 402 | |
| 403 | 403 | ############################################################################### |
| 404 | 404 | |
| 405 | 405 | test_cleanup |
| 406 | 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 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 |
+1
-1
| --- www/concepts.wiki | ||
| +++ www/concepts.wiki | ||
| @@ -80,11 +80,11 @@ | ||
| 80 | 80 | Communication between repositories is via HTTP. Remote |
| 81 | 81 | repositories are identified by URL. You can also point a web browser |
| 82 | 82 | at a repository and get human-readable status, history, and tracking |
| 83 | 83 | information about the project. |
| 84 | 84 | |
| 85 | -<h3>2.1 Identification Of Artifacts</h3> | |
| 85 | +<h3><a id="artifacts"></a>2.1 Identification Of Artifacts</h3> | |
| 86 | 86 | |
| 87 | 87 | A particular version of a particular file is called an "artifact". Each |
| 88 | 88 | artifact has a universally unique name which is the <a |
| 89 | 89 | href="http://en.wikipedia.org/wiki/SHA1">SHA1</a> or <a |
| 90 | 90 | href="http://en.wikipedia.org/wiki/SHA3">SHA3-256</a> hash of the |
| 91 | 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>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 |
+2
-2
| --- www/fiveminutes.wiki | ||
| +++ www/fiveminutes.wiki | ||
| @@ -58,12 +58,12 @@ | ||
| 58 | 58 | <h2>Compare two revisions of a file</h2> |
| 59 | 59 | <p>If you wish to compare the last revision of a file and its checked out version |
| 60 | 60 | in your work directory:</p> |
| 61 | 61 | <p>fossil gdiff myfile.c</p> |
| 62 | 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 | |
| 63 | +<p>fossil finfo myfile: Note the first hash, which is the hash of the commit | |
| 64 | 64 | 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> | |
| 66 | 66 | <h2>Cancel changes and go back to previous revision</h2> |
| 67 | 67 | <p>fossil revert myfile.c</p> |
| 68 | 68 | <p>Fossil does not prompt when reverting a file. It simply reminds the user about the |
| 69 | 69 | "undo" command, just in case the revert was a mistake.</p> |
| 70 | 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 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 |
+16
-14
| --- www/json-api/api-artifact.md | ||
| +++ www/json-api/api-artifact.md | ||
| @@ -14,11 +14,11 @@ | ||
| 14 | 14 | |
| 15 | 15 | Returns information about checkin artifacts (commits). |
| 16 | 16 | |
| 17 | 17 | **Status:** implemented 201110xx |
| 18 | 18 | |
| 19 | -**Request:** `/json/artifact/COMMIT_UUID` | |
| 19 | +**Request:** `/json/artifact/COMMIT_HASH` | |
| 20 | 20 | |
| 21 | 21 | **Required permissions:** "o" (was "h" prior to 20120408) |
| 22 | 22 | |
| 23 | 23 | **Response payload example: (CHANGED SIGNIFICANTLY ON 20120713)** |
| 24 | 24 | |
| @@ -30,43 +30,44 @@ | ||
| 30 | 30 | "isLeaf":false, |
| 31 | 31 | "user":"drh", |
| 32 | 32 | "comment":"Merge wideAnnotateUser and jsonWarnings into trunk.", |
| 33 | 33 | "timestamp":1330090810, |
| 34 | 34 | "parents":[ |
| 35 | - // 1st entry is primary parent UUID: | |
| 35 | + // 1st entry is primary parent hash: | |
| 36 | 36 | "3a44f95f40a193739aaafc2409f155df43e74a6f", |
| 37 | - // Remaining entries are merged-in branch UUIDs: | |
| 37 | + // Remaining entries are merged-in branch hashes: | |
| 38 | 38 | "86f6e675eb3f8761d70d8b82b052ce2b297fffd2",\ |
| 39 | 39 | "dbf4ecf414881c9aad6f4f125dab9762589ef3d7"\ |
| 40 | 40 | ], |
| 41 | 41 | "tags":["trunk"], |
| 42 | 42 | "files":[{ |
| 43 | 43 | "name":"src/diff.c", |
| 44 | - // BLOB uuids, NOT commit UUIDs: | |
| 44 | + // BLOB hashes, NOT commit hashes: | |
| 45 | 45 | "uuid":"78c74c3b37e266f8f7e570d5cf476854b7af9d76", |
| 46 | 46 | "parent":"b1fa7e636cf4e7b6ed20bba2d2680397f80c096a", |
| 47 | 47 | "state":"modified", |
| 48 | 48 | "downloadPath":"/raw/src/diff.c?name=78c74c3b37e266f8f7e570d5cf476854b7af9d76" |
| 49 | 49 | }, |
| 50 | 50 | ...] |
| 51 | 51 | } |
| 52 | 52 | ``` |
| 53 | 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 | |
| 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 | 56 | file. In the case of a merge there may be essentially an arbitrary |
| 57 | 57 | number. The first entry in the list is the "primary" parent. The primary |
| 58 | 58 | parent is the parent which was not pulled in via a merge operation. The |
| 59 | 59 | ordering of remaining entries is unspecified and may even change between |
| 60 | 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 | |
| 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 | 63 | and B in the following entries (in an unspecified, and possibly |
| 64 | 64 | unstable, order). |
| 65 | 65 | |
| 66 | 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). | |
| 67 | +refer to raw blob hashes, not commit (a.k.a. check-in) hashes. See also | |
| 68 | +[the UUID vs. Hash discussion][uvh]. | |
| 68 | 69 | |
| 69 | 70 | <a id="file"></a> |
| 70 | 71 | # File Artifacts |
| 71 | 72 | |
| 72 | 73 | Fetches information about file artifacts. |
| @@ -77,11 +78,11 @@ | ||
| 77 | 78 | |
| 78 | 79 | **Status:** implemented 20111020 |
| 79 | 80 | |
| 80 | 81 | **Required permissions:** "o" |
| 81 | 82 | |
| 82 | -**Request:** `/json/artifact/FILE_UUID` | |
| 83 | +**Request:** `/json/artifact/FILE_HASH` | |
| 83 | 84 | |
| 84 | 85 | **Request options:** |
| 85 | 86 | |
| 86 | 87 | - `format=(raw|html|none)` (default=none). If set, the contents of the |
| 87 | 88 | artifact are included if they are text, else they are not (JSON does |
| @@ -98,13 +99,13 @@ | ||
| 98 | 99 | **Response payload example: (CHANGED SIGNIFICANTLY ON 20120713)** |
| 99 | 100 | |
| 100 | 101 | ```json |
| 101 | 102 | { |
| 102 | 103 | "type":"file", |
| 103 | -"name":"same name specified as FILE_UUID argument", | |
| 104 | +"name":"same name specified as FILE_HASH argument", | |
| 104 | 105 | "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.", | |
| 106 | 107 | "checkins":[{ |
| 107 | 108 | "name":"src/json_detail.h", |
| 108 | 109 | "timestamp":1319058803, |
| 109 | 110 | "comment":"...", |
| 110 | 111 | "user":"stephan", |
| @@ -121,21 +122,21 @@ | ||
| 121 | 122 | } |
| 122 | 123 | ``` |
| 123 | 124 | |
| 124 | 125 | The "checkins" array lists all checkins which include this file, and a |
| 125 | 126 | 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. | |
| 127 | 128 | |
| 128 | 129 | <a id="wiki"></a> |
| 129 | 130 | # Wiki Artifacts |
| 130 | 131 | |
| 131 | 132 | Returns information about wiki artifacts. |
| 132 | 133 | |
| 133 | 134 | **Status:** implemented 20111020, fixed to return the requested version |
| 134 | 135 | (instead of the latest) on 20120302. |
| 135 | 136 | |
| 136 | -**Request:** `/json/artifact/WIKI_UUID` | |
| 137 | +**Request:** `/json/artifact/WIKI_HASH` | |
| 137 | 138 | |
| 138 | 139 | **Required permissions:** "j" |
| 139 | 140 | |
| 140 | 141 | **Options:** |
| 141 | 142 | |
| @@ -149,5 +150,6 @@ | ||
| 149 | 150 | |
| 150 | 151 | **Response payload example:** |
| 151 | 152 | |
| 152 | 153 | Currently the same as [`/json/wiki/get`](api-wiki.md#get). |
| 153 | 154 | |
| 155 | +[uvh]: ../hashes.md#uvh | |
| 154 | 156 |
| --- 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 |
+3
-3
| --- www/json-api/api-diff.md | ||
| +++ www/json-api/api-diff.md | ||
| @@ -33,12 +33,12 @@ | ||
| 33 | 33 | } |
| 34 | 34 | ``` |
| 35 | 35 | |
| 36 | 36 | TODOs: |
| 37 | 37 | |
| 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 | |
| 40 | 40 | provided, a diff of the manifests is returned. (That should be |
| 41 | 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 | |
| 42 | +- If hashes from two different types of artifacts are given, results | |
| 43 | 43 | are unspecified. Garbage in, garbage out, and all that. |
| 44 | 44 | - For file diffs, add the file name(s) to the response payload. |
| 45 | 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 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 |
+5
-4
| --- www/json-api/api-tag.md | ||
| +++ www/json-api/api-tag.md | ||
| @@ -47,12 +47,12 @@ | ||
| 47 | 47 | "raw":false, |
| 48 | 48 | "appliedTo":"626ab2f3743543122cc11bc082a0603d2b5b2b1b" |
| 49 | 49 | } |
| 50 | 50 | ``` |
| 51 | 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 | |
| 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 | 54 | the client. |
| 55 | 55 | |
| 56 | 56 | <a id="cancel"></a> |
| 57 | 57 | # Cancel Tag |
| 58 | 58 | |
| @@ -99,12 +99,13 @@ | ||
| 99 | 99 | - `limit=int` (defalt=0) Limits the number of results (0=no limit). |
| 100 | 100 | Since they are ordered from oldest to newest, the newest N results |
| 101 | 101 | will be returned. |
| 102 | 102 | - `type=string` (default=`*`) Searches only for the given type of |
| 103 | 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 | |
| 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 | |
| 106 | 107 | true, the "name" property is interpretted as-is. If it is false, the |
| 107 | 108 | name is automatically prepended with "sym-" (meaning a branch). |
| 108 | 109 | (FIXME: the current semantics are confusing and hard to remember. |
| 109 | 110 | Re-do them.) |
| 110 | 111 | |
| 111 | 112 |
| --- 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 |
+9
-8
| --- www/json-api/api-timeline.md | ||
| +++ www/json-api/api-timeline.md | ||
| @@ -79,11 +79,11 @@ | ||
| 79 | 79 | "comment":"Added /json/timeline/ci showFiles to ajax test page.", |
| 80 | 80 | "user":"stephan", |
| 81 | 81 | "isLeaf":true, |
| 82 | 82 | "bgColor":null, /* not quite sure why this is null? */ |
| 83 | 83 | "type":"ci", |
| 84 | - "parents": ["primary parent UUID", "...other parent UUIDs"], | |
| 84 | + "parents": ["primary parent hash", "...other parent hashes"], | |
| 85 | 85 | "tags":["json"], |
| 86 | 86 | "files":[{ |
| 87 | 87 | "name":"ajax/index.html", |
| 88 | 88 | "uuid":"9f00773a94cea6191dc3289aa24c0811b6d0d8fe", |
| 89 | 89 | "parent":"50e337c33c27529e08a7037a8679fb84b976ad0b", |
| @@ -101,12 +101,12 @@ | ||
| 101 | 101 | |
| 102 | 102 | **Request options:** |
| 103 | 103 | |
| 104 | 104 | - `files=bool` toggles the addition of a "files" array property which |
| 105 | 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).\ | |
| 106 | + including their hash, previous hash, and state change type | |
| 107 | + (modified, added, or removed). ([“uuid” here means hash][uvh])\ | |
| 108 | 108 | CLI mode: `--show-files|-f` |
| 109 | 109 | - `tag|branch=string` selects only entries with the given tag or "close |
| 110 | 110 | to" the given branch. Only one of these may be specified and if both |
| 111 | 111 | are specified, which one takes precedence is unspecified. If the |
| 112 | 112 | given tag/branch does not exist, an error response is generated. The |
| @@ -172,15 +172,15 @@ | ||
| 172 | 172 | "ticketUuid":"b64435dba9cceb709bd54fbc5883884d73f93491" |
| 173 | 173 | },...] |
| 174 | 174 | } |
| 175 | 175 | ``` |
| 176 | 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 | |
| 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 | 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. | |
| 180 | +hash. We may want to swap `uuid` to mean the ticket hash and change `uuid` | |
| 181 | +to `commitHash`. | |
| 182 | 182 | |
| 183 | 183 | <a id="wiki"></a> |
| 184 | 184 | # Wiki Timeline |
| 185 | 185 | |
| 186 | 186 | **Status:** implemented 201109xx |
| @@ -206,8 +206,9 @@ | ||
| 206 | 206 | },...] |
| 207 | 207 | } |
| 208 | 208 | ``` |
| 209 | 209 | |
| 210 | 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 | |
| 211 | +`/json/wiki/get?uuid=...` to fetch the raw page and the hash of the | |
| 212 | 212 | parent version. |
| 213 | 213 | |
| 214 | +[uvh]: ../hashes.md#uvh | |
| 214 | 215 |
| --- 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 |
+2
-1
| --- www/json-api/conventions.md | ||
| +++ www/json-api/conventions.md | ||
| @@ -584,11 +584,12 @@ | ||
| 584 | 584 | - `FOSSIL-3001`: Invalid argument/parameter type(s) or value(s) in |
| 585 | 585 | request |
| 586 | 586 | - `FOSSIL-3002`: Required argument(s)/parameter(s) missing from |
| 587 | 587 | request |
| 588 | 588 | - `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.) | |
| 590 | 591 | - `FOSSIL-3004`: Unresolved resource identifier. A branch/tag/uuid |
| 591 | 592 | provided by client code could not be resolved. This is a special |
| 592 | 593 | case of #3006. |
| 593 | 594 | - `FOSSIL-3005`: Resource already exists and overwriting/replacing is |
| 594 | 595 | not allowed. e.g. trying to create a wiki page or user which already |
| 595 | 596 |
| --- 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 |