[darcs-users] patch numbers and annotate and diff etc.

Max Battcher me at worldmaker.net
Sun Apr 3 02:13:06 UTC 2005


David Roundy wrote:
> The simplest way is to simply count backwards, so the most recent patch is
> 1, and so on.  This has the advantage of making the patches you're likely
> to refer to have the smallest rather than the largest numbers.  It is also
> easy to explain, and avoids the danger of users mistaking these numbers for
> something that should be globally invarient or permanent.  On the other
> hand, because these numbers *aren't* permanent, they are less convenient,
> since every time you do a pull you'll have to check yourself "what was that
> patch by Tomasz that changed Record.lhs now?", rather than being able to
> just remember the same number.

I've been thinking that perhaps this is the easiest and friendliest of 
the options.  Call the number the "state" number and no one will confuse 
it with a CVS/SVN version/revision number.  You just have to get into to 
the habit of thinking "that was 5 states ago for that repo" (current 
state should obviously be 0).

I would deal with it through an integration log.  You probably don't 
even want to think of "states" as patches, probably the easiest solution 
for human users is to boil it down to the basic operations.  If I pull 5 
patches at once, all 5 patches constitute one state.  Again, don't worry 
about commutation the important thing to that particular repo is when it 
was integrated, not when it was written.  Each state then is basically a 
time-date stamp with minimal context.  (You could implement it entirely 
with decent hooks and existing commands.)

For an invariant state access I would suggest good old fashioned dates. 
    You could grab the state at some point in time (again, per the 
integration log) for a particular repo.  ("Give me Yesterday's state." 
"Give me the Stable Repository from 2005-01-13.")  Again, here, 
backwards state lookup is probably the best idea, because a person is 
more likely to be looking at more recent/current versions than old 
historical versions.

(I liked the base-64 date format someone mentioned, but that should more 
be a shortcut input method than the primary one.)

-- 
--Max Battcher--
http://www.worldmaker.net/
The WorldMaker.Network: Now more Caffeinated!




More information about the darcs-users mailing list