[darcs-users] darcs patch: Add Repository.checkPristineAgainstSlurpy. (and 11 more)

me at mornfall.net me at mornfall.net
Tue Sep 2 03:05:05 UTC 2008


Hi again.

This bundle has the new, shiny and all that fix for issue971. There are two
caveats:

1) We still introduce a failing test, pending_has_conflicts.pl: the new repair
manages to somehow fail when an incorrect (conflicted) pending is present in
the tree. Interestingly, this only happens in oldfashioned repositories. I'm
currently still at loss as to why this happens.

2) I'm not exactly proud of readHashedPristineRoot. However, I, at this moment,
lack the creativity to come up with anything better.

Also note, that this bundle includes the previous one, since there are some
dependencies on that. Now, some notes on implementation:

I have left most of the previous incarnation of Repair.lhs intact, since I have
figured, that the code, under given setting, already has the intended effect:
although a direct hash comparison might be more reliable and more efficient
than smart_diff, I haven't done that yet, partly on the grounds of disliking my
new readHashedPristineRoot.

Now, replacePristineFromSlurpy, as it's been written before, does the job of
updating the root pointer in the hashed case, and doing a rollout of new
pristine for the old-fashioned case. Note that we currently, as the code goes,
can't just update the root pointer, as the slurpy might contain unwritten
changes (update_slurpy is not guaranteed to have been called after the last
patch has been applied). Moreover, I think the code is simpler like this, and
about just as efficient.

That's it for now I think.

Yours,
   Petr.

Tue Aug 12 02:50:39 CEST 2008  me at mornfall.net
  * Add Repository.checkPristineAgainstSlurpy.

Tue Aug 12 02:54:23 CEST 2008  me at mornfall.net
  * First working (albeit slow) version of repair that uses hashed newpristine.

Tue Aug 12 03:06:03 CEST 2008  me at mornfall.net
  * Only "update" (sync to disk) the slurpy every 100 patches.

Tue Aug 12 03:27:20 CEST 2008  me at mornfall.net
  * Fix checkPristineAgainst{Cwd,Slurpy}: we ignored files missing in pristine.
  
  Add LookForAdds to smart_diff options to fix that and also throw in IgnoreTimes
  for a good measure and extra paranoia.

Mon Sep  1 17:03:24 CEST 2008  me at mornfall.net
  * Resolve conflicts.

Tue Sep  2 02:44:02 CEST 2008  me at mornfall.net
  * Rename hashSlurped, slurpHashed and syncHashed to writeHashedPristine, slurpHashedPristine and syncHashedPristine, respectively.

Tue Sep  2 03:04:05 CEST 2008  me at mornfall.net
  * Change type of subdir parameter in Cache/HashedIO functions from String to HashedDir.
  
  This refactor should make calling the Cache and HashedIO functions safer: you
  should be no longer able to swap hash and subdir accidentally in the call site,
  or mistype the subdirectory name.

Tue Sep  2 04:05:32 CEST 2008  me at mornfall.net
  * Haddock the {slurp,write,sync}HashedPristine functions in HashedIO.

Tue Sep  2 04:42:54 CEST 2008  me at mornfall.net
  * Add Repository.replacePristineFromSlurpy.

Tue Sep  2 04:46:20 CEST 2008  me at mornfall.net
  * Make the "hashed" repair use pristine.hashed for its work.
  
  We rely on HashedIO reliability to simplify repair to work inside the existing
  pristine.hashed. When running on old-fashioned (darcs 1) repositories, we
  temporarily create pristine.hashed, use it to check (and possibly replace) the
  old-fashioned pristine and finally we remove it again.

Tue Sep  2 04:49:43 CEST 2008  me at mornfall.net
  * Add HashedRepo.readHashedPristineRoot.

Tue Sep  2 04:50:40 CEST 2008  me at mornfall.net
  * Make clean_hashdir take a list of root hashes and use it in repair.
  
  We use this functionality to keep two possibly distinct pristine trees while 
  repairing, both living in a single pristine.hashed directory.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 88979 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080902/1c3e7c1b/attachment-0001.bin 


More information about the darcs-users mailing list