<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">Thanks for your patch.</div><div dir="auto">I did not yet have time to verify and test it. </div><div dir="auto"><br></div><div dir="auto">Do you think it would be possible for you to add a test for the failing behaviour?</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Thomas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 21, 2020, 15:22 tonich sh <<a href="mailto:tonich.sh@gmail.com">tonich.sh@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">second try:<br>
Fixes dulwich exception on pull-request deletion<br>
diff -r a2ec23356e6b kallithea/model/pull_request.py<br>
--- a/kallithea/model/pull_request.py   Tue Sep 15 21:30:26 2020 +0200<br>
+++ b/kallithea/model/pull_request.py   Mon Sep 21 16:14:46 2020 +0300<br>
@@ -139,7 +139,7 @@<br>
         if pull_request.org_repo.scm_instance.alias == 'git':<br>
             # remove a ref under refs/pull/ so that commits can be<br>
garbage-collected<br>
             try:<br>
-                del<br>
pull_request.org_repo.scm_instance._repo["refs/pull/%d/head" %<br>
pull_request.pull_request_id]<br>
+                del<br>
pull_request.org_repo.scm_instance._repo[b"refs/pull/%d/head" %<br>
pull_request.pull_request_id]<br>
             except KeyError:<br>
                 pass<br>
<br>
пн, 21 сент. 2020 г. в 16:17, tonich sh <<a href="mailto:tonich.sh@gmail.com" target="_blank" rel="noreferrer">tonich.sh@gmail.com</a>>:<br>
<br>
><br>
> diff -r a2ec23356e6b kallithea/model/pull_request.py<br>
> --- a/kallithea/model/pull_request.py   Tue Sep 15 21:30:26 2020 +0200<br>
> +++ b/kallithea/model/pull_request.py   Mon Sep 21 16:14:46 2020 +0300<br>
> @@ -139,7 +139,7 @@<br>
>          if pull_request.org_repo.scm_instance.alias == 'git':<br>
>              # remove a ref under refs/pull/ so that commits can be<br>
> garbage-collected<br>
>              try:<br>
> -                del<br>
> pull_request.org_repo.scm_instance._repo["refs/pull/%d/head" %<br>
> pull_request.pull_request_id]<br>
> +                del<br>
> pull_request.org_repo.scm_instance._repo[b"refs/pull/%d/head" %<br>
> pull_request.pull_request_id]<br>
>              except KeyError:<br>
>                  pass<br>
<br>
<br>
<br>
--<br>
С уважением, Антон Щур.<br>
_______________________________________________<br>
kallithea-general mailing list<br>
<a href="mailto:kallithea-general@sfconservancy.org" target="_blank" rel="noreferrer">kallithea-general@sfconservancy.org</a><br>
<a href="https://lists.sfconservancy.org/mailman/listinfo/kallithea-general" rel="noreferrer noreferrer" target="_blank">https://lists.sfconservancy.org/mailman/listinfo/kallithea-general</a><br>
</blockquote></div>