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

  • Committer: Jelmer Vernooij
  • Date: 2019-06-03 23:48:08 UTC
  • mfrom: (7316 work)
  • mto: This revision was merged to the branch mainline in revision 7328.
  • Revision ID: jelmer@jelmer.uk-20190603234808-15yk5c7054tj8e2b
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1455
1455
                # Entry was removed; keep it listed, but mark it as gone.
1456
1456
                blobs[path] = (ZERO_SHA, 0)
1457
1457
            elif e.errno == errno.EISDIR:
1458
 
                # TODO(jelmer): Only do this if 'path' appears in .gitmodules?
 
1458
                # Backwards compatibility with Dulwich < 0.19.12;
 
1459
                # newer versions of Dulwich return either an entry for the
 
1460
                # submodule or None for directories.
1459
1461
                if S_ISGITLINK(index_entry.mode):
1460
1462
                    blobs[path] = (index_entry.sha, index_entry.mode)
1461
1463
                else:
1465
1467
            else:
1466
1468
                raise
1467
1469
        else:
1468
 
            blobs[path] = (live_entry.sha, cleanup_mode(live_entry.mode))
 
1470
            if live_entry is None:
 
1471
                # Entry was turned into a directory
 
1472
                dirified.append((path, Tree().id, stat.S_IFDIR))
 
1473
                store.add_object(Tree())
 
1474
            else:
 
1475
                blobs[path] = (live_entry.sha, cleanup_mode(live_entry.mode))
1469
1476
    if want_unversioned:
1470
1477
        for e in target.extras():
1471
1478
            st = target._lstat(e)