/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/selftest/__init__.py

  • Committer: Robert Collins
  • Date: 2005-10-29 23:48:45 UTC
  • Revision ID: robertc@robertcollins.net-20051029234845-7ae4e7d118bdd3ed
Implement a 'bzr push' command, with saved locations; update diff to return 1.

    * 'bzr diff' now returns 1 when there are changes in the working 
      tree.

    * 'bzr push' now exists and can push changes to a remote location. 
      This uses the transport infrastructure, and can store the remote
      location in the ~/.bazaar/branches.conf configuration file.

    * WorkingTree.pull has been split across Branch and WorkingTree,
      to allow Branch only pulls.

    * commands.display_command now returns the result of the decorated 
      function.

    * LocationConfig now has a set_user_option(key, value) call to save
      a setting in its matching location section (a new one is created
      if needed).

    * Branch has two new methods, get_push_location and set_push_location
      to respectively, get and set the push location.

Show diffs side-by-side

added added

removed removed

Lines of Context:
301
301
        else:
302
302
            return self._log_contents
303
303
 
304
 
    def capture(self, cmd):
 
304
    def capture(self, cmd, retcode=0):
305
305
        """Shortcut that splits cmd into words, runs, and returns stdout"""
306
 
        return self.run_bzr_captured(cmd.split())[0]
 
306
        return self.run_bzr_captured(cmd.split(), retcode=retcode)[0]
307
307
 
308
308
    def run_bzr_captured(self, argv, retcode=0):
309
309
        """Invoke bzr and return (stdout, stderr).
473
473
        self.test_dir = os.path.join(self.TEST_ROOT, short_id)
474
474
        os.mkdir(self.test_dir)
475
475
        os.chdir(self.test_dir)
 
476
        os.environ['HOME'] = self.test_dir
476
477
        def _leaveDirectory():
477
478
            os.chdir(_currentdir)
478
479
        self.addCleanup(_leaveDirectory)