/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

Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
            InterRepository,
58
58
            Repository,
59
59
            )
60
 
        from bzrlib.plugins.git.branch import GitBranch
 
60
        from bzrlib.plugins.git.branch import (
 
61
            GitBranch,
 
62
            extract_tags,
 
63
            )
61
64
        from bzrlib.plugins.git.repository import GitRepository
62
65
 
63
66
        if dest_location is None:
82
85
        interrepo = InterRepository.get(source_repo, target_repo)
83
86
        mapping = source_repo.get_mapping()
84
87
        refs = interrepo.fetch_refs()
 
88
        tags = extract_tags(refs, mapping)
85
89
        pb = ui.ui_factory.nested_progress_bar()
86
90
        try:
87
91
            for i, (name, ref) in enumerate(refs.iteritems()):
102
106
                    head_branch = head_bzrdir.create_branch()
103
107
                revid = mapping.revision_id_foreign_to_bzr(ref)
104
108
                source_branch = GitBranch(source_repo.bzrdir, source_repo, 
105
 
                    name, None)
 
109
                    name, None, tags)
106
110
                source_branch.head = ref
107
 
                head_branch.generate_revision_history(revid)
 
111
                if head_branch.last_revision() != revid:
 
112
                    head_branch.generate_revision_history(revid)
108
113
                source_branch.tags.merge_to(head_branch.tags)
109
114
        finally:
110
115
            pb.finished()