[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] diff --reverse?
From: |
Thomas Keller |
Subject: |
Re: [Monotone-devel] diff --reverse? |
Date: |
Mon, 27 Jul 2009 22:55:28 +0200 |
User-agent: |
Thunderbird 2.0.0.22 (Macintosh/20090605) |
Stephen Leake schrieb:
> Derek Scherger <address@hidden> writes:
>
>> On Mon, Jul 13, 2009 at 5:39 PM, Stephen Leake <
>> address@hidden> wrote:
>>
>>> we building two csets, but only returning one of them?
>> From what I can see the excluded cset is never used, calculating it is
>> completely redundant and should be removed.
>
> Ok, I've deleted 'excluded', and only one test is failing
> (log_--diffs); I'm looking into it.
>
>> A complete guess but the "new_is_archived" flag is probably used to pull the
>> new revision_from the database in the case when it lives there. When you're
>> going in reverse "new" probably has a different meaning. If your workspace
>> is uncommitted and you're attempting to diff from some committed revision
>> *back* to your uncommitted workspace then "new" really means "old" (i.e.
>> your workspace) and new_is_archived should be false.
>
> This was a good hint. It turns out I need to add 'old_is_archived'.
>
> Committed in nvm.stephe. See the test in tests/diff_reverse, and
> tests/automate_content_diff. Not quite ready to merge to main, since
> tests/log_--diffs is failing.
Hi Stephen!
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?
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, but it would save us one
(weird) error message and make --reverse much more understandable for
all users, what do you think?
Thomas.
--
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en
signature.asc
Description: OpenPGP digital signature