Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6f0358f085
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (20 sloc) 0.928 kb
diff -r 2b851bdf148c tools/gpick.py
--- a/tools/gpick.py Sun Aug 21 19:17:49 2011 +0300
+++ b/tools/gpick.py Wed Nov 02 09:27:42 2011 +0200
@@ -99,14 +99,10 @@
def GetVersionInfo(self):
try:
- svn_revision = subprocess.Popen(['svnversion', '-n', self.GetLaunchDir()], shell=False, stdout=subprocess.PIPE).communicate()[0]
- svn_revision = str(svn_revision)
- if svn_revision=="exported":
- svn_revision=""
- svn_revision=svn_revision.replace(':','.')
- svn_revision=svn_revision.rstrip('PSM')
- revision=svn_revision;
- except OSError, e:
+ revision = subprocess.Popen(['hg', 'log', '--template', '"{rev}:{node}\\n"', '-r', 'tip', self.GetLaunchDir()], shell=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]
+ match = re.search('([\d]+):([\d\w]+)', str(revision))
+ revision = match.group(0)
+ except:
revision = ''
self.Replace(GPICK_BUILD_REVISION = revision,
Jump to Line
Something went wrong with that request. Please try again.