From d45834aab7773b23754bec9a65300c955acb5b4f Mon Sep 17 00:00:00 2001 From: Steven Walter Date: Mon, 14 Jul 2008 16:32:54 -0400 Subject: [PATCH] svn: show current branch during push --- plugins/svn.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/svn.py b/plugins/svn.py index 38beace..570cae8 100644 --- a/plugins/svn.py +++ b/plugins/svn.py @@ -67,6 +67,10 @@ class SvnPlugin(YapPlugin): base = get_output("git merge-base HEAD %s" % rev[0]) if base[0] != rev[0]: raise YapError("Branch not up-to-date. Update first.") + current = get_output("git symbolic-ref HEAD") + if not current: + raise YapError("Not on a branch!") + current = current[0].replace('refs/heads/', '') self.yap._confirm_push(current, "trunk", "svn") os.system("git svn dcommit") return -- 2.11.4.GIT