/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

Set parent path in git-import.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    def run(self, src_location, dest_location=None):
40
40
        from collections import defaultdict
41
41
        import os
 
42
        import urllib
42
43
        from bzrlib import (
43
44
            controldir,
44
45
            trace,
45
46
            ui,
 
47
            urlutils,
46
48
            )
47
49
        from bzrlib.bzrdir import (
48
50
            BzrDir,
123
125
                if head_branch.last_revision() != revid:
124
126
                    head_branch.generate_revision_history(revid)
125
127
                source_branch.tags.merge_to(head_branch.tags)
 
128
                if not head_branch.get_parent():
 
129
                    url = urlutils.join_segment_parameters(source_branch.base, {"ref": urllib.quote(name, '')})
 
130
                    head_branch.set_parent(url)
126
131
        finally:
127
132
            pb.finished()
128
133
        trace.note("Use 'bzr checkout' to create a working tree in "