darcs

Issue 861 make hash matching work for the new hashed repo patch file names

Title make hash matching work for the new hashed repo patch file names
Priority feature Status wont-fix
Milestone Resolved in
Superseder Nosy List Serware, btcoburn, darcs-devel, dmitry.kurochkin, kowey, markstos, mornfall, thorkilnaur, tommy
Assigned To
Topics Darcs2

Created on 2008-05-18.16:57:08 by btcoburn, last changed 2009-10-23.23:29:04 by admin.

Messages
msg4750 (view) Author: btcoburn Date: 2008-05-18.16:57:04
For example, take a patch with a traditional darcs hash of 
'20080513112149-05dcb-4c273a98eae16cc9d273f18af9907f9f2e567224' 
and a new hashed file name of 
'0000012256-2f91882e2149f43e2463fb9ee80edd67e379734ab0e395ae6cf36655a595bff0'.

The command "darcs2 changes --match 'hash ...'" should be smart enough to match
either hash type. Currently it only matches the old hash.

Tested on darcs 2.0.0 build Apr  9 2008, at 17:14:20, stable release binary for
MacOS X.
msg5458 (view) Author: markstos Date: 2008-08-13.01:58:07
Do the new hashed file names correspond to files or patches? 

I'm personally OK with rejecting this request as 'wont-fix'. Exposing one hash
to match in the UI is enough for me. If a second hash really expresses the same
thing different, it could just be confusing document and interact with. 

I'm going to go ahead and mark this request 'wont-fix' now, but someone else may
re-open it if they disagree.
msg5483 (view) Author: mornfall Date: 2008-08-13.13:15:32
The hashed filenames correspond to file contents. Same patch can (and will) carry
different "new-style" hashes depending on how it is commuted. You don't want to
refer to a patch through the hashed filename. The original "old-style" (but
that's really just misnomer, it's a "patch hash" vs "file hash") hash refers to
the patch uniquely and that's what you want to stick to. I agree with wont-fix.
msg5484 (view) Author: kowey Date: 2008-08-13.13:18:42
Should this become an FAQ of some sort?  Like it or not, people do look in
_darcs/patches :-) (or they create tools that grab patches).  

As an aside, maybe it would be useful if darcs provided a utility to return the
hashed file name corresponding to a given patch.
msg5485 (view) Author: mornfall Date: 2008-08-13.13:23:07
I believe adding the filename holding the patch to changes --xml output might not
be hard. *However*: this file is not guaranteed to exist in a local repository
(lazy repos won't have all of the patch files). Dunno about usefulness of such a
feature.
History
Date User Action Args
2008-05-18 16:57:08btcoburncreate
2008-08-13 01:58:10markstossetstatus: unread -> wont-fix
nosy: + markstos
messages: + msg5458
2008-08-13 13:15:35mornfallsetnosy: + mornfall, simon, kowey
messages: + msg5483
2008-08-13 13:18:45koweysetnosy: tommy, beschmi, kowey, markstos, dagit, simon, btcoburn, Serware, mornfall
messages: + msg5484
2008-08-13 13:23:11mornfallsetnosy: tommy, beschmi, kowey, markstos, dagit, simon, btcoburn, Serware, mornfall
messages: + msg5485
2009-08-06 21:05:08adminsetnosy: + dmitry.kurochkin, thorkilnaur, - beschmi
2009-08-11 00:14:39adminsetnosy: - dagit
2009-08-25 17:24:14adminsetnosy: + darcs-devel, - simon
2009-08-27 14:02:50adminsetnosy: tommy, kowey, markstos, darcs-devel, thorkilnaur, btcoburn, dmitry.kurochkin, Serware, mornfall
2009-10-23 22:43:06adminsetnosy: + serware, - Serware
2009-10-23 23:29:04adminsetnosy: + Serware, - serware