~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge_directive.py

  • Committer: Aaron Bentley
  • Date: 2007-06-19 14:49:06 UTC
  • mto: This revision was merged to the branch mainline in revision 2537.
  • Revision ID: abentley@panoramicfeedback.com-20070619144906-zx160g6h377j729h
Fix handling of null revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
        If the message is not supplied, the message from revision_id will be
203
203
        used for the commit.
204
204
        """
205
 
        t = testament.StrictTestament3.from_revision(repository, revision_id)
 
205
        t_revision_id = revision_id
 
206
        if revision_id == 'null:':
 
207
            t_revision_id = None
 
208
        t = testament.StrictTestament3.from_revision(repository, t_revision_id)
206
209
        submit_branch = _mod_branch.Branch.open(target_branch)
207
210
        if submit_branch.get_public_branch() is not None:
208
211
            target_branch = submit_branch.get_public_branch()
210
213
            patch = None
211
214
        else:
212
215
            submit_revision_id = submit_branch.last_revision()
 
216
            submit_revision_id = _mod_revision.ensure_null(submit_revision_id)
213
217
            repository.fetch(submit_branch.repository, submit_revision_id)
214
218
            graph = repository.get_graph()
215
219
            ancestor_id = graph.find_unique_lca(revision_id,