~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/commands.py

  • Committer: Vincent Ladeuil
  • Date: 2007-07-15 11:24:18 UTC
  • mfrom: (2617 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070715112418-9nn4n6esxv60ny4b
merge bzr.dev@1617

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
            base_specified = True
118
118
 
119
119
        if revision is None:
120
 
            target_revision = target_branch.last_revision()
 
120
            target_revision = _mod_revision.ensure_null(
 
121
                target_branch.last_revision())
121
122
        elif len(revision) < 3:
122
123
            target_revision = revision[-1].in_history(target_branch).rev_id
123
124
            if len(revision) == 2:
155
156
                elif remember:
156
157
                    raise errors.BzrCommandError('--remember requires a branch'
157
158
                                                 ' to be specified.')
 
159
            base_last_revision = _mod_revision.ensure_null(
 
160
                base_branch.last_revision())
158
161
            target_branch.repository.fetch(base_branch.repository, 
159
 
                                           base_branch.last_revision())
 
162
                base_last_revision)
160
163
            graph = target_branch.repository.get_graph()
161
 
            base_revision = graph.find_unique_lca(
162
 
                _mod_revision.ensure_null(base_branch.last_revision()),
163
 
                _mod_revision.ensure_null(target_revision))
 
164
            base_revision = graph.find_unique_lca(base_last_revision,
 
165
                                                  target_revision)
164
166
 
165
167
        if output is not None:
166
168
            fileobj = file(output, 'wb')