SF.net SVN: geany:[4763] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Mon Mar 15 14:06:29 UTC 2010
Revision: 4763
http://geany.svn.sourceforge.net/geany/?rev=4763&view=rev
Author: eht16
Date: 2010-03-15 14:06:29 +0000 (Mon, 15 Mar 2010)
Log Message:
-----------
Fix/Improve GIT repository detection (patch by Thomas Martitz, thanks).
Modified Paths:
--------------
trunk/ChangeLog
trunk/wscript
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-03-15 14:05:42 UTC (rev 4762)
+++ trunk/ChangeLog 2010-03-15 14:06:29 UTC (rev 4763)
@@ -4,6 +4,9 @@
For now revert the recent patch which set real_path of newly
open non-existent configuration files as this seems hackish and
causes 'file not found' warnings.
+ * wscript:
+ Fix/Improve GIT repository detection
+ (patch by Thomas Martitz, thanks).
2010-03-15 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/wscript
===================================================================
--- trunk/wscript 2010-03-15 14:05:42 UTC (rev 4762)
+++ trunk/wscript 2010-03-15 14:06:29 UTC (rev 4763)
@@ -118,13 +118,21 @@
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)
@@ -133,7 +141,7 @@
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)
@@ -273,7 +281,7 @@
print_message(conf, 'Use virtual terminal support', Options.options.no_vte and 'no' or 'yes')
if svn_rev != '-1':
print_message(conf, 'Compiling Subversion revision', svn_rev)
- conf.env.append_value('CCFLAGS', '-g -DGEANY_DEBUG'.split())
+ conf.env.append_value('CCFLAGS', '-g -O0 -DGEANY_DEBUG'.split())
conf.env.append_value('CCFLAGS', '-DHAVE_CONFIG_H')
# for now define GEANY_PRIVATE for all files, even though it should just be for src/*.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list