/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 breezy/git/fetch.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-01-24 02:15:54 UTC
  • mfrom: (7458.1.2 fix-submodule-import)
  • Revision ID: breezy.the.bot@gmail.com-20200124021554-jvnts81ex7g0ljvb
Support importing Git submodules as tree references.

Merged from https://code.launchpad.net/~jelmer/brz/fix-submodule-import/+merge/378021

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
    # Check what revision we should store
127
127
    parent_keys = []
128
128
    for ptree in parent_bzr_trees:
129
 
        ppath = find_previous_path(base_bzr_tree, ptree, decoded_path, file_id)
 
129
        ppath = find_previous_path(base_bzr_tree, ptree, decoded_path, file_id, recurse='none')
130
130
        if ppath is None:
131
131
            continue
132
132
        pkind = ptree.kind(ppath)
182
182
    (base_mode, mode) = modes
183
183
    if base_hexsha == hexsha and base_mode == mode:
184
184
        return [], {}
 
185
    path = path.decode('utf-8')
185
186
    file_id = lookup_file_id(path)
186
187
    invdelta = []
187
188
    ie = TreeReference(file_id, name.decode("utf-8"), parent_id)
188
189
    ie.revision = revision_id
189
190
    if base_hexsha is not None:
190
 
        old_path = path.decode("utf-8")  # Renames are not supported yet
 
191
        old_path = path  # Renames are not supported yet
191
192
        if stat.S_ISDIR(base_mode):
192
193
            invdelta.extend(remove_disappeared_children(
193
194
                base_bzr_tree, old_path, lookup_object(base_hexsha), [],