~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge_directive.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
        If the message is not supplied, the message from revision_id will be
204
204
        used for the commit.
205
205
        """
206
 
        t = testament.StrictTestament3.from_revision(repository, revision_id)
 
206
        t_revision_id = revision_id
 
207
        if revision_id == 'null:':
 
208
            t_revision_id = None
 
209
        t = testament.StrictTestament3.from_revision(repository, t_revision_id)
207
210
        submit_branch = _mod_branch.Branch.open(target_branch)
208
211
        if submit_branch.get_public_branch() is not None:
209
212
            target_branch = submit_branch.get_public_branch()
211
214
            patch = None
212
215
        else:
213
216
            submit_revision_id = submit_branch.last_revision()
 
217
            submit_revision_id = _mod_revision.ensure_null(submit_revision_id)
214
218
            repository.fetch(submit_branch.repository, submit_revision_id)
215
 
            ancestor_id = _mod_revision.common_ancestor(revision_id,
216
 
                                                        submit_revision_id,
217
 
                                                        repository)
 
219
            graph = repository.get_graph()
 
220
            ancestor_id = graph.find_unique_lca(revision_id,
 
221
                                                submit_revision_id)
218
222
            type_handler = {'bundle': klass._generate_bundle,
219
223
                            'diff': klass._generate_diff,
220
224
                            None: lambda x, y, z: None }