[darcs-users] Hashed pristine format

Kari Hoijarvi hoijarvi at me.wustl.edu
Fri May 23 15:14:21 UTC 2008


For those who understand hashed pristine format:

I'm upgrading TortoiseDarcs. So far I have done some cleanup, x64 port, 
parts of incompatibilities, fixed minor issues etc.

Now is the time to tackle hashed repositories.

Last time I read anything like Haskell was in 1985 when I played a 
little with SASL, and it really does not help. darcs show files performs 
what I want, but I get lost while trying to follow "list_slurpy_files". 
I'd have to take Haskell seriously to be able to decode it, and I have 
good enough time trying to work the 18000 lines of tortoise code.

So, if somebody could describe hashed pristine format, I'd be grateful.

Even better, if somebody would update "darcs show files" by having the 
following fields for each record:

filename, hashed name, modification codes, timestamp

filename
hashed name, so that I can get not-modified status by comparing write times

optionally:
modification codes: from _patches/pending, so I don't have to parse it.
timestamp: if you have this, might as well add. If not, don't waste time 
to do it.

My preferred format for this listing is xml. I know, it's ugly, but it 
solves encoding across the board.

For example, if you have spaces in filenames, patches/pending looks like:

addfile ./aaa\32\bbb.txt

Nothing wrong with this, but having to implement darcs character decoder 
to read filenames is not necessary. I don't know how Chinese looks in 
multi-byte character sets, and I don't want to know.

CSV sounds better, until you ask "which CSV?". MS has several versions 
of CSV, some of which are not compatible with other MS products.

Here's sample. I don't care if you use one character tags.
<files>
<file>
<name>aaa bbb.txt</name>
<pristine>0000000093-3e57ecba8a0e4cb0493346e54a3eca3b2a39b0c66568bab95f555beb338f8fe5</pristine>
<codes>added</codes>
<time>2008-05-23 07:54:54</time>
</file>
</files>

This would have the wonderful property, that you could change the 
pristine format and keep TortoiseDarcs working in the future.

Thanks, Kari



More information about the darcs-users mailing list