~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/commands.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-07-12 09:49:37 UTC
  • mfrom: (2598.5.9 nullrevision)
  • Revision ID: pqm@pqm.ubuntu.com-20070712094937-rw5qbi81enh0pvhw
Make most functions prefer NULL_REVISION

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')