[Pkg-bazaar-commits] r197 ./bzr-builddeb/people/jdw/dev: Fix bd-do for export upstream case.

James Westby jw+debian at jameswestby.net
Mon Sep 17 19:39:24 UTC 2007


------------------------------------------------------------
revno: 197
committer: James Westby <jw+debian at jameswestby.net>
branch nick: dev
timestamp: Mon 2007-09-17 20:39:24 +0100
message:
  Fix bd-do for export upstream case.
  
  Copy and paste error that wasn't covered by the tests. Add a simple test
  for export upstream mode and fix it.
  
  Also fix a couple of imports that pyflakes caught (and it caught the bug,
  thanks).
modified:
  __init__.py
  tests/blackbox/test_do.py
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py	2007-09-16 18:11:30 +0000
+++ b/__init__.py	2007-09-17 19:39:24 +0000
@@ -23,7 +23,6 @@
 """bzr-builddeb - manage packages in a Bazaar branch."""
 
 import os
-import shutil
 import subprocess
 
 from bzrlib.commands import Command, register_command
@@ -39,6 +38,7 @@
                      DebNativeBuild,
                      DebSplitBuild,
                      DebMergeExportUpstreamBuild,
+                     DebExportUpstreamBuild,
                      )
 from config import DebBuildConfig
 from errors import (StopBuild,
@@ -527,7 +527,7 @@
                                           export_upstream_revision,
                                           prepull_upstream,
                                           stop_on_no_change,
-                                          _is_working_tree=working_tree)
+                                          _is_working_tree=True)
 
     build.prepare()
     try:

=== modified file 'tests/blackbox/test_do.py'
--- a/tests/blackbox/test_do.py	2007-09-15 22:11:56 +0000
+++ b/tests/blackbox/test_do.py	2007-09-17 19:39:24 +0000
@@ -171,3 +171,18 @@
       os.environ['SHELL'] = old_shell
     self.failUnlessExists('debian/shell')
 
+  def test_export_upstream(self):
+    self.make_merge_mode_config()
+    self.make_unpacked_source()
+    f = open('.bzr-builddeb/default.conf', 'ab')
+    try:
+      f.write('export-upstream = upstream\n')
+    finally:
+      f.close()
+    upstream = self.make_branch_and_tree('upstream')
+    self.build_tree(['upstream/a'])
+    upstream.add(['a'])
+    upstream.commit('one')
+    self.run_bzr(['bd-do', 'mkdir debian/dir'])
+    self.failUnlessExists('debian/dir')
+



More information about the Pkg-bazaar-commits mailing list