jhbuild r2131 - in trunk: . scripts



Author: fpeters
Date: Sun Jun  8 11:41:46 2008
New Revision: 2131
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2131&view=rev

Log:
* scripts/hg-update.py: don't fail on parentless revisions.
(closes: #536964, initial patch by John Spray)



Modified:
   trunk/ChangeLog
   trunk/scripts/hg-update.py

Modified: trunk/scripts/hg-update.py
==============================================================================
--- trunk/scripts/hg-update.py	(original)
+++ trunk/scripts/hg-update.py	Sun Jun  8 11:41:46 2008
@@ -32,7 +32,11 @@
 
 def get_parent():
     hg = Popen(['hg', 'parents', '--template', '{rev}'], stdout=PIPE)
-    return hg.stdout.read().split()[0]
+    try:
+        return hg.stdout.read().split()[0]
+    except IndexError:
+        # handle parentless revisions
+        return ''
 
 def pull():
     ret = call(['hg', 'pull'])



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]