<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">I started looking at it.
<a class="moz-txt-link-freetext" href="https://kallithea-scm.org/repos/kallithea/pull-request/273/_/refactorings_and_stable_fixes_from_mailing_list">https://kallithea-scm.org/repos/kallithea/pull-request/273/_/refactorings_and_stable_fixes_from_mailing_list</a>
      propose some tests (after refactoring to add basic test coverage
      of git PRs).</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">/Mads</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 9/25/20 6:38 PM, Thomas De
      Schampheleire wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAAXf6LVcmJeSw5_2G=0ezK-ifA0coR4qF4D+HpJ+JE5pvpum0Q@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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"
            moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">kallithea-general@sfconservancy.org</a><br>
          <a
href="https://lists.sfconservancy.org/mailman/listinfo/kallithea-general"
            rel="noreferrer noreferrer" target="_blank"
            moz-do-not-send="true">https://lists.sfconservancy.org/mailman/listinfo/kallithea-general</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
kallithea-general mailing list
<a class="moz-txt-link-abbreviated" href="mailto:kallithea-general@sfconservancy.org">kallithea-general@sfconservancy.org</a>
<a class="moz-txt-link-freetext" href="https://lists.sfconservancy.org/mailman/listinfo/kallithea-general">https://lists.sfconservancy.org/mailman/listinfo/kallithea-general</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>