[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] diff --reverse?
From: |
Stephen Leake |
Subject: |
Re: [Monotone-devel] diff --reverse? |
Date: |
Mon, 27 Jul 2009 19:26:21 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) |
Thomas Keller <address@hidden> writes:
> I've tried out --reverse in the current head and tells me
>
> mtn: misuse: --reverse only allowed with exactly one revision
>
> when I tried to produce a reverse diff between two arbitrary revisions.
>
> I found this a bit irritating because the only way diff can operate with
> only one revision is when being executed inside a workspace, so maybe
> the error could just read like "--reverse makes only sense when used
> within a workspace" or something?
You can also specify two revisions when in a workspace, so this would
be less precise, and actually unhelpful if that's what you had just done.
Perhaps:
--reverse only allowed when one revision is the workspace
would be better.
> And then I thought for a second "wait, why should --reverse be
> restricted to the workspace usage at all?" Sure, --reverse might be UI
> candy there, because one could always write mtn diff -r <r2> -r <r1>
> instead of mtn diff -r <r1> -r <r2> --reverse,
Yes, that was my intent. I assume that's what people did before
--reverse. But you can't do that when one is the workspace.
> but it would save us one (weird) error message and make --reverse
> much more understandable for all users, what do you think?
To be honest, one reason I didn't consider extending --reverse to that
case was I didn't want to change more code, and have to write more
tests. But it might be simple to do.
Personally, I'd think "-r <r1> -r <r2> --reverse" was redundant, and
start wondering if mtn imposes some weird requirement on r1 and r2,
like alphabetic or topological order, that makes reverse necessary.
But maybe that's just me :).
If you've gone to the trouble of specifying two revisions, why
did you specify them in the wrong order?
Let me guess; you didn't really think about the order, or just got it
wrong, so you hit up arrow, and appended --reverse rather than editing
the order. That makes sense.
--
-- Stephe