ACK: [PATCH kteam-tools] verify-release-ready: support other remotes than origin

Stefan Bader stefan.bader at canonical.com
Mon Jul 10 12:20:44 UTC 2017


On 29.06.2017 17:55, Thadeu Lima de Souza Cascardo wrote:
> If the current branch uses a remote other than origin, check the tag is
> pushed in that remote instead of origin. As more branches are kept in
> their own repo these days, this allows one to use a single local repo
> for those.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at canonical.com>

Acked-by: Stefan Bader <stefan.bader at canonical.com>

> ---
>  ktl/git.py                        | 12 ++++++++++++
>  maintscripts/verify-release-ready |  3 ++-
>  2 files changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/ktl/git.py b/ktl/git.py
> index 9e5cc72b..5c4e270e 100644
> --- a/ktl/git.py
> +++ b/ktl/git.py
> @@ -100,6 +100,18 @@ class Git:
>              raise GitError("no current branch")
>          return result[0].replace("refs/heads/", "")
>  
> +    # remote
> +    #
> +    # Return a string that is the remote this branch tracks or origin.
> +    #
> +    @classmethod
> +    def remote(cls):
> +        branch = cls.current_branch()
> +        status, result = run_command("git config branch.%s.remote" % branch, cls.debug)
> +        if status != 0:
> +            return "origin"
> +        return result[0]
> +
>      # show
>      #
>      @classmethod
> diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready
> index b22c5aa4..7805b462 100755
> --- a/maintscripts/verify-release-ready
> +++ b/maintscripts/verify-release-ready
> @@ -312,7 +312,8 @@ class VerifyReleaseReady():
>          else:
>              # Verify tag has been pushed!
>              msg = 'tag pushed'
> -            status, result = run_command("git ls-remote --tags origin %s" % expected)
> +            branch = Git.remote()
> +            status, result = run_command("git ls-remote --tags %s %s" % (branch, expected))
>              if status == 0 and expected in result[0]:
>                  s.status(msg, True)
>              else:
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20170710/1639335a/attachment.sig>


More information about the kernel-team mailing list