[darcs-users] Re: Frustrations diffing against the last change to a file

Michael G Schwern schwern at pobox.com
Sat Apr 2 22:10:54 UTC 2005


On Sat, Apr 02, 2005 at 01:09:24PM +0200, Tommy Pettersson wrote:
> It would mostly be querying commands that need a shorthand
> patch reference, since the other commands let you select
> patches interactively.  Why not number the patches backwards
> so that the last applied patch (the first one in a normal
> changes listing) is 1.
> 
> Pros:
>   you will usually type rather short references
>   you will be quite aware that references are temporary
> 
> Cons:
>   it won't work in repos that others modify simultaneously

I'm not sure I understand that last one.  I think we need to define "repo".
I hear it is "my local checkout (ie. darcs get) sitting on my disk" which is
how the manual seems to use it where I think you're saying "all checkouts 
encomasing the entire project".  If you do mean the latter then it does make
sense.  However, there's no requirement that patch numbers be unique across
the entire project.

I can think of another con.

Cons:  The patch numbers change every time a new patch is applied to the 
repo.  This is avoidable.

What you're describing is already implemented in --last, sort of, which is 
where the whole discussion started.  I tried "darcs diff --last 1 some/file" 
expecting to see the diff against the last patch to affect some/file.  
Instead I got the diff of some/file against the last patch to affect the 
repo (which is to say, nothing since some/file wasn't changed in that patch).
http://bugs.darcs.net//Ticket/Display.html?id=304

Fix that bug and you've got 80% of your feature.





More information about the darcs-users mailing list