From kde-commits Sat Nov 20 17:41:40 2010 From: Andre Heinecke Date: Sat, 20 Nov 2010 17:41:40 +0000 To: kde-commits Subject: kdesupport/emerge/bin/Source Message-Id: <20101120174140.0FC1FAC8A3 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129027495502828 SVN commit 1199120 by aheinecke: Let git pull do the merging but tell it wich branch to pull. Tested in several scenarios everything we do appears to work. M +3 -3 GitSource.py --- trunk/kdesupport/emerge/bin/Source/GitSource.py #1199119:1199120 @@ -81,7 +81,9 @@ os.environ[ "PATH" ] = os.path.join( self.rootdir, "git", "bin" ) + ";" + safePath if os.path.exists( self.checkoutDir() ): - ret = self.shell.execute( self.checkoutDir(), "git", "fetch" ) + if not repoTag: + ret = self.shell.execute( self.checkoutDir(), "git", + "pull origin %s" % repoBranch or "master" ) else: # it doesn't exist so clone the repo os.makedirs( self.checkoutDir() ) @@ -105,8 +107,6 @@ else: ret = self.shell.execute( self.checkoutDir(), "git", "checkout %s" % repoTag ) - if ret and not repoTag: - ret = self.shell.execute( self.checkoutDir(), "git", "merge origin %s" % self.__getCurrentBranch() ) else: utils.debug( "skipping git fetch (--offline)" ) return ret