[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Define PRISTINE.checksum as always being SHA-1

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Fri, 19 Feb 2010 09:34:25 +0000

Bert and I were just discussing the checksums in PRISTINE. We think its
primary key should be SHA-1 always. A secondary index can be built on
the MD5 column if required.

Can we patch the docco like this?

[[[
* subversion/libsvn_wc/wc-metadata.sql
  (PRISTINE): Define "checksum" as always being SHA-1.
    Document the uniqueness properties of both checksum fields.
    Document when "md5_checksum" can be null.
]]]

[[[
Index: subversion/libsvn_wc/wc-metadata.sql
===================================================================
--- subversion/libsvn_wc/wc-metadata.sql (revision 911752)
+++ subversion/libsvn_wc/wc-metadata.sql (working copy)
@@ -172,7 +172,9 @@
    and ACTUAL_NODE tables.
  */
 CREATE TABLE PRISTINE (
- /* ### the hash algorithm (MD5 or SHA-1) is encoded in this value */
+ /* The SHA-1 checksum of the pristine text. This is a unique key. The
+ SHA-1 checksum of a pristine text is assumed to be unique among all
+ pristine texts referenced from this database. */
   checksum TEXT NOT NULL PRIMARY KEY,
 
   /* ### enumerated values specifying type of compression. NULL implies
@@ -189,7 +191,8 @@
   refcount INTEGER NOT NULL,
 
   /* Alternative MD5 checksum used for communicating with older
- repositories. */
+ repositories. Not guaranteed to be unique among table rows.
+ NULL if not (yet) calculated. */
   md5_checksum TEXT
   );
]]]

- Julian
Received on 2010-02-19 10:35:03 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.