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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Thadeu Lima de Souza Cascardo-3
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 <[hidden email]>
---
 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:
--
2.11.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Stefan Bader-2
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 <[hidden email]>

Acked-by: Stefan Bader <[hidden email]>

> ---
>  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:
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Marcelo Henrique Cerri
In reply to this post by Thadeu Lima de Souza Cascardo-3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Thadeu Lima de Souza Cascardo-3
In reply to this post by Thadeu Lima de Souza Cascardo-3
Applied to kteam-tools.

Thanks.
Cascardo.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Loading...