Re: push specific line
- From: Kai <kai willadsen gmail com>
- To: Victor Engmark <victor engmark gmail com>
- Cc: meld-list gnome org
- Subject: Re: push specific line
- Date: Fri, 11 Feb 2011 08:22:48 +1000
On 11 February 2011 07:35, Victor Engmark <victor engmark gmail com> wrote:
> On Thu, Feb 10, 2011 at 9:34 PM, David Kelley <dskelley gmail com> wrote:
>> On Thu, Feb 10, 2011 at 1:45 AM, Kai <kai willadsen gmail com> wrote:
>>>
>>> On 6 February 2011 19:39, Victor Engmark <victor engmark gmail com> wrote:
>>> > On Wed, Feb 2, 2011 at 8:28 PM, Roee Shapiro <roeeshapiro gmail com>
>>> > wrote:
>>> >> Hello
>>> >> I enjoy using meld.
>>> >> I see there is a push to right/left feature which is for a single
>>> >> block.
>>> >> I am looking for the option to push a single line (out of the block),
>>> >> Does it exist ?
>>> >
>>> > Bump. A similar feature exists in git-gui, where you can right-click
>>> > on a line (or selection of lines) and say "Stage Line For Commit".
>>>
>>> The git-gui feature is completely different though. In git-gui, you
>>> have one line for each insertion and deletion. We could replicate this
>>> feature for insertions (and equivalently, deletions) but I don't see
>>> how it would work for modified blocks (i.e., insert/delete pairs).
>>>
>>> > In
>>> > kdiff3, IIRC, you could also split chunks of diff lines into two at
>>> > the line where the pointer is, which I thought was even more clever.
>>> > It would then recompute the diff, so you could sometimes use that to
>>> > make it easier to resolve moved chunks (which it does not detect).
>>>
>>> Sorry, but from this description, I can't understand what this
>>> splitting actually accomplishes.
>>
>> I don't see a big need for a 'merge specific line' feature. Both panes of
>> meld are full text editors. Simply highlight the line in one side, copy/cut,
>> move the cursor to the right position in the other side, paste. A merge
>> specific line feature would be complicated to impliment, especially because
>> it's not clean in all situations (modified [blue] blocks).
>>
>> While a 'merge specific line' feature would possibly reduce that particular
>> scenario by a few clicks, is it worth the effort/complication of code? How
>> often do most people need to do this operation? Isn't the existing
>> functionality sufficient to handle this case?
>
> I can't speak for other developers, but for me this is the single most
> useful feature for achieving *commits with a single change*.
Fair enough, but that doesn't address the question of how it could
work in Meld's UI.
> I
> constantly find that when fixing a bug I've done some cleanup of the
> code which is completely irrelevant for the (usually much shorter)
> actual fix. Committing these together makes it more difficult to
> *untangle the version history at a later time*, which I consider the
> raison d'être for VCSes (as opposed to just backup as it seems to be
> in some companies). git-gui handles this wonderfully - Right-click and
> select "Stage Hunk For Commit" or "Stage Line For Commit" (which also
> works on multiple selected lines).
As I already said, it works because git-gui has a line for a delete
and a line for a commit. Meld (and many other side-by-side visual diff
tools) merge delete/insert chunks into modified chunks.
> Since Subversion and other
> <del>obsolete</del><ins>old</ins> VCSes don't have a staging area this
> of course becomes a bit more cumbersome, but it is a great timesaver.
>
> As for the implementation, it could simply be another modifier like
> Shift and Ctrl (Maybe we could use Alt?) to change from one arrow per
> chunk to one arrow per line.
As I tried to explain earlier, this doesn't work for modified blocks.
Also, we can't use Alt anyway, since most window managers reserve Alt
+ mouse buttons for window movement. Some don't, but it's essentially
an unreliable modifier to hope for.
cheers,
Kai
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]