[Pkg-bazaar-commits] r188 ./bzr-builddeb/people/jdw/dev: Give some more help to the user about what they should do.

James Westby jw+debian at jameswestby.net
Sun Sep 16 16:24:23 UTC 2007


------------------------------------------------------------
revno: 188
committer: James Westby <jw+debian at jameswestby.net>
branch nick: dev
timestamp: Sun 2007-09-16 17:24:23 +0100
message:
  Give some more help to the user about what they should do.
  
  If the default command of $SHELL is used then tell the user that they can
  "exit 1" to abort the changes.
  
  Once the copying back has happened then tell the user they may need to add
  or remove files.
modified:
  __init__.py
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py	2007-09-15 22:11:56 +0000
+++ b/__init__.py	2007-09-16 16:24:23 +0000
@@ -481,8 +481,10 @@
                             "packages. See /usr/share/doc/bzr-builddeb"
                             "/user_manual/merge.html for more information.")
 
+    give_instruction = False
     if command is None:
       command = os.environ['SHELL']
+      give_instruction = True
     t = WorkingTree.open_containing('.')[0]
     (changelog, larstiq) = find_changelog(t, True)
     build_dir = config.build_dir
@@ -512,6 +514,9 @@
     except StopBuild, e:
       warning('Stopping the build: %s.', e.reason)
     info('Running "%s" in the exported directory.' % (command))
+    if give_instruction:
+      info('If you want to cancel your changes then exit with a non-zero '
+           'exit code, e.g. run "exit 1".')
     proc = subprocess.Popen(command, shell=True,
                             cwd=properties.source_dir())
     proc.wait()
@@ -532,6 +537,8 @@
       if proc.returncode != 0:
         raise BzrCommandError('Copying back debian/ failed')
     build.clean()
+    info('If any files were added or removed you should run "bzr add" or '
+         '"bzr rm" as appropriate.')
 
 
 register_command(cmd_bd_do)



More information about the Pkg-bazaar-commits mailing list