~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/send.py

  • Committer: Ian Clatworthy
  • Date: 2010-02-19 03:02:07 UTC
  • mto: (4797.23.1 integration-2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: ian.clatworthy@canonical.com-20100219030207-zpbzx021zavx4sqt
What's New in 2.1 - a summary of changes since 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
                       submit_branch)
78
78
 
79
79
        if mail_to is None or format is None:
 
80
            # TODO: jam 20090716 we open the submit_branch here, but we *don't*
 
81
            #       pass it down into the format creation, so it will have to
 
82
            #       open it again
80
83
            submit_br = Branch.open(submit_branch)
81
84
            submit_config = submit_br.get_config()
82
85
            if mail_to is None:
112
115
                    ).get_user_option_as_bool('send_strict')
113
116
            if strict is None: strict = True # default value
114
117
            if strict and tree is not None:
115
 
                if (tree.has_changes(tree.basis_tree())
116
 
                    or len(tree.get_parent_ids()) > 1):
 
118
                if (tree.has_changes()):
117
119
                    raise errors.UncommittedChanges(
118
120
                        tree, more='Use --no-strict to force the send.')
119
121
                if tree.last_revision() != tree.branch.last_revision():
120
122
                    # The tree has lost sync with its branch, there is little
121
123
                    # chance that the user is aware of it but he can still force
122
 
                    # the push with --no-strict
 
124
                    # the send with --no-strict
123
125
                    raise errors.OutOfDateTree(
124
126
                        tree, more='Use --no-strict to force the send.')
125
127
            revision_id = branch.last_revision()
126
128
        if revision_id == NULL_REVISION:
127
129
            raise errors.BzrCommandError('No revisions to submit.')
128
130
        if format is None:
129
 
            # TODO: Query submit branch for its preferred format
130
131
            format = format_registry.get()
131
132
        directive = format(branch, revision_id, submit_branch,
132
133
            public_branch, no_patch, no_bundle, message, base_revision_id)