/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 commands.py

Stop importing tags as branches as part of git-import.

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
        pb = ui.ui_factory.nested_progress_bar()
103
103
        try:
104
104
            for i, (name, ref) in enumerate(refs.iteritems()):
 
105
                if name.startswith("refs/tags/"):
 
106
                    continue
105
107
                pb.update("creating branches", i, len(refs))
106
 
                if name.endswith("^{}"):
107
 
                    continue
108
108
                head_loc = os.path.join(dest_location, name)
109
109
                try:
110
110
                    head_bzrdir = BzrDir.open(head_loc)
117
117
                    head_branch = head_bzrdir.open_branch()
118
118
                except NotBranchError:
119
119
                    head_branch = head_bzrdir.create_branch()
120
 
                if ("%s^{}" % name) in refs:
121
 
                    revid = mapping.revision_id_foreign_to_bzr(
122
 
                        refs["%s^{}" % name])
123
 
                else:
124
 
                    revid = mapping.revision_id_foreign_to_bzr(ref)
 
120
                revid = mapping.revision_id_foreign_to_bzr(ref)
125
121
                head_branch.generate_revision_history(revid)
126
122
        finally:
127
123
            pb.finished()