Merge lp:~aaron-whitehouse/duplicity/split_glob_matching_from_select into lp:~duplicity-team/duplicity/0.7-series
Status: | Merged |
---|---|
Merged at revision: | 1199 |
Proposed branch: | lp:~aaron-whitehouse/duplicity/split_glob_matching_from_select |
Merge into: | lp:~duplicity-team/duplicity/0.7-series |
Diff against target: |
382 lines (+191/-127) 4 files modified
duplicity/globmatch.py (+135/-0) duplicity/selection.py (+15/-115) testing/unit/test_globmatch.py (+41/-0) testing/unit/test_selection.py (+0/-12) |
To merge this branch: | bzr merge lp:~aaron-whitehouse/duplicity/split_glob_matching_from_select |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
duplicity-team | Pending | ||
Review via email: mp+288206@code.launchpad.net |
Commit message
Move glob matching code out of selection.py's Select function and into globmatch.py.
Description of the change
Move glob matching code out of selection.py's Select function and into globmatch.py for maintainability of the code base.
The Select function in selection.py is quite difficult to follow and is currently very long. Much of the bulk of the function comprises glob matching, which does not require any state from the class. Moving this out into globmatch.py will allow these more obvious functions to be maintained without the need to understand how the Select function works/interacts with other parts of duplicity.
This should also make it easier to replace parts of the glob matching code, such as replacing the regular expression approach with fnmatch, without unexpected effects to the rest of the code base.