[PATCH fixes dulwich exception]

tonich sh tonich.sh at gmail.com
Mon Sep 21 13:21:51 UTC 2020


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



--
С уважением, Антон Щур.


More information about the kallithea-general mailing list