/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to upgrade.py

  • Committer: Jelmer Vernooij
  • Date: 2009-03-14 18:17:35 UTC
  • mto: (0.436.139 foreign)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20090314181735-i2u2gb2lv6iyy2no
Add keys to virtual VersionedFiles.

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
 
146
146
 
147
147
def upgrade_tags(tags, repository, foreign_repository, new_mapping, 
148
 
                 allow_changes=False, verbose=False, branch_renames=None):
 
148
                 allow_changes=False, verbose=False, branch_renames=None,
 
149
                 branch_ancestry=None):
149
150
    """Upgrade a tags dictionary."""
150
151
    renames = {}
151
152
    if branch_renames is not None:
159
160
                renames.update(upgrade_repository(repository, foreign_repository, 
160
161
                      revision_id=revid, new_mapping=new_mapping,
161
162
                      allow_changes=allow_changes, verbose=verbose))
162
 
            if revid in renames:
 
163
            if revid in renames and (branch_ancestry is None or not revid in branch_ancestry):
163
164
                tags.set_tag(name, renames[revid])
164
165
    finally:
165
166
        pb.finished()
178
179
    renames = upgrade_repository(branch.repository, foreign_repository, 
179
180
              revision_id=revid, new_mapping=new_mapping,
180
181
              allow_changes=allow_changes, verbose=verbose)
 
182
    if revid in renames:
 
183
        branch.generate_revision_history(renames[revid])
 
184
    ancestry = branch.repository.get_ancestry(branch.last_revision(), topo_sorted=False)
181
185
    upgrade_tags(branch.tags, branch.repository, foreign_repository, 
182
186
           new_mapping=new_mapping, 
183
 
           allow_changes=allow_changes, verbose=verbose, branch_renames=renames)
184
 
    if revid in renames:
185
 
        branch.generate_revision_history(renames[revid])
 
187
           allow_changes=allow_changes, verbose=verbose, branch_renames=renames,
 
188
           branch_ancestry=ancestry)
186
189
    return renames
187
190
 
188
191