[sysadmin-bin] make sure to update the main repos when there is a new branch
- From: Olav Vitters <ovitters src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] make sure to update the main repos when there is a new branch
- Date: Thu, 31 Mar 2011 20:07:07 +0000 (UTC)
commit ac1cf59f3170ca49ee58cef40087ee0c62b94b01
Author: Olav Vitters <olav vitters nl>
Date: Thu Mar 31 22:06:56 2011 +0200
make sure to update the main repos when there is a new branch
gnomeweb/set_buildflag.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gnomeweb/set_buildflag.py b/gnomeweb/set_buildflag.py
index 7565b48..f2d57fb 100755
--- a/gnomeweb/set_buildflag.py
+++ b/gnomeweb/set_buildflag.py
@@ -33,12 +33,16 @@ if not opts.module:
def update_flag(module, body):
build_flag = os.path.join(timestamp_dir, module + ".buildflag")
+ file_exists = os.path.exists(build_flag)
+
flagfile = open(build_flag, 'w')
# Write the time into file
flagfile.write(time.strftime("Date: %F %T UTC\n", time.gmtime()))
flagfile.write(body)
flagfile.close()
+ return file_exists
+
# We echo the body into the flag file for debugging purposes
# (it contains the old and new revisions)
body = sys.stdin.read()
@@ -46,7 +50,9 @@ body = sys.stdin.read()
if opts.branch:
for branch in args:
module = '%s!%s' % (opts.module, branch)
- update_flag(module, body)
+ if not update_flag(module, body):
+ # New branch
+ update_flag(opts.module, body)
else:
update_flag(opts.module, body)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]