~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/send.py

  • Committer: Joe Julian
  • Date: 2010-01-10 02:25:31 UTC
  • mto: (4634.119.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: joe@julianfamily.org-20100110022531-wqk61rsagz8xsiga
Added MANIFEST.in to allow bdist_rpm to have all the required include files and tools. bdist_rpm will still fail to build correctly on some distributions due to a disttools bug http://bugs.python.org/issue644744

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
20
20
from bzrlib import (
21
21
    bzrdir,
22
22
    errors,
 
23
    merge_directive,
23
24
    osutils,
24
25
    registry,
25
26
    trace,
114
115
                    ).get_user_option_as_bool('send_strict')
115
116
            if strict is None: strict = True # default value
116
117
            if strict and tree is not None:
117
 
                if (tree.has_changes()):
 
118
                if (tree.has_changes(tree.basis_tree())
 
119
                    or len(tree.get_parent_ids()) > 1):
118
120
                    raise errors.UncommittedChanges(
119
121
                        tree, more='Use --no-strict to force the send.')
120
122
                if tree.last_revision() != tree.branch.last_revision():
121
123
                    # The tree has lost sync with its branch, there is little
122
124
                    # chance that the user is aware of it but he can still force
123
 
                    # the send with --no-strict
 
125
                    # the push with --no-strict
124
126
                    raise errors.OutOfDateTree(
125
127
                        tree, more='Use --no-strict to force the send.')
126
128
            revision_id = branch.last_revision()
149
151
 
150
152
def _send_4(branch, revision_id, submit_branch, public_branch,
151
153
            no_patch, no_bundle, message, base_revision_id):
152
 
    from bzrlib import merge_directive
153
154
    return merge_directive.MergeDirective2.from_objects(
154
155
        branch.repository, revision_id, time.time(),
155
156
        osutils.local_time_offset(), submit_branch,
171
172
            patch_type = 'diff'
172
173
        else:
173
174
            patch_type = None
174
 
    from bzrlib import merge_directive
175
175
    return merge_directive.MergeDirective.from_objects(
176
176
        branch.repository, revision_id, time.time(),
177
177
        osutils.local_time_offset(), submit_branch,