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
=== modified file 'pqm/script.py'
--- pqm/script.py 2009-03-26 00:19:45 +0000
+++ pqm/script.py 2009-03-26 19:50:07 +0000
@@ -518,13 +518,8 @@
518 branch_name = self._branch_name(branch)518 branch_name = self._branch_name(branch)
519 if not os.access(dirpath, os.W_OK):519 if not os.access(dirpath, os.W_OK):
520 os.mkdir(dirpath)520 os.mkdir(dirpath)
521 # set revision to the last element of the branch...
522 if config:
523 elements=re.split("/", config)
524 fullpath=os.path.join(dirpath, "%s---%s" % (elements[0], branch_name))
525 else:
526 fullpath=os.path.join(dirpath, branch_name)
527521
522 fullpath=os.path.join(dirpath, branch_name)
528 if os.access(fullpath, os.W_OK):523 if os.access(fullpath, os.W_OK):
529 self.script.logger.error("Working dir already exists: " + fullpath)524 self.script.logger.error("Working dir already exists: " + fullpath)
530 raise PQMException(sender, "Working dir already exists: " + fullpath)525 raise PQMException(sender, "Working dir already exists: " + fullpath)

Subscribers

People subscribed via source and target branches

to status/vote changes: