Merge lp:~jelmer/bzr-builddeb/lazy-changelog into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Merged at revision: 453
Proposed branch: lp:~jelmer/bzr-builddeb/lazy-changelog
Merge into: lp:bzr-builddeb
Diff against target: 31 lines (+2/-3)
1 file modified
merge_changelog.py (+2/-3)
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/lazy-changelog
Reviewer Review Type Date Requested Status
Bzr-builddeb-hackers Pending
Review via email: mp+25842@code.launchpad.net

Description of the change

Trivial patch to lazily import changelog from debian_bundle since merge_changelog.py gets imported every time bzr is run.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

Looks fine to me - though you'll want the debian/debian_bundle support
here too, won't you? Might be trickier...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'merge_changelog.py'
2--- merge_changelog.py 2010-02-04 16:31:42 +0000
3+++ merge_changelog.py 2010-05-23 15:00:47 +0000
4@@ -20,11 +20,8 @@
5
6 from bzrlib import (
7 merge,
8- merge3,
9 )
10
11-from debian_bundle import changelog
12-
13 class ChangeLogFileMerge(merge.ConfigurableFileMerger):
14
15 name_prefix = 'deb_changelog'
16@@ -41,6 +38,7 @@
17
18 def merge_changelog(this_lines, other_lines, base_lines=[]):
19 """Merge a changelog file."""
20+ from debian_bundle import changelog
21
22 try:
23 left_cl = read_changelog(this_lines)
24@@ -128,6 +126,7 @@
25
26 def read_changelog(lines, strict=True):
27 """Return a parsed changelog file."""
28+ from debian_bundle import changelog
29 # Note: There appears to be a bug in Changelog if you pass it an iterable
30 # of lines (like a file obj, or a list of lines). Specifically, it
31 # does not strip trailing newlines, and it adds ones back in, so you

Subscribers

People subscribed via source and target branches