[darcs-users] Re: [zander-RoXCvvDuEio at public.gmane.org: Re: Re: Frustrations diffing against the last change to a file]

Benedikt Schmidt ry102 at rz.uni-karlsruhe.de
Sat Apr 2 16:16:30 UTC 2005


Mark Stosberg <mark at summersault.com> writes:

> On 2005-04-02, Michael G Schwern <schwern at pobox.com> wrote:
>>
>> darcs changes/annotate/diff/etc learn to handle a unique code that is a 5 
>> character (alfaneric) hash of the comment/date of each patch which is 
>> unique enough to keep collisions low, and have the advantage of being 
>> consistent after pulls/unpulls.
>>
>> darcs changes --hashcode build.xml:
>> kJ6xM: Sun Jan 30 18:51:43 CET 2005  Thomas Zander <zander at kde.org>
>>   * Fix unit-test framework again
>>
>> so you can type:
>> darcs diff --hashcode kJ6xM
>
> I think this is a great idea.
>
> Putting the full hash-code in the all the 'human friendly' output is
> too long and ugly. This seems like a good balance.
>
> The one problem I see is with automated tools that are created darcs
> patches, so that several could be created in the same second with the
> same author and timestamp.
>
> What about just "hashing the hash" down to a few characters? That could
> consider the patch contents as well.

For most of my use cases, there would be an even simpler solution:
Add a number in front of every patch in the output of
darcs changes

1. Thu Mar 31 18:36:45 CEST 2005  Tomasz Zielonka <tomasz.zielonka at gmail.com>
  * introduce withRepoLock to get rid of hardcoded "./_darcs/lock" strings

2. Thu Mar 31 21:34:42 CEST 2005  Tomasz Zielonka <tomasz.zielonka at gmail.com>
  * GNUmakefile: add test_coding_standards target, included in test/check
  Currently it ensures that Haskell sources files contain no TABs. I
  checked that David prefers darcs sources to be tab-free. I found TABs
  only in a couple of places, so I figured it would be a good idea to
  remove them and enforce this in the future.

and accept this number in darcs annotate and diff.

But a short hashcode isn't that bad too, since you can select it with
a double-click for copy&paste.

Benedikt





More information about the darcs-users mailing list