~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/commands.py

  • Committer: Aaron Bentley
  • Date: 2007-07-11 19:44:51 UTC
  • mto: This revision was merged to the branch mainline in revision 2606.
  • Revision ID: abentley@panoramicfeedback.com-20070711194451-3jqhye1nnd02a9uv
Restore original Branch.last_revision behavior, fix bits that care

Show diffs side-by-side

added added

removed removed

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