1. Michał Górny
  2. smart-live-rebuild


Michał Górny  committed ea08276

git-2: Use RemoteVCSSupport.

  • Participants
  • Parent commits 82a117b
  • Branches master

Comments (0)

Files changed (1)

File smartliverebuild/vcs/git_2.py

View file
 # (c) 2011 Michał Górny <mgorny@gentoo.org>
 # Released under the terms of the 3-clause BSD license or the GPL-2 license.
-from smartliverebuild.vcs import VCSSupport, NonLiveEbuild
+from smartliverebuild.vcs import RemoteVCSSupport, NonLiveEbuild
-class Git2Support(VCSSupport):
+class Git2Support(RemoteVCSSupport):
 	optenv = ['EGIT_COMMIT']
-	def __init__(self, *args):
-		VCSSupport.__init__(self, *args)
+	def __init__(self, *args, **kwargs):
+		RemoteVCSSupport.__init__(self, *args, **kwargs)
 		if self.env['EGIT_COMMIT'] and self.env['EGIT_COMMIT'] != self.env['EGIT_BRANCH']:
 			raise NonLiveEbuild('EGIT_COMMIT set, package is not really a live one')
 		self.repo_uris = self.env['EGIT_REPO_URI'].split()
 	def parseoutput(self, out):
 		return out.split()[0]
-	def getsavedrev(self):
+	@property
+	def savedrev(self):
 		return self.env['EGIT_VERSION']
-	def getupdatecmd(self):
+	@property
+	def updatecmd(self):
 		cmds = []
 		for r in self.repo_uris:
 			cmds.append('git ls-remote --heads %s %s' % (