Revision: 1169 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1169&view=re... Author: frlan Date: 2010-03-15 14:56:58 +0000 (Mon, 15 Mar 2010)
Log Message: ----------- GeanySendMail: Backport a change on waf to better support detection of svn/git.
Modified Paths: -------------- trunk/geanysendmail/wscript
Modified: trunk/geanysendmail/wscript =================================================================== --- trunk/geanysendmail/wscript 2010-03-15 14:20:29 UTC (rev 1168) +++ trunk/geanysendmail/wscript 2010-03-15 14:56:58 UTC (rev 1169) @@ -88,13 +88,21 @@ 'src/geanysendmail.c']
def configure(conf): + def in_git(): + cmd = 'git ls-files >/dev/null 2>&1' + return (Utils.exec_command(cmd) == 0) + + def in_svn(): + return os.path.exists('.svn') + def conf_get_svn_rev(): # try GIT - if os.path.exists('.git'): + if in_git(): cmds = [ 'git svn find-rev HEAD 2>/dev/null', 'git svn find-rev origin/trunk 2>/dev/null', 'git svn find-rev trunk 2>/dev/null', - 'git svn find-rev master 2>/dev/null' ] + 'git svn find-rev master 2>/dev/null' + ] for c in cmds: try: stdout = Utils.cmd_output(c) @@ -103,11 +111,10 @@ except: pass # try SVN - elif os.path.exists('.svn'): + elif in_svn(): try: _env = None if is_win32 else {'LANG' : 'C'} - stdout = Utils.cmd_output(cmd='svn info --non-interactive', - silent=True, env=_env) + stdout = Utils.cmd_output(cmd='svn info --non-interactive', silent=True, env=_env) lines = stdout.splitlines(True) for line in lines: if line.startswith('Last Changed Rev'): @@ -119,6 +126,7 @@ pass return '-1'
+ def set_lib_dir(): # use the libdir specified on command line if Options.options.libdir:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.