[PATCH fixes dulwich exception]

Mads Kiilerich mads at kiilerich.com
Sat Sep 26 16:48:36 UTC 2020


I started looking at it. 
https://kallithea-scm.org/repos/kallithea/pull-request/273/_/refactorings_and_stable_fixes_from_mailing_list 
propose some tests (after refactoring to add basic test coverage of git 
PRs).

/Mads


On 9/25/20 6:38 PM, Thomas De Schampheleire wrote:
> Hi,
>
> Thanks for your patch.
> I did not yet have time to verify and test it.
>
> Do you think it would be possible for you to add a test for the 
> failing behaviour?
>
> Thanks,
> Thomas
>
> On Mon, Sep 21, 2020, 15:22 tonich sh <tonich.sh at gmail.com 
> <mailto:tonich.sh at gmail.com>> wrote:
>
>     second try:
>     Fixes dulwich exception on pull-request deletion
>     diff -r a2ec23356e6b kallithea/model/pull_request.py
>     --- a/kallithea/model/pull_request.py   Tue Sep 15 21:30:26 2020 +0200
>     +++ b/kallithea/model/pull_request.py   Mon Sep 21 16:14:46 2020 +0300
>     @@ -139,7 +139,7 @@
>              if pull_request.org_repo.scm_instance.alias == 'git':
>                  # remove a ref under refs/pull/ so that commits can be
>     garbage-collected
>                  try:
>     -                del
>     pull_request.org_repo.scm_instance._repo["refs/pull/%d/head" %
>     pull_request.pull_request_id]
>     +                del
>     pull_request.org_repo.scm_instance._repo[b"refs/pull/%d/head" %
>     pull_request.pull_request_id]
>                  except KeyError:
>                      pass
>
>     пн, 21 сент. 2020 г. в 16:17, tonich sh <tonich.sh at gmail.com
>     <mailto:tonich.sh at gmail.com>>:
>
>     >
>     > diff -r a2ec23356e6b kallithea/model/pull_request.py
>     > --- a/kallithea/model/pull_request.py   Tue Sep 15 21:30:26 2020
>     +0200
>     > +++ b/kallithea/model/pull_request.py   Mon Sep 21 16:14:46 2020
>     +0300
>     > @@ -139,7 +139,7 @@
>     >          if pull_request.org_repo.scm_instance.alias == 'git':
>     >              # remove a ref under refs/pull/ so that commits can be
>     > garbage-collected
>     >              try:
>     > -                del
>     > pull_request.org_repo.scm_instance._repo["refs/pull/%d/head" %
>     > pull_request.pull_request_id]
>     > +                del
>     > pull_request.org_repo.scm_instance._repo[b"refs/pull/%d/head" %
>     > pull_request.pull_request_id]
>     >              except KeyError:
>     >                  pass
>
>
>
>     --
>     С уважением, Антон Щур.
>     _______________________________________________
>     kallithea-general mailing list
>     kallithea-general at sfconservancy.org
>     <mailto:kallithea-general at sfconservancy.org>
>     https://lists.sfconservancy.org/mailman/listinfo/kallithea-general
>
>
> _______________________________________________
> kallithea-general mailing list
> kallithea-general at sfconservancy.org
> https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20200926/8c73cf3a/attachment.html>


More information about the kallithea-general mailing list