~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-14 14:30:21 UTC
  • mfrom: (3060.2.1 send-unlock)
  • Revision ID: pqm@pqm.ubuntu.com-20071214143021-aus9m0gqj1u9gr7n
(Lukáš Lalinský) Fix traceback in 'bzr send' outside of a branch, (bug #176300)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4026
4026
    def _run(self, submit_branch, revision, public_branch, remember, format,
4027
4027
             no_bundle, no_patch, output, from_, mail_to, message):
4028
4028
        from bzrlib.revision import NULL_REVISION
 
4029
        branch = Branch.open_containing(from_)[0]
4029
4030
        if output is None:
4030
4031
            outfile = StringIO()
4031
4032
        elif output == '-':
4032
4033
            outfile = self.outf
4033
4034
        else:
4034
4035
            outfile = open(output, 'wb')
 
4036
        # we may need to write data into branch's repository to calculate
 
4037
        # the data to send.
 
4038
        branch.lock_write()
4035
4039
        try:
4036
 
            branch = Branch.open_containing(from_)[0]
4037
 
            # we may need to write data into branch's repository to calculate
4038
 
            # the data to send.
4039
 
            branch.lock_write()
4040
4040
            if output is None:
4041
4041
                config = branch.get_config()
4042
4042
                if mail_to is None: