Merge lp://staging/~jelmer/bzr-builddeb/get-source-format into lp://staging/bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Approved by: James Westby
Approved revision: 583
Merged at revision: 582
Proposed branch: lp://staging/~jelmer/bzr-builddeb/get-source-format
Merge into: lp://staging/bzr-builddeb
Diff against target: 34 lines (+10/-2)
2 files modified
tests/test_util.py (+6/-0)
util.py (+4/-2)
To merge this branch: bzr merge lp://staging/~jelmer/bzr-builddeb/get-source-format
Reviewer Review Type Date Requested Status
Bzr-builddeb-hackers Pending
Review via email: mp+68090@code.staging.launchpad.net

Description of the change

Fix the use of get_source_format when debian/source/format is unversioned.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

On Fri, 15 Jul 2011 14:20:03 -0000, Jelmer Vernooij <email address hidden> wrote:
> if not tree.has_filename("debian/source/format"):
> return FORMAT_1_0
> - return tree.get_file_text(tree.path2id("debian/source/format")).strip()
> + text = tree.get_file_text(tree.path2id("debian/source/format"),
> + "debian/source/format")
> + return text.strip()

Looks good, but perhaps we could make all those magic strings one
variable?

Thanks,

James

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Fri, 2011-07-15 at 14:46 +0000, James Westby wrote:
> On Fri, 15 Jul 2011 14:20:03 -0000, Jelmer Vernooij <email address hidden> wrote:
> > if not tree.has_filename("debian/source/format"):
> > return FORMAT_1_0
> > - return tree.get_file_text(tree.path2id("debian/source/format")).strip()
> > + text = tree.get_file_text(tree.path2id("debian/source/format"),
> > + "debian/source/format")
> > + return text.strip()
>
> Looks good, but perhaps we could make all those magic strings one
> variable?
That seems reasonable - updated in the current branch.

Cheers,

Jelmer

583. By Jelmer Vernooij

factor out variable.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches