linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #00889
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2129: Fix bzr revision number stays 0 when standalone bzr installation used (thx Sulan)
------------------------------------------------------------
revno: 2129
committer: eMTee <emtee11@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Wed 2010-04-21 20:39:13 +0200
message:
Fix bzr revision number stays 0 when standalone bzr installation used (thx Sulan)
modified:
dcpp/SConscript
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/SConscript'
--- dcpp/SConscript 2009-03-17 13:33:26 +0000
+++ dcpp/SConscript 2010-04-21 18:39:13 +0000
@@ -9,6 +9,16 @@
return tree.branch.revision_id_to_revno(tree.last_revision())
except ImportError:
+ f = None
+ try:
+ f = open(env.Dir("#").abspath+"/.bzr/branch/last-revision",'r')
+ line = f.read()
+ pos = line.find(' ')
+ if pos > 0:
+ return int(line[:pos])
+ finally:
+ if f:
+ f.close()
return 0
Import('dev source_path')