Merge lp:~henninge/launchpad/bug-517080-pottery-split into lp:launchpad
Proposed by
Henning Eggers
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Henning Eggers | ||||
Approved revision: | not available | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~henninge/launchpad/bug-517080-pottery-split | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
319 lines (+104/-47) 3 files modified
lib/lp/testing/__init__.py (+8/-8) lib/lp/translations/pottery/detect_intltool.py (+35/-0) lib/lp/translations/tests/test_pottery_detect_intltool.py (+61/-39) |
||||
To merge this branch: | bzr merge lp:~henninge/launchpad/bug-517080-pottery-split | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | code | Approve | |
Review via email: mp+19325@code.launchpad.net |
Commit message
Provided check for possible intltool structure in a bzrlib.Tree.
To post a comment you must log in.
= Bug 517080 =
Although the bug talks about "splitting up", this branch really provides an extra function that simply checks for "POTFILES.in" existing in the tree. There was no code that could be re-used because the existing code works on the filesystem while this new function works directly on a bzrlib.Tree object.
== Implementation details ==
The code is straight forward - walk the tree and report success if a "POTFILES.in" is found.
This makes use of the new "with" statement with a context manager to acquire a lock on the tree. This seems to be a perfect use case for this new language feature and eventually the context manager should become part of bzrlib.Tree.
== Tests ==
The new test case uses the same packages as the tests that ran on the filesystem but uses BzrDir to create a working tree from the directories. The files in the trees don't actually get added and committed to the tree, simply because for the function to work this is not necessary.
To share some functionality between test cases, a mix-in class was created and some methods moved into it. This bloats the diff quite a bit because the method names lose a leading underscore.
bin/test -vvt pottery
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: translations/ pottery/ detect_ intltool. py translations/ tests/test_ pottery_ detect_ intltool. py
lib/lp/
lib/lp/