Merge lp:~toshio/bzr-gtk/handle-patch-dirty into lp:bzr-gtk/gtk2
Status: | Merged |
---|---|
Merged at revision: | 693 |
Proposed branch: | lp:~toshio/bzr-gtk/handle-patch-dirty |
Merge into: | lp:bzr-gtk/gtk2 |
Diff against target: |
50 lines (+10/-3) 2 files modified
bzr-handle-patch (+1/-1) diff.py (+9/-2) |
To merge this branch: | bzr merge lp:~toshio/bzr-gtk/handle-patch-dirty |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bazaar GTK maintainers | Pending | ||
Review via email: mp+23330@code.launchpad.net |
Description of the change
This fixes bzr-handle-patch to not traceback with patches that have leading and trailing comments if a newer bzr (2.2b1 is the first release to support this) is installed. If an older bzr is installed, the code falls back on the old behaviour that handles clean patches but fails on "dirty" ones.
Note: Detection of recent enough bzr uses inspect.
* it seems more pythonic to detect that bzrlib has the necessary parameter than to hardcode versions
* since the change only appears in bzr-2.2b1; downstream distributors are likely to backport the fix. If they do that, a bzrlib.version_info check in bzr-gtk would need to be patched out as well as it would no longer represent the capabilities of that bzrlib.
If you don't like getargspec(), we can substitute::
if bzrlib.