~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/reconfigure.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-01-22 22:50:27 UTC
  • mfrom: (2796.2.36 bzr.reconfigure)
  • Revision ID: pqm@pqm.ubuntu.com-20080122225027-vp7xsc3kue1uw2r5
Preserve tags when reconfiguring

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
        if self.referenced_branch is None:
134
134
            if want_reference:
135
135
                self._create_reference = True
 
136
                if self.local_branch is not None:
 
137
                    self._destroy_branch = True
136
138
        else:
137
139
            if not want_reference:
138
140
                self._destroy_reference = True
227
229
            self.bzrdir.destroy_branch()
228
230
        if self._destroy_branch:
229
231
            last_revision_info = self.local_branch.last_revision_info()
 
232
            if self._create_reference:
 
233
                self.local_branch.tags.merge_to(reference_branch.tags)
230
234
            self.bzrdir.destroy_branch()
231
235
        if self._create_branch:
232
236
            local_branch = self.bzrdir.create_branch()
233
237
            if last_revision_info is not None:
234
238
                local_branch.set_last_revision_info(*last_revision_info)
 
239
            if self._destroy_reference:
 
240
                self.referenced_branch.tags.merge_to(local_branch.tags)
235
241
        else:
236
242
            local_branch = self.local_branch
237
243
        if self._create_reference: