* Looking for a helper for advanced conflicts resolution.
@ 2020-07-24 11:07 Sergey Organov
2020-07-24 16:25 ` Michael Heerdegen
0 siblings, 1 reply; 10+ messages in thread
From: Sergey Organov @ 2020-07-24 11:07 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
To aid in resolution of complex conflicts, I'd like to know if there is
a tool in Emacs that, given diff3-style 3-way conflict output, would
convert it into 2 simple diffs: "mine" changes from common ancestor, and
"yours" changes from common ancestor. Does anybody know about one?
I.e., given:
<<<<<<< A
lines from A
||||||| B
lines from B
=======
lines from C
>>>>>>> C
Produce:
1. diff of "lines from B" and "lines from A"
2. diff of "lines from B" and "lines from C"
For example, I'd like to be able to select the chunk in the buffer, and
call a function that'd create another buffer with these 2 diffs.
Thanks,
-- Sergey
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Looking for a helper for advanced conflicts resolution.
2020-07-24 11:07 Looking for a helper for advanced conflicts resolution Sergey Organov
@ 2020-07-24 16:25 ` Michael Heerdegen
2020-07-24 18:15 ` Sergey Organov
2020-07-24 19:06 ` Yuri Khan
0 siblings, 2 replies; 10+ messages in thread
From: Michael Heerdegen @ 2020-07-24 16:25 UTC (permalink / raw)
To: help-gnu-emacs
Sergey Organov <sorganov@gmail.com> writes:
> Hello,
>
> To aid in resolution of complex conflicts, I'd like to know if there is
> a tool in Emacs that, given diff3-style 3-way conflict output, would
> convert it into 2 simple diffs: "mine" changes from common ancestor, and
> "yours" changes from common ancestor. Does anybody know about one?
Doesn't "smerge" do that (`smerge-diff-base-upper',
`smerge-diff-base-lower', `smerge-diff-upper-lower')?
I'm using Ediff. AFAIR Ediff can't do the analogue out of the box when
merging, but it's not hard to implement.
Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Looking for a helper for advanced conflicts resolution.
2020-07-24 16:25 ` Michael Heerdegen
@ 2020-07-24 18:15 ` Sergey Organov
2020-07-24 19:08 ` wgreenhouse
2020-07-24 19:48 ` Michael Heerdegen
2020-07-24 19:06 ` Yuri Khan
1 sibling, 2 replies; 10+ messages in thread
From: Sergey Organov @ 2020-07-24 18:15 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Sergey Organov <sorganov@gmail.com> writes:
>
>> Hello,
>>
>> To aid in resolution of complex conflicts, I'd like to know if there is
>> a tool in Emacs that, given diff3-style 3-way conflict output, would
>> convert it into 2 simple diffs: "mine" changes from common ancestor, and
>> "yours" changes from common ancestor. Does anybody know about one?
>
> Doesn't "smerge" do that (`smerge-diff-base-upper',
> `smerge-diff-base-lower', `smerge-diff-upper-lower')?
Dunno, will try it, thanks for pointing!
> I'm using Ediff. AFAIR Ediff can't do the analogue out of the box when
> merging, but it's not hard to implement.
Yeah, that was my first candidate, and I've tried to invoke it from
magit, but it doesn't seem indeed to have the feature. Implementing it
probably is not a big deal indeed, with or without ediff, I just hope to
find something ready.
Thanks,
-- Sergey
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Looking for a helper for advanced conflicts resolution.
2020-07-24 16:25 ` Michael Heerdegen
2020-07-24 18:15 ` Sergey Organov
@ 2020-07-24 19:06 ` Yuri Khan
2020-07-24 19:49 ` Sergey Organov
1 sibling, 1 reply; 10+ messages in thread
From: Yuri Khan @ 2020-07-24 19:06 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
On Fri, 24 Jul 2020 at 23:27, Michael Heerdegen
<michael_heerdegen@web.de> wrote:
> Sergey Organov <sorganov@gmail.com> writes:
> > To aid in resolution of complex conflicts, I'd like to know if there is
> > a tool in Emacs that, given diff3-style 3-way conflict output, would
> > convert it into 2 simple diffs: "mine" changes from common ancestor, and
> > "yours" changes from common ancestor. Does anybody know about one?
>
> Doesn't "smerge" do that (`smerge-diff-base-upper',
> `smerge-diff-base-lower', `smerge-diff-upper-lower')?
+1 to smerge. In the majority of complex conflicts I face, I can
toggle ‘smerge-refine’ a couple times, choose one side that has the
easier diff, and manually apply it to the other side. I don’t even
have to see the 2-way diffs.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Looking for a helper for advanced conflicts resolution.
2020-07-24 18:15 ` Sergey Organov
@ 2020-07-24 19:08 ` wgreenhouse
2020-07-24 19:48 ` Michael Heerdegen
1 sibling, 0 replies; 10+ messages in thread
From: wgreenhouse @ 2020-07-24 19:08 UTC (permalink / raw)
To: help-gnu-emacs
Sergey Organov <sorganov@gmail.com> writes:
> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
>> Sergey Organov <sorganov@gmail.com> writes:
>>
>>> Hello,
>>>
>>> To aid in resolution of complex conflicts, I'd like to know if there is
>>> a tool in Emacs that, given diff3-style 3-way conflict output, would
>>> convert it into 2 simple diffs: "mine" changes from common ancestor, and
>>> "yours" changes from common ancestor. Does anybody know about one?
>>
>> Doesn't "smerge" do that (`smerge-diff-base-upper',
>> `smerge-diff-base-lower', `smerge-diff-upper-lower')?
>
> Dunno, will try it, thanks for pointing!
>
>> I'm using Ediff. AFAIR Ediff can't do the analogue out of the box when
>> merging, but it's not hard to implement.
>
> Yeah, that was my first candidate, and I've tried to invoke it from
> magit, but it doesn't seem indeed to have the feature. Implementing it
> probably is not a big deal indeed, with or without ediff, I just hope to
> find something ready.
There is `smerge-ediff'.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Looking for a helper for advanced conflicts resolution.
2020-07-24 18:15 ` Sergey Organov
2020-07-24 19:08 ` wgreenhouse
@ 2020-07-24 19:48 ` Michael Heerdegen
2020-07-24 19:56 ` Sergey Organov
1 sibling, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2020-07-24 19:48 UTC (permalink / raw)
To: Sergey Organov; +Cc: help-gnu-emacs
Sergey Organov <sorganov@gmail.com> writes:
> Yeah, that was my first candidate, and I've tried to invoke it from
> magit, but it doesn't seem indeed to have the feature. Implementing it
> probably is not a big deal indeed [...]
I did implement that but haven't yet packaged it. When you have an
ediff3 to merge, basically, all you have to do is to add bindings to
`ediff-mode-map' that call `ediff-buffers' with two of the buffers (from
`ediff-buffer-A', `ediff-buffer-B', `ediff-buffer-C',
`ediff-ancestor-buffer'). One problem is that the highlighting of the
current Ediff session gets in the way; one has to remove and later
restore it. Another problem is that you want to be automatically guided
to the current thunk, so you have to care about this as well. But all
of that is easy achieve.
Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Looking for a helper for advanced conflicts resolution.
2020-07-24 19:06 ` Yuri Khan
@ 2020-07-24 19:49 ` Sergey Organov
0 siblings, 0 replies; 10+ messages in thread
From: Sergey Organov @ 2020-07-24 19:49 UTC (permalink / raw)
To: Yuri Khan; +Cc: Michael Heerdegen, help-gnu-emacs
Yuri Khan <yuri.v.khan@gmail.com> writes:
> On Fri, 24 Jul 2020 at 23:27, Michael Heerdegen
> <michael_heerdegen@web.de> wrote:
>> Sergey Organov <sorganov@gmail.com> writes:
>> > To aid in resolution of complex conflicts, I'd like to know if there is
>> > a tool in Emacs that, given diff3-style 3-way conflict output, would
>> > convert it into 2 simple diffs: "mine" changes from common ancestor, and
>> > "yours" changes from common ancestor. Does anybody know about one?
>>
>> Doesn't "smerge" do that (`smerge-diff-base-upper',
>> `smerge-diff-base-lower', `smerge-diff-upper-lower')?
>
> +1 to smerge. In the majority of complex conflicts I face, I can
> toggle ‘smerge-refine’ a couple times, choose one side that has the
> easier diff, and manually apply it to the other side. I don’t even
> have to see the 2-way diffs.
Thanks for the tip! I now can't even believe I didn't look as smerge
myself, even though I was aware it exists!
-- Sergey
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Looking for a helper for advanced conflicts resolution.
2020-07-24 19:48 ` Michael Heerdegen
@ 2020-07-24 19:56 ` Sergey Organov
2020-07-24 22:29 ` Michael Heerdegen
0 siblings, 1 reply; 10+ messages in thread
From: Sergey Organov @ 2020-07-24 19:56 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Sergey Organov <sorganov@gmail.com> writes:
>
>> Yeah, that was my first candidate, and I've tried to invoke it from
>> magit, but it doesn't seem indeed to have the feature. Implementing it
>> probably is not a big deal indeed [...]
>
> I did implement that but haven't yet packaged it.
Thanks for letting know it's coming! Exactly as it should be for
Swiss-army knife of merging and diffing.
-- Sergey
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Looking for a helper for advanced conflicts resolution.
2020-07-24 19:56 ` Sergey Organov
@ 2020-07-24 22:29 ` Michael Heerdegen
2020-07-25 11:37 ` John Yates
0 siblings, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2020-07-24 22:29 UTC (permalink / raw)
To: Sergey Organov; +Cc: help-gnu-emacs
Sergey Organov <sorganov@gmail.com> writes:
> > I did implement that but haven't yet packaged it.
>
> Thanks for letting know it's coming! Exactly as it should be for
> Swiss-army knife of merging and diffing.
Don't expect that it appears soon, however. I can send something
privately all the time. But I don't like how Ediff is coded, and it's
not fun for me to hack it and provide something "official". But if I
can't make it in this life, then ehm... what came after that again?
Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Looking for a helper for advanced conflicts resolution.
2020-07-24 22:29 ` Michael Heerdegen
@ 2020-07-25 11:37 ` John Yates
0 siblings, 0 replies; 10+ messages in thread
From: John Yates @ 2020-07-25 11:37 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: Help Gnu Emacs mailing list, Sergey Organov
On Fri, Jul 24, 2020 at 6:29 PM Michael Heerdegen
<michael_heerdegen@web.de> wrote:
>
> But I don't like how Ediff is coded
+1
/john
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-07-25 11:37 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-24 11:07 Looking for a helper for advanced conflicts resolution Sergey Organov
2020-07-24 16:25 ` Michael Heerdegen
2020-07-24 18:15 ` Sergey Organov
2020-07-24 19:08 ` wgreenhouse
2020-07-24 19:48 ` Michael Heerdegen
2020-07-24 19:56 ` Sergey Organov
2020-07-24 22:29 ` Michael Heerdegen
2020-07-25 11:37 ` John Yates
2020-07-24 19:06 ` Yuri Khan
2020-07-24 19:49 ` Sergey Organov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.