[sysadmin-bin: 34/168] Suppress 1/1 in subject lines
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin: 34/168] Suppress 1/1 in subject lines
- Date: Thu, 24 May 2012 19:54:18 +0000 (UTC)
commit 46e1b9a5f98e17a592b65b30e6c05ec7c4933333
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Mar 2 18:54:18 2009 -0500
Suppress 1/1 in subject lines
When we are sending out a single detailed diff, don't say '1/1'.
gnome-post-receive-email | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/gnome-post-receive-email b/gnome-post-receive-email
index 311e96c..940aa82 100755
--- a/gnome-post-receive-email
+++ b/gnome-post-receive-email
@@ -495,11 +495,19 @@ class BranchChange(RefChange):
else:
branch = "/" + self.short_refname
- subject = "[%(projectshort)s%(branch)s: %(index)s/%(total)s] %(subject)s" % {
+ total = len(self.added_commits)
+ if total > 1:
+ count_string = ": %(index)s/%(total)s" % {
+ 'index' : i + 1,
+ 'total' : total
+ }
+ else:
+ count_string = ""
+
+ subject = "[%(projectshort)s%(branch)s%(count_string)s] %(subject)s" % {
'projectshort' : projectshort,
'branch' : branch,
- 'index' : i + 1,
- 'total' : len(self.added_commits),
+ 'count_string' : count_string,
'subject' : commit.subject[0:50]
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]