Merge branch 'master' of https://github.com/synergy/synergy
This commit is contained in:
commit
e746cc401a
|
@ -17,3 +17,22 @@
|
||||||
#doxygen
|
#doxygen
|
||||||
/doc/doxygen
|
/doc/doxygen
|
||||||
/doc/doxygen.cfg
|
/doc/doxygen.cfg
|
||||||
|
/build
|
||||||
|
/ext/cryptopp562
|
||||||
|
/ext/gmock-1.6.0
|
||||||
|
/ext/gtest-1.6.0
|
||||||
|
/lib
|
||||||
|
/src/gui/ui_SetupWizardBase.h
|
||||||
|
/src/gui/Makefile
|
||||||
|
/src/gui/Makefile.Debug
|
||||||
|
/src/gui/Makefile.Release
|
||||||
|
/src/gui/object_script.synergy.Debug
|
||||||
|
/src/gui/object_script.synergy.Release
|
||||||
|
/src/gui/ui_AboutDialogBase.h
|
||||||
|
/src/gui/ui_ActionDialogBase.h
|
||||||
|
/src/gui/ui_HotkeyDialogBase.h
|
||||||
|
/src/gui/ui_MainWindowBase.h
|
||||||
|
/src/gui/ui_ScreenSettingsDialogBase.h
|
||||||
|
/src/gui/ui_ServerConfigDialogBase.h
|
||||||
|
/src/gui/ui_SettingsDialogBase.h
|
||||||
|
/src/gui/tmp
|
||||||
|
|
|
@ -941,6 +941,24 @@ class InternalCommands:
|
||||||
print self.find_revision()
|
print self.find_revision()
|
||||||
|
|
||||||
def find_revision(self):
|
def find_revision(self):
|
||||||
|
return self.getGitRevision()
|
||||||
|
|
||||||
|
def getGitRevision(self):
|
||||||
|
if sys.version_info < (2, 4):
|
||||||
|
raise Exception("Python 2.4 or greater required.")
|
||||||
|
else:
|
||||||
|
p = subprocess.Popen(
|
||||||
|
["git", "log", "--pretty=format:%h", "-n", "1"],
|
||||||
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
|
||||||
|
stdout, stderr = p.communicate()
|
||||||
|
|
||||||
|
if p.returncode != 0:
|
||||||
|
raise Exception('Could not get revision - git info failed with code: ' + str(p.returncode))
|
||||||
|
|
||||||
|
return stdout
|
||||||
|
|
||||||
|
def find_revision_svn(self):
|
||||||
if sys.version_info < (2, 4):
|
if sys.version_info < (2, 4):
|
||||||
stdout = commands.getoutput('svn info')
|
stdout = commands.getoutput('svn info')
|
||||||
else:
|
else:
|
||||||
|
@ -1174,7 +1192,8 @@ class InternalCommands:
|
||||||
shutil.rmtree(exportPath)
|
shutil.rmtree(exportPath)
|
||||||
|
|
||||||
print 'Exporting repository to: ' + exportPath
|
print 'Exporting repository to: ' + exportPath
|
||||||
err = os.system('svn export . ' + exportPath)
|
os.mkdir(exportPath)
|
||||||
|
err = os.system('git archive master | tar -x -C ' + exportPath)
|
||||||
if err != 0:
|
if err != 0:
|
||||||
raise Exception('Repository export failed: ' + str(err))
|
raise Exception('Repository export failed: ' + str(err))
|
||||||
|
|
||||||
|
@ -1403,7 +1422,7 @@ class InternalCommands:
|
||||||
def dist_name_rev(self, type):
|
def dist_name_rev(self, type):
|
||||||
# find the version number (we're puting the rev in after this)
|
# find the version number (we're puting the rev in after this)
|
||||||
pattern = '(.*\d+\.\d+\.\d+)(.*)'
|
pattern = '(.*\d+\.\d+\.\d+)(.*)'
|
||||||
replace = '\g<1>-r' + self.find_revision() + '\g<2>'
|
replace = '\g<1>-' + self.find_revision() + '\g<2>'
|
||||||
return re.sub(pattern, replace, self.dist_name(type))
|
return re.sub(pattern, replace, self.dist_name(type))
|
||||||
|
|
||||||
def dist_usage(self):
|
def dist_usage(self):
|
||||||
|
|
Loading…
Reference in New Issue