[darcs-users] TortoiseDarcs and Darcs 2 Hashed Repos

David Roundy daveroundy at gmail.com
Thu Oct 9 16:57:58 UTC 2008


The root of the pristine filesystem is given in the first line of
_darcs/hashed_inventory, as in

pristine:0000001784-1b45f96045046846a02137385b25df2e3ac735c6e19ba65a00aba6ba66f848fe
Starting with inventory:
0000008284-f34423512b5b13640827e81e07a4a91aa366995d9f2796cf73f0c7b6e094be28
[TAG 2.1.0

Then you just look at the file

pristine.hashed/0000001784-1b45f96045046846a02137385b25df2e3ac735c6e19ba65a00aba6ba66f848fe

which is probably gzipped, and it has contents such as:

file:
hpc.README
0000001139-9b29de9930f2e19ab1ef4042919a34c24dfc44bc544ef6fc9c1b20a2d0b6bf32
directory:
bugs
0000001653-efca287626998ea81d76c0a2250e7a1f6be37a29afd85d1ddd8f2b100c95bcbe
directory:
release
0000000390-d265817495a1974563c92912ca4a688aab87e10517ed6750efd7f02b9e49f1c3
directory:
tools
0000000878-abaa89d56184b13152b49cd23abea111cb7c4fd21100516991a9a28257df8e38

which I think is pretty much self-explanatory.  The timestamp
associated with each file is just the timestamp of the file in
pristine.hashed that contains its contents.

David
On Thu, Oct 9, 2008 at 12:53 PM, Grant Husbands
<darcsusers at grant.x43.net> wrote:
> How feasible would it be for Darcs 2 to store a
> filename->(hash,timestamp) mapping in a text file somewhere in the
> _darcs folder?  It would be very useful for TortoiseDarcs.
>
> We're willing to do the necessary work, but we would really appreciate
> some hints as to where's best to insert the necessary code and whether
> it's a good idea and would be accepted.
>
> Background:
> We want to make TortoiseDarcs (the Windows Explorer darcs interface)
> work with Darcs 2 Hashed-format repos. This might sound familiar, as we
> aren't the first to ask questions in this area.
>
> Now, the current TortoiseDarcs supports the darcs 1 pristine cache,
> which has the advantage that we can trivially find the pristine copy of
> a file and can compare the modified time of it to the modified time of
> the associated file, to know whether a file might have changed.
>
> If it's at all possible, we want to avoid spawning a copy of Darcs each
> time we want a file-listing in Explorer, which is why it would be ideal
> for darcs to maintain the information in an easily-accessible file. The
> timestamp is so that TortoiseDarcs can compare that to the modification
> time of the file in the working directory and avoid having TortoiseDarcs
> read all of the files just to find out whether they're likely to have
> changed.
>
> Is there a better way?


More information about the darcs-users mailing list