def get_merge_directive(self): from bzrlib.merge_directive import MergeDirective2 from bzrlib import osutils import time return MergeDirective2.from_objects(self.branch.repository, self.branch.last_revision(), time.time(), osutils.local_time_offset(), self.submit_branch.get_url(), public_branch=None, include_patch=True, include_bundle=True, message=None, base_revision_id=None)
def make_this_other_directive(self): this = self.make_branch_and_tree('this') this.commit('first commit') other = this.bzrdir.sprout('other').open_workingtree() self.build_tree_contents([('other/foo', 'bar')]) other.add('foo') other.commit('second commit') other.lock_write() try: directive = MergeDirective2.from_objects(other.branch.repository, other.last_revision(), 0, 0, 'this') finally: other.unlock() return this, other, directive