Fossil SCM
Use SHA3 to identify unversioned files, if the hash policy is sha3 or higher.
Commit
17525ceddb79e375e58761b055ccf169341aa1342bf3ec4098d8d917d2289eec
Parent
fd1282e685315ae…
1 file changed
+3
-3
+3
-3
| --- src/unversioned.c | ||
| +++ src/unversioned.c | ||
| @@ -119,11 +119,11 @@ | ||
| 119 | 119 | |
| 120 | 120 | db_prepare(&ins, |
| 121 | 121 | "REPLACE INTO unversioned(name,rcvid,mtime,hash,sz,encoding,content)" |
| 122 | 122 | " VALUES(:name,:rcvid,:mtime,:hash,:sz,:encoding,:content)" |
| 123 | 123 | ); |
| 124 | - sha1sum_blob(pContent, &hash); | |
| 124 | + hname_hash(pContent, 0, &hash); | |
| 125 | 125 | blob_compress(pContent, &compressed); |
| 126 | 126 | db_bind_text(&ins, ":name", zUVFile); |
| 127 | 127 | db_bind_int(&ins, ":rcvid", g.rcvid); |
| 128 | 128 | db_bind_int64(&ins, ":mtime", mtime); |
| 129 | 129 | db_bind_text(&ins, ":hash", blob_str(&hash)); |
| @@ -143,11 +143,11 @@ | ||
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | |
| 146 | 146 | /* |
| 147 | 147 | ** Check the status of unversioned file zName. "mtime" and "zHash" are the |
| 148 | -** time of last change and SHA1 hash of a copy of this file on a remote | |
| 148 | +** time of last change and hash of a copy of this file on a remote | |
| 149 | 149 | ** server. Return an integer status code as follows: |
| 150 | 150 | ** |
| 151 | 151 | ** 0: zName does not exist in the unversioned table. |
| 152 | 152 | ** 1: zName exists and should be replaced by the mtime/zHash remote. |
| 153 | 153 | ** 2: zName exists and is the same as zHash but has a older mtime |
| @@ -526,11 +526,11 @@ | ||
| 526 | 526 | @ <thead><tr> |
| 527 | 527 | @ <th> Name |
| 528 | 528 | @ <th> Age |
| 529 | 529 | @ <th> Size |
| 530 | 530 | @ <th> User |
| 531 | - @ <th> SHA1 | |
| 531 | + @ <th> Hash | |
| 532 | 532 | if( g.perm.Admin ){ |
| 533 | 533 | @ <th> rcvid |
| 534 | 534 | } |
| 535 | 535 | @ </tr></thead> |
| 536 | 536 | @ <tbody> |
| 537 | 537 |
| --- src/unversioned.c | |
| +++ src/unversioned.c | |
| @@ -119,11 +119,11 @@ | |
| 119 | |
| 120 | db_prepare(&ins, |
| 121 | "REPLACE INTO unversioned(name,rcvid,mtime,hash,sz,encoding,content)" |
| 122 | " VALUES(:name,:rcvid,:mtime,:hash,:sz,:encoding,:content)" |
| 123 | ); |
| 124 | sha1sum_blob(pContent, &hash); |
| 125 | blob_compress(pContent, &compressed); |
| 126 | db_bind_text(&ins, ":name", zUVFile); |
| 127 | db_bind_int(&ins, ":rcvid", g.rcvid); |
| 128 | db_bind_int64(&ins, ":mtime", mtime); |
| 129 | db_bind_text(&ins, ":hash", blob_str(&hash)); |
| @@ -143,11 +143,11 @@ | |
| 143 | } |
| 144 | |
| 145 | |
| 146 | /* |
| 147 | ** Check the status of unversioned file zName. "mtime" and "zHash" are the |
| 148 | ** time of last change and SHA1 hash of a copy of this file on a remote |
| 149 | ** server. Return an integer status code as follows: |
| 150 | ** |
| 151 | ** 0: zName does not exist in the unversioned table. |
| 152 | ** 1: zName exists and should be replaced by the mtime/zHash remote. |
| 153 | ** 2: zName exists and is the same as zHash but has a older mtime |
| @@ -526,11 +526,11 @@ | |
| 526 | @ <thead><tr> |
| 527 | @ <th> Name |
| 528 | @ <th> Age |
| 529 | @ <th> Size |
| 530 | @ <th> User |
| 531 | @ <th> SHA1 |
| 532 | if( g.perm.Admin ){ |
| 533 | @ <th> rcvid |
| 534 | } |
| 535 | @ </tr></thead> |
| 536 | @ <tbody> |
| 537 |
| --- src/unversioned.c | |
| +++ src/unversioned.c | |
| @@ -119,11 +119,11 @@ | |
| 119 | |
| 120 | db_prepare(&ins, |
| 121 | "REPLACE INTO unversioned(name,rcvid,mtime,hash,sz,encoding,content)" |
| 122 | " VALUES(:name,:rcvid,:mtime,:hash,:sz,:encoding,:content)" |
| 123 | ); |
| 124 | hname_hash(pContent, 0, &hash); |
| 125 | blob_compress(pContent, &compressed); |
| 126 | db_bind_text(&ins, ":name", zUVFile); |
| 127 | db_bind_int(&ins, ":rcvid", g.rcvid); |
| 128 | db_bind_int64(&ins, ":mtime", mtime); |
| 129 | db_bind_text(&ins, ":hash", blob_str(&hash)); |
| @@ -143,11 +143,11 @@ | |
| 143 | } |
| 144 | |
| 145 | |
| 146 | /* |
| 147 | ** Check the status of unversioned file zName. "mtime" and "zHash" are the |
| 148 | ** time of last change and hash of a copy of this file on a remote |
| 149 | ** server. Return an integer status code as follows: |
| 150 | ** |
| 151 | ** 0: zName does not exist in the unversioned table. |
| 152 | ** 1: zName exists and should be replaced by the mtime/zHash remote. |
| 153 | ** 2: zName exists and is the same as zHash but has a older mtime |
| @@ -526,11 +526,11 @@ | |
| 526 | @ <thead><tr> |
| 527 | @ <th> Name |
| 528 | @ <th> Age |
| 529 | @ <th> Size |
| 530 | @ <th> User |
| 531 | @ <th> Hash |
| 532 | if( g.perm.Admin ){ |
| 533 | @ <th> rcvid |
| 534 | } |
| 535 | @ </tr></thead> |
| 536 | @ <tbody> |
| 537 |