darcs

Patch 1414 implement repoXor and show it in "show repo" output

Title implement repoXor and show it in "show repo" output
Superseder Nosy List gh
Related Issues
Status accepted Assigned To
Milestone 2.10.3

Created on 2015-12-16.17:22:54 by gh, last changed 2016-01-15.11:10:25 by gh.

Files
File name Status Uploaded Type Edit Remove
implement-repoxor-and-show-it-in-_show-repo_-output-as-_weak-hash_.dpatch gh, 2016-01-13.15:50:54 application/x-darcs-patch
implement-repoxor-and-show-it-in-_show-repo_-output.dpatch dead gh, 2015-12-16.17:22:53 application/x-darcs-patch
implement-repoxor-and-show-it-in-_show-repo_-output.dpatch gh, 2015-12-22.17:42:07 application/x-darcs-patch
patch-preview.txt gh, 2015-12-16.17:22:53 text/x-darcs-patch
patch-preview.txt gh, 2015-12-22.17:42:07 text/x-darcs-patch
patch-preview.txt gh, 2016-01-13.15:50:54 text/x-darcs-patch
unnamed gh, 2015-12-16.17:22:53 text/plain
unnamed gh, 2015-12-22.17:42:07 text/plain
unnamed gh, 2016-01-13.15:50:54 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg18872 (view) Author: gh Date: 2015-12-16.17:22:53
A simple implementation of the patches' XOR discussed on darcs-users
( http://lists.osuosl.org/pipermail/darcs-users/2015-December/027153.html ).

I'm not sure of the placement of the repoXor function. In this patch
it is in Darcs.Repository.State which, from the outside, makes sense
but that module only had functions related to the pristine state up
to now.

To try it run "darcs show repo".

1 patch for repository http://darcs.net:

patch 4ffc811884bedc6f08860d58ecd41ada4f4ff2e9
Author: Guillaume Hoffmann <guillaumh@gmail.com>
Date:   Wed Dec 16 14:25:53 ART 2015
  * implement repoXor and show it in "show repo" output
Attachments
msg18876 (view) Author: gh Date: 2015-12-22.17:42:07
Modified the patch so that when --no-files is passed
to `darcs show repo` the XOR is not shown (otherwise
we break the assumption that `darcs show files --no-files`
is O(1)). Also change a comment.

1 patch for repository http://darcs.net:

patch 44d1170cca665bdd3ec891a8c7747992d12beca1
Author: Guillaume Hoffmann <guillaumh@gmail.com>
Date:   Tue Dec 22 11:39:00 ART 2015
  * implement repoXor and show it in "show repo" output
Attachments
msg18904 (view) Author: ganesh Date: 2016-01-12.18:49:33
I'm happy with this, should we apply it?

I think we should come up with a less operational external name for 
the hash - how about "weak repo hash"? "repoXor" is fine in the 
code.

> zero = SHA1 z z z z z where z = minBound -- 0 for Word32

Why not just `0 0 0 0 0`?
msg18905 (view) Author: gh Date: 2016-01-13.15:41:21
By "external name" you mean what is shown in "darcs show repo"? I'm not
super happy with the "XOR" word but at least it's short.  "Weak hash" is
not too long anyway and is indeed better.

About the use of minBound vs 0 , I remember using plainly 0 threw a
warning with GHC 7.8, but now that I'm trying again with 7.10 I no
longer have it. I'm sending an amended patch.
msg18906 (view) Author: gh Date: 2016-01-13.15:50:54
The new version, that I'm screening now.


1 patch for repository http://darcs.net:

patch 4d8a2ff4b094acc4ace791852d46749141979ba3
Author: Guillaume Hoffmann <guillaumh@gmail.com>
Date:   Wed Jan 13 12:57:49 ART 2016
  * implement repoXor and show it in "show repo" output as "Weak Hash"
Attachments
msg18910 (view) Author: gh Date: 2016-01-15.11:10:23
Accepted after we talked about it during the sprint (with Florent and
Ganesh). Also going into 2.10 branch.

We thought maybe we need to prefix this hash with some letter, or make
it an URL so that users don't confuse it with a patch hash or some other
hash.  But we ended up saying we will wait for the problems to appear
before fixing them preventively :)
History
Date User Action Args
2015-12-16 17:22:54ghcreate
2015-12-22 17:42:07ghsetfiles: + patch-preview.txt, implement-repoxor-and-show-it-in-_show-repo_-output.dpatch, unnamed
messages: + msg18876
2016-01-12 18:49:33ganeshsetmessages: + msg18904
2016-01-13 15:41:22ghsetmessages: + msg18905
2016-01-13 15:50:55ghsetfiles: + patch-preview.txt, implement-repoxor-and-show-it-in-_show-repo_-output-as-_weak-hash_.dpatch, unnamed
messages: + msg18906
2016-01-15 09:46:16ghsetstatus: needs-screening -> needs-review
2016-01-15 11:10:25ghsetstatus: needs-review -> accepted
messages: + msg18910
milestone: 2.10.3