Merge lp:~statik/desktopcouch/forward-compatible into lp:desktopcouch

Proposed by Elliot Murphy
Status: Merged
Approved by: Elliot Murphy
Approved revision: 9
Merged at revision: not available
Proposed branch: lp:~statik/desktopcouch/forward-compatible
Merge into: lp:desktopcouch
Diff against target: None lines
To merge this branch: bzr merge lp:~statik/desktopcouch/forward-compatible
Reviewer Review Type Date Requested Status
Stuart Langridge (community) Approve
dobey (community) Approve
Review via email: mp+8957@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Elliot Murphy (statik) wrote :

Trying to make desktopcouch startup work with both 0.9.0 and trunk.

Revision history for this message
dobey (dobey) wrote :

I think you need to specify 0.10 instead of 0.1 in the startswith(). I also presume this will be removed again shortly as soon as 0.10 builds are widely available in our PPA?

review: Needs Fixing
Revision history for this message
Elliot Murphy (statik) wrote :

On 07/17/2009 04:39 PM, Rodney Dawes wrote:
> Review: Needs Fixing
> I think you need to specify 0.10 instead of 0.1 in the startswith().

I did 0.1 instead of 0.10 because 0.8 and 0.9 are what are around in the
wild, and I wanted this to not break when the version changes to 0.11
(on trunk) in 6 weeks. Yes this should be removed when 0.10 goes into
Karmic.

--
Elliot Murphy | https://launchpad.net/~statik/

Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Stuart Langridge (sil) wrote :

Looks sensible to me!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'desktopcouch/local_files.py'
--- desktopcouch/local_files.py 2009-07-08 17:48:11 +0000
+++ desktopcouch/local_files.py 2009-07-17 18:47:49 +0000
@@ -62,8 +62,18 @@
62 print "Could not find couchdb"62 print "Could not find couchdb"
63 sys.exit(1)63 sys.exit(1)
6464
65def couch_chain_flag():
66 process = subprocess.Popen(COUCH_EXE, '-V'], stdout=subprocess.PIPE)
67 line = process.stdout.read().split('\n')[0]
68 couchversion = line.split()[-1]
69 if couchversion().startswith('0.1'):
70 chain = '-a'
71 else:
72 chain = '-C'
73
74
65# YOu will need to add -b or -k on the end of this75# YOu will need to add -b or -k on the end of this
66COUCH_EXEC_COMMAND = [COUCH_EXE, '-C', FILE_INI, '-p', FILE_PID, 76COUCH_EXEC_COMMAND = [COUCH_EXE, couch_chain_flag(), FILE_INI, '-p', FILE_PID,
67 '-o', FILE_STDOUT, '-e', FILE_STDERR]77 '-o', FILE_STDOUT, '-e', FILE_STDERR]
6878
6979

Subscribers

People subscribed via source and target branches