ooo-build r13502 - in trunk: . bin



Author: jannieuw
Date: Fri Aug  8 16:02:34 2008
New Revision: 13502
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13502&view=rev

Log:
2008-08-08  Jan Nieuwenhuizen  <janneke gnu org>

	* bin/gob: Handle tg create merge conflicts.


Modified:
   trunk/ChangeLog
   trunk/bin/gob

Modified: trunk/bin/gob
==============================================================================
--- trunk/bin/gob	(original)
+++ trunk/bin/gob	Fri Aug  8 16:02:34 2008
@@ -31,6 +31,7 @@
         print >> sys.stderr, command
         print >> sys.stderr, file ('gob.log').read ()
         raise SystemFailed ('Command failed: %(command)s' % locals ())
+    return status
 
 def read_pipe (command, raise_on_error=True):
     if options.verbose > 1:
@@ -522,7 +523,16 @@
                     self.system ('git rebase %(dependency)s' % locals ())
             else:
                 depend_str = ' '.join (dependencies)
-                self.system ('tg create %(branch)s %(depend_str)s' % locals ())
+                error = self.system ('tg create %(branch)s %(depend_str)s' % locals (), raise_on_error=False)
+                print 'error', error
+                while error:
+                    # tg create is allowed to fail by design, currently
+                    # FIXME: move this to tg-create --auto-merge
+                    self.system ('date > .topmsg')
+                    self.system ('mv .topdeps .topdeps~ && grep -Ev "(<|>|=){7}" .topdeps~ > .topdeps && rm .topdeps~')
+                    self.system ('git add .topdeps .topmsg')
+                    self.system ('git commit -am "auto-resolve topgit .top* merge failure"' % locals ())
+                    error = self.system ('tg create', raise_on_error=False)
                 self.system ('git commit -am "topgit branch info %(branch)s"' % locals ())
         else:
             self.checkout (branch)
@@ -536,6 +546,9 @@
         self.system ('git push . %(scratch)s:%(patched)s' % self.__dict__)
         self.checkout (self.patched)
         self.system ('git branch -D %(scratch)s' % self.__dict__)
+        if False and options.topgit and self.system ('git branch', raise_on_error=False):
+            # tg create failed, lost our HEAD, get new one
+            self.system ('git reset --hard HEAD')
     def pick_patch (self, patch, commit):
         branch = patch_get_branch (patch)
         print >> sys.stderr, 'Picking patch[%(branch)s]:' % locals (), patch.name



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