PQM

Merge lp:~statik/pqm/no-dashses-workingdir into lp:pqm

Proposed by Elliot Murphy
Status: Merged
Approved by: Robert Collins
Approved revision: 185
Merged at revision: not available
Proposed branch: lp:~statik/pqm/no-dashses-workingdir
Merge into: lp:pqm
Diff against target: 18 lines
To merge this branch: bzr merge lp:~statik/pqm/no-dashses-workingdir
Reviewer Review Type Date Requested Status
Robert Collins Pending
Review via email: mp+4944@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Elliot Murphy (statik) wrote :

This is a simple patch that changes the PQM working directory where tests are run so that it doesn't have leading dashes in one of the path components. This works around a problem we were having with CouchdDB, where tests were failing because of the path with leading dashes.

Yes, we should find and fix this in CouchDB. We will, but this patch was a good way to unblock a lot of engineers, and we are running it in production so I figured might as well go ahead and propose it for merging. It simplifies the code a tiny bit, so it's not a bad cleanup to have.

Revision history for this message
Tim Penhey (thumper) wrote :

What would the config contain in the conditional that you removed?

This patch seems fine to me, but I'm unsure as to what the config has.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'pqm/script.py'
2--- pqm/script.py 2009-03-26 00:19:45 +0000
3+++ pqm/script.py 2009-03-26 19:50:07 +0000
4@@ -518,13 +518,8 @@
5 branch_name = self._branch_name(branch)
6 if not os.access(dirpath, os.W_OK):
7 os.mkdir(dirpath)
8- # set revision to the last element of the branch...
9- if config:
10- elements=re.split("/", config)
11- fullpath=os.path.join(dirpath, "%s---%s" % (elements[0], branch_name))
12- else:
13- fullpath=os.path.join(dirpath, branch_name)
14
15+ fullpath=os.path.join(dirpath, branch_name)
16 if os.access(fullpath, os.W_OK):
17 self.script.logger.error("Working dir already exists: " + fullpath)
18 raise PQMException(sender, "Working dir already exists: " + fullpath)

Subscribers

People subscribed via source and target branches

to status/vote changes: