View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002789 | ardour | features | public | 2009-07-23 03:31 | 2020-04-19 20:14 |
| Reporter | seablade | Assigned To | paul | ||
| Priority | normal | Severity | minor | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Summary | 0002789: Add bzr support for wscript | ||||
| Description | This patch adds support for pulling the SVN revision number from bzr. For the record, subprocess.Popen seems to have issues with pipes in the command. As a result I recreated the sed/awk commands I initially tried to use in python. Also using subprocess is a good idea as the other functions seem to being deprecated in favor of it. If desired I can look into replacing the other functions that are subprocess is replacing with it, let me know. | ||||
| Tags | No tags attached. | ||||
|
2009-07-23 03:31
|
wscript_bzr.patch (936 bytes)
=== modified file 'wscript'
--- wscript 2009-07-22 12:51:16 +0000
+++ wscript 2009-07-23 03:23:24 +0000
@@ -5,6 +5,7 @@
import commands
import re
import string
+import subprocess
# Variables for 'waf dist'
VERSION = '3.0pre0'
@@ -53,12 +54,23 @@
pass
return rev
+def fetch_bzr_revision (path):
+ cmd = subprocess.Popen("LANG= bzr log -l 1 " + path, stdout=subprocess.PIPE, shell=True)
+ out = cmd.communicate()[0]
+ svn = re.search('^svn revno: [0-9]*', out, re.MULTILINE)
+ str = svn.group(0)
+ chars = 'svnreio: '
+ return string.lstrip(str, chars)
+
def create_stored_revision():
rev = ""
if os.path.exists('.svn'):
rev = fetch_svn_revision('.');
elif os.path.exists('.git'):
rev = fetch_git_revision('.');
+ elif os.path.exists('.bzr'):
+ rev = fetch_bzr_revision('.');
+ print "Revision: " + rev;
elif os.path.exists('libs/ardour/svn_revision.cc'):
print "Using packaged svn revision"
return
|
|
|
committed. |
|
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2009-07-23 03:31 | seablade | New Issue | |
| 2009-07-23 03:31 | seablade | File Added: wscript_bzr.patch | |
| 2009-07-23 03:31 | seablade | cost | => 0.00 |
| 2009-07-23 03:31 | seablade | Status | new => assigned |
| 2009-07-23 03:31 | seablade | Assigned To | => paul |
| 2009-07-23 12:04 | paul | Note Added: 0006458 | |
| 2009-07-23 12:04 | paul | Status | assigned => resolved |
| 2009-07-23 12:04 | paul | Resolution | open => fixed |
| 2020-04-19 20:14 | system | Note Added: 0021957 | |
| 2020-04-19 20:14 | system | Status | resolved => closed |