nmbug backtrace due to .mailmap

classic Classic list List threaded Threaded
7 messages Options
Jani Nikula Jani Nikula
Reply | Threaded
Open this post in threaded view
|

nmbug backtrace due to .mailmap


Presumably because of the .mailmap added in nmbug repository:

commit 5ea99ebcb7d188003bf4854b566f6d21721f5ea1
Author: W. Trevor King <[hidden email]>
Date:   Mon Oct 16 10:46:27 2017 -0700

    .mailmap: Consolidate David and Tomi's author names
   
    The format is documented in git-shortlog(1).  In both cases, I've
    prefered the email used for their most-recent commit.

A       .mailmap

I now get backtrace trying to nmbug pull:

Traceback (most recent call last):
  File "/home/jani/bin/nmbug", line 834, in <module>
    args.func(**kwargs)
  File "/home/jani/bin/nmbug", line 433, in pull
    _insist_committed()
  File "/home/jani/bin/nmbug", line 412, in _insist_committed
    status = get_status()
  File "/home/jani/bin/nmbug", line 580, in get_status
    maybe_deleted = _diff_index(index=index, filter='D')
  File "/home/jani/bin/nmbug", line 658, in _diff_index
    for id, tag in _unpack_diff_lines(stream=p.stdout):
  File "/home/jani/bin/nmbug", line 678, in _unpack_diff_lines
    'Invalid line in diff: {!r}'.format(line.strip()))
ValueError: Invalid line in diff: u'.mailmap'

I also didn't see any discussion about adding a .mailmap prior to it
being pushed.


BR,
Jani.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
W. Trevor King W. Trevor King
Reply | Threaded
Open this post in threaded view
|

Re: nmbug backtrace due to .mailmap

On Mon, Oct 16, 2017 at 10:14:40PM +0300, Jani Nikula wrote:
> Presumably because of the .mailmap added in nmbug repository:

Yup.

> I also didn't see any discussion about adding a .mailmap prior to it
> being pushed.

Sorry :/.  I didn't realize it would be an issue until I pushed it.  I
can't roll it back because the central repo only allows fast-forward
pushes, but maybe David can revert master to 4148cb4 (dropping
5ea99eb)?  Until then, you can work around the current master by
applying this patch locally.

And if folks feel like this sort of thing should not be supported,
we'll want to reject this patch, document the limitation, and roll
back master to drop 5ea99eb.  I like it, but it's really David's
central repo.

Cheers,
Trevor

--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

signature.asc (849 bytes) Download Attachment
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: nmbug backtrace due to .mailmap

"W. Trevor King" <[hidden email]> writes:

> On Mon, Oct 16, 2017 at 10:14:40PM +0300, Jani Nikula wrote:
>> Presumably because of the .mailmap added in nmbug repository:
>
> Yup.
>
>> I also didn't see any discussion about adding a .mailmap prior to it
>> being pushed.
>
> Sorry :/.  I didn't realize it would be an issue until I pushed it.  I
> can't roll it back because the central repo only allows fast-forward
> pushes, but maybe David can revert master to 4148cb4 (dropping
> 5ea99eb)?  Until then, you can work around the current master by
> applying this patch locally.

Reverts are fast-forward?
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
W. Trevor King W. Trevor King
Reply | Threaded
Open this post in threaded view
|

Re: nmbug backtrace due to .mailmap

In reply to this post by W. Trevor King
On Mon, Oct 16, 2017 at 12:21:15PM -0700, W. Trevor King wrote:
> Until then, you can work around the current master by applying this
> patch locally.

I'd thought this thread was in response to my patch, but it turns out
my local nullmailer was off when I sent the patch.  Sent now, and
“this patch” means:

  id:[hidden email]

Cheers,
Trevor

--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

signature.asc (849 bytes) Download Attachment
W. Trevor King W. Trevor King
Reply | Threaded
Open this post in threaded view
|

Re: nmbug backtrace due to .mailmap

In reply to this post by David Bremner-2
On Mon, Oct 16, 2017 at 05:37:32PM -0300, David Bremner wrote:

> W. Trevor King writes:
> > On Mon, Oct 16, 2017 at 10:14:40PM +0300, Jani Nikula wrote:
> >> I also didn't see any discussion about adding a .mailmap prior to it
> >> being pushed.
> >
> > Sorry :/.  I didn't realize it would be an issue until I pushed it.  I
> > can't roll it back because the central repo only allows fast-forward
> > pushes, but maybe David can revert master to 4148cb4 (dropping
> > 5ea99eb)?  Until then, you can work around the current master by
> > applying this patch locally.
>
> Reverts are fast-forward?
Ah, I'd been thinking of rewinding master, but yeah, pushing an
explicit revert commit should work too.  There may be cases where a
client that does not include [1] still manages to find and choke on
.mailmap, but I haven't been able to think up anything that sounds
likely.  And as Jani pointed out in IRC, rolling back public branches
has its own set of problems [2].

So I've pushed bce5a55c removing .mailmap, and folks without [1]
should be back in business.  Sorry for the excitement :p.

Cheers,
Trevor

[1]: id:[hidden email]
[2]: https://git-scm.com/docs/user-manual#problems-With-rewriting-history

--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

signature.asc (849 bytes) Download Attachment
W. Trevor King W. Trevor King
Reply | Threaded
Open this post in threaded view
|

Re: nmbug backtrace due to .mailmap

On Mon, Oct 16, 2017 at 02:08:17PM -0700, W. Trevor King wrote:
> So I've pushed bce5a55c removing .mailmap, and folks without [1]
> should be back in business.
> …
> [1]: id:[hidden email]

But Jani reports still being stuck.  It turns out that anyone who
pulled after 5ea99ebc but before bce5a55c will have problems with a
failing pull's early _insist_committed check, which depends on
get_status.  Anyone who cannot 'nmbug pull' due to the .mailmap should
either:

a. Apply the patch and try again.

b. Comment out the ‘_insist_committed()’ line in nmbug's ‘pull’
   definition and try again.  Make sure you restore the check after
   the successful pull.

c. Bypass nmbug and update their Git repository directly, using
   something like:

     $ GIT_DIR="${NMBGIT:=${HOME}/.nmbug}"
     $ GIT_WORK_TREE=$(mktemp -d)
     $ export GIT_DIR GIT_WORK_TREE
     $ git reset --hard HEAD
     $ git pull
     $ rm -rf "${GIT_WORK_TREE}"

   which is basically what ‘nmbug pull’ does, but translated from
   Python into shell.

Cheers,
Trevor

--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

signature.asc (849 bytes) Download Attachment
Jani Nikula Jani Nikula
Reply | Threaded
Open this post in threaded view
|

Re: nmbug backtrace due to .mailmap

On Mon, 16 Oct 2017, "W. Trevor King" <[hidden email]> wrote:
> b. Comment out the ‘_insist_committed()’ line in nmbug's ‘pull’
>    definition and try again.  Make sure you restore the check after
>    the successful pull.

FWIW this fixed it for me, thanks.

BR,
Jani.
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch