jhbuild r2111 - in trunk: . jhbuild/versioncontrol



Author: jsharpe
Date: Sat May 24 16:58:54 2008
New Revision: 2111
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2111&view=rev

Log:
2008-05-24  James Sharpe <jsharpe svn gnome org>

	* jhbuild/versioncontrol/git.py: Fixed git-svn show-ignore so >>
	is interpreted correctly by the shell. Only updates exclude file
	if the svn revision has changed.


Modified:
   trunk/ChangeLog
   trunk/jhbuild/versioncontrol/git.py

Modified: trunk/jhbuild/versioncontrol/git.py
==============================================================================
--- trunk/jhbuild/versioncontrol/git.py	(original)
+++ trunk/jhbuild/versioncontrol/git.py	Sat May 24 16:58:54 2008
@@ -309,6 +309,8 @@
 
         cwd = self.get_checkoutdir()
 
+        last_revision = get_output(['git-svn', 'find-rev', 'HEAD'], cwd=cwd)
+
         # stash uncommitted changes on the current branch
         cmd = ['git', 'stash', 'save', 'jhbuild-build']
         buildscript.execute(cmd, 'git stash', cwd=cwd)
@@ -319,12 +321,15 @@
         cmd = ['git-svn', 'rebase']
         buildscript.execute(cmd, 'git-svn rebase', cwd=cwd)
 
-        try:
-            #is known to fail on some versions
-            cmd = ['git-svn', 'show-ignore', '>>', '.git/info/exclude']
-            buildscript.execute(cmd, 'git-svn', cwd=cwd)
-        except:
-            pass
+        current_revision = get_output(['git-svn', 'find-rev', 'HEAD'], cwd=cwd)
+
+        if last_revision != current_revision:
+            try:
+                #is known to fail on some versions
+                cmd = "git-svn show-ignore >> .git/info/exclude"
+                buildscript.execute(cmd, 'git-svn show-ignore', cwd=cwd)
+            except:
+                pass
 
         #fixme, git-svn should support externals
         self._get_externals(buildscript, self.branch)



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