diff options
| author | Sebastian Thiel <byronimo@gmail.com> | 2011-06-07 21:36:42 +0200 |
|---|---|---|
| committer | Sebastian Thiel <byronimo@gmail.com> | 2011-06-07 21:36:42 +0200 |
| commit | 58a930a632c867b65b9a3802e2f4190cf32e33ee (patch) | |
| tree | 95b1311a3a4bfcdf4c2dba66f360e6985184013e /git/index/base.py | |
| parent | a98e0af511b728030c12bf8633b077866bb74e47 (diff) | |
| parent | f6897c78be5a5530129df50742cb6cabfb8609c9 (diff) | |
| download | GitPython-58a930a632c867b65b9a3802e2f4190cf32e33ee.tar.gz GitPython-58a930a632c867b65b9a3802e2f4190cf32e33ee.zip | |
Merge branch 'gitdbmerger'
Diffstat (limited to 'git/index/base.py')
| -rw-r--r-- | git/index/base.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/git/index/base.py b/git/index/base.py index 88410e20..12097922 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -62,9 +62,8 @@ from fun import ( S_IFGITLINK ) -from gitdb.base import IStream -from gitdb.db import MemoryDB -from gitdb.util import to_bin_sha +from git.base import IStream +from git.util import to_bin_sha from itertools import izip __all__ = ( 'IndexFile', 'CheckoutError' ) @@ -512,7 +511,9 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): :raise UnmergedEntriesError: """ # we obtain no lock as we just flush our contents to disk as tree # If we are a new index, the entries access will load our data accordingly - mdb = MemoryDB() + # Needs delayed import as db.py import IndexFile as well + import git.db.py.mem + mdb = git.db.py.mem.PureMemoryDB() entries = self._entries_sorted() binsha, tree_items = write_tree_from_cache(entries, mdb, slice(0, len(entries))) @@ -959,12 +960,16 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): if not line.startswith("git checkout-index: ") and not line.startswith("git-checkout-index: "): is_a_dir = " is a directory" unlink_issue = "unable to unlink old '" + already_exists_issue = ' already exists, no checkout' # created by entry.c:checkout_entry(...) if line.endswith(is_a_dir): failed_files.append(line[:-len(is_a_dir)]) failed_reasons.append(is_a_dir) elif line.startswith(unlink_issue): failed_files.append(line[len(unlink_issue):line.rfind("'")]) failed_reasons.append(unlink_issue) + elif line.endswith(already_exists_issue): + failed_files.append(line[:-len(already_exists_issue)]) + failed_reasons.append(already_exists_issue) else: unknown_lines.append(line) continue |
