[darcs-users] darcs annotate format obscures the code
Michael G Schwern
schwern at pobox.com
Sun Mar 20 22:07:46 UTC 2005
On Sun, Mar 20, 2005 at 01:58:50PM +0000, Ralph Corderoy wrote:
> > and b) any new patches will just get higher numbers.
> I don't think that's true. They're date ordered and the date is when
> the patch was recording, not when it was added to this repo, so
> introducing a patch written six months ago will bump lots of numbers on
> by one.
Then don't make then strictly date ordered. Just make the numbers be
increasing in the order received. You lose the ability to quickly
see that #3457 came after #3456 but its more important that the numbers
not jump around. That they be a concise representation of that change.
Of course if you can get both to work, they don't jump around and they're
a concise representation, that works. Hmmm...
What about using a very compact date representation? Such as PT (PipTime).
Its a base64 encoded time representation.
$ perl -MTime::PT -wle '$f = Time::PT->new; print $f; print $f->cdate'
Sun Mar 20 14:02:03:51 2005
53KE23p is the current date and time to millisecond accuracy. Its a 7
digit base 64 number which is 64**7 == 2**42 which is plenty of space.
If you use the patch date encoded in PT as the change key then they're both
in date order and tolerant to inserts.
More information about the darcs-users