[PATCH] histedit: print action before running it

timeless timeless at gmail.com
Wed Dec 23 00:11:02 CST 2015


Yes, I want to spit out the current thing whenever we fail to a shell
(edit, conflict).
Specifically, "Fix up the change" should be changed to include "what
the change is".
I do already have at least one change which goes in that direction.

Doing this is on my list.

But right now I have two or three other series for histedit I'm going
to try to flush.

If I manage them, I'll look at this..


On Tue, Dec 22, 2015 at 7:40 PM, Gregory Szorc <gregory.szorc at gmail.com> wrote:
> On Fri, Dec 18, 2015 at 8:27 AM, Augie Fackler <raf at durin42.com> wrote:
>>
>> On Tue, Dec 15, 2015 at 11:58:39AM -0800, Mateusz Kwapich wrote:
>> > # HG changeset patch
>> > # User Mateusz Kwapich <mitrandir at fb.com>
>> > # Date 1450209271 28800
>> > #      Tue Dec 15 11:54:31 2015 -0800
>> > # Node ID 552a82deb36fee623ed3ba0a6e873e65790f070d
>> > # Parent  ac6ba92bd08a14b951e216b335fde66c6a01ec69
>> > histedit: print action before running it
>>
>> So, until I saw the patches from timeless for progress, I thought this
>> was a good idea. Now I'm less sure. Can you two chat here and figure
>> out which you think is better?
>>
>> (I have a draft decision, which I won't disclose for fear of biasing the
>> discussion.)
>
>
> I'm not sure if behavior changed recently, but I just ran into a confusing
> situation with histedit:
>
> $ hg histedit
> 25 files updated, 0 files merged, 0 files removed, 0 files unresolved
> merging tests/test-check-py3-compat.t
> warning: conflicts while merging tests/test-check-py3-compat.t! (edit, then
> use 'hg resolve --mark')
> Fix up the change and run hg histedit --continue
> gps at gps-mbp:~/src/hg (f2db4a1|HISTEDIT)$ hg resolve -m --all
> (no more unresolved files)
> gps at gps-mbp:~/src/hg (f2db4a1|HISTEDIT)$ hg histedit --continue
> merging tests/test-check-py3-compat.t
> warning: conflicts while merging tests/test-check-py3-compat.t! (edit, then
> use 'hg resolve --mark')
> Fix up the change and run hg histedit --continue
> gps at gps-mbp:~/src/hg (ef5c066|HISTEDIT)$ hg resolve -m --all
> (no more unresolved files)
> gps at gps-mbp:~/src/hg (ef5c066|HISTEDIT)$ hg histedit --continue
> merging tests/test-check-py3-compat.t
> warning: conflicts while merging tests/test-check-py3-compat.t! (edit, then
> use 'hg resolve --mark')
> Fix up the change and run hg histedit --continue
> gps at gps-mbp:~/src/hg (67dfae0|HISTEDIT)$ hg resolve -m --all
> (no more unresolved files)
> gps at gps-mbp:~/src/hg (67dfae0|HISTEDIT)$ hg histedit --continue
> merging tests/test-check-py3-compat.t
> warning: conflicts while merging tests/test-check-py3-compat.t! (edit, then
> use 'hg resolve --mark')
> Fix up the change and run hg histedit --continue
>
> (yes, I'm using one of the internal merge tools that leave conflict markers)
>
> What I find confusing is that I have no clue where I am in the histedit. I
> know I need to preserve a specific line for each conflict. But since I don't
> have access to the commit message, I have no idea which line that should be.
> I'm forced to run an additional `hg diff` to see what else changed. Contrast
> with `hg rebase`, which now displays which commits it is operating on. When
> there is a conflict, I can easily see the commit is got stuck on.
>
> I like the direction of this patch. But I'd also like it to print the commit
> message. Or at least we should print the commit message in the conflict
> abort case.


More information about the Mercurial-devel mailing list