aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-12-05 15:27:48 -0500
committerRuss Cox <rsc@golang.org>2014-12-05 15:27:48 -0500
commitc009bcdd8bc3e8bb93dc295c9fc2ba371e26438e (patch)
tree692093cf6ca59f94b547e1272021cade8c39e8b1
parent75c8a78e61617f845c95abb01d7680aae60069ad (diff)
downloadgo-c009bcdd8bc3e8bb93dc295c9fc2ba371e26438e.tar.gz
go-c009bcdd8bc3e8bb93dc295c9fc2ba371e26438e.zip
[release-branch.go1.4] codereview: add release-branch.go1.4 prefix, like for dev branches
TBR=bradfitz R=bradfitz CC=golang-codereviews https://golang.org/cl/178710043
-rw-r--r--lib/codereview/codereview.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py
index 28404d0dbe..07c6d2beb1 100644
--- a/lib/codereview/codereview.py
+++ b/lib/codereview/codereview.py
@@ -314,7 +314,11 @@ class CL(object):
if self.name != "new":
s = "code review %s: %s" % (self.name, s)
typecheck(s, str)
- return branch_prefix(ui, repo) + s
+ s = branch_prefix(ui, repo) + s
+ # Rietveld does a hard reject on any subject > 100 chars. Be sure.
+ if len(s) >= 100:
+ s = s[0:95] + "..."
+ return s
def Upload(self, ui, repo, send_mail=False, gofmt=True, gofmt_just_warn=False, creating=False, quiet=False):
if not self.files and not creating:
@@ -409,7 +413,7 @@ class CL(object):
if not self.mailed:
pmsg += "I'd like you to review this change to"
branch = repo[None].branch()
- if branch.startswith("dev."):
+ if workbranch(branch) and branch != "default":
pmsg += " the " + branch + " branch of"
pmsg += "\n" + repourl + "\n"
else:
@@ -1921,7 +1925,7 @@ def need_sync():
def branch_prefix(ui, repo):
prefix = ""
branch = repo[None].branch()
- if branch.startswith("dev."):
+ if workbranch(branch) and branch != "default":
prefix = "[" + branch + "] "
return prefix