[PATCH fixes dulwich exception]

Thomas De Schampheleire patrickdepinguin at gmail.com
Fri Sep 25 16:38:16 UTC 2020


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> 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>:
>
> >
> > 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
> https://lists.sfconservancy.org/mailman/listinfo/kallithea-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20200925/04f29cc7/attachment.html>


More information about the kallithea-general mailing list