[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Quick poll: Does anybody actually still use diff wi
From: |
Stephen Leake |
Subject: |
Re: [Monotone-devel] Quick poll: Does anybody actually still use diff with --external? |
Date: |
Sat, 08 Jan 2011 19:25:46 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (windows-nt) |
Thomas Keller <address@hidden> writes:
> Am 08.01.11 08:30, schrieb Richard Levitte:
>> In message <address@hidden> on Sat, 08 Jan 2011 01:52:00 +0100, Thomas
>> Keller <address@hidden> said:
>>
>> me> I'm working on issue 102 and to make this work properly I want to
>> me> create the diff output and return it instead of just printing it
>> me> to stdout directly. Problem is that the external diff hook calls
>> me> execute("diff", "-u", ...) and I wonder if I should go through the
>> me> hassle and use spawn_redirected to catch and return the output
>> me> from there.
>>
>> I'm not sure what you're about to do... it does sound like you want
>> to create the whole diff in memory and output it when it's complete.
>
> Yes, this was my intention. See
> https://code.monotone.ca/p/monotone/issues/102/#ic315.
>
>> In my opinion, that would be a bad idea (think huge diffs), and I'm
>> not quite sure how that would fix the sorting order, which is the
>> actual issue here. Maybe I misunderstand what you're thinking of
>> doing...
>
> Well, my plan was to use the parallel node iterator to produce a diff
> for all changed nodes and save the results to a multimap. Then I'd
> iterate over this multimap and output the actual diff.
The comment in issue 102 implies that you _can't_ sort the diffs before
they are generated, because you need old and new paths in some cases. Or
at least, using your approach is the simplest/smallest modification to
get the sorting.
Works for me.
So +1 for your approach and for deleting --external.
--
-- Stephe