else:
remote = app.Repo
vcs = getvcs(app.RepoType, remote, build_dir)
+ logging.debug("Using %s" % vcs.clientversion())
return vcs, build_dir
def repotype(self):
return None
+ def clientversion(self):
+ versionstr = FDroidPopen(self.clientversioncmd()).output
+ return versionstr[0:versionstr.find('\n')]
+
+ def clientversioncmd(self):
+ return None
+
def gotorevision(self, rev, refresh=True):
"""Take the local repository to a clean version of the given
revision, which is specificed in the VCS's native
def repotype(self):
return 'git'
+ def clientversioncmd(self):
+ return ['git', '--version']
+
def checkrepo(self):
"""If the local directory exists, but is somehow not a git repository,
git will traverse up the directory tree until it finds one
def repotype(self):
return 'git-svn'
+ def clientversioncmd(self):
+ return ['git', 'svn', '--version']
+
def checkrepo(self):
"""If the local directory exists, but is somehow not a git repository,
git will traverse up the directory tree until it finds one that
def repotype(self):
return 'hg'
+ def clientversioncmd(self):
+ return ['hg', '--version']
+
def gotorevisionx(self, rev):
if not os.path.exists(self.local):
p = FDroidPopen(['hg', 'clone', self.remote, self.local], output=False)
def repotype(self):
return 'bzr'
+ def clientversioncmd(self):
+ return ['bzr', '--version']
+
def gotorevisionx(self, rev):
if not os.path.exists(self.local):
p = FDroidPopen(['bzr', 'branch', self.remote, self.local], output=False)