Show More
@@ -1805,6 +1805,11 b' class overlayworkingctx(committablectx):' | |||
|
1805 | 1805 | else: |
|
1806 | 1806 | return self._wrappedctx[path].flags() |
|
1807 | 1807 | |
|
1808 | def __contains__(self, key): | |
|
1809 | if key in self._cache: | |
|
1810 | return self._cache[key]['exists'] | |
|
1811 | return key in self.p1() | |
|
1812 | ||
|
1808 | 1813 | def _existsinparent(self, path): |
|
1809 | 1814 | try: |
|
1810 | 1815 | # ``commitctx` raises a ``ManifestLookupError`` if a path does not |
@@ -1839,7 +1844,7 b' class overlayworkingctx(committablectx):' | |||
|
1839 | 1844 | components = path.split('/') |
|
1840 | 1845 | for i in pycompat.xrange(len(components)): |
|
1841 | 1846 | component = "/".join(components[0:i]) |
|
1842 |
if component in self |
|
|
1847 | if component in self: | |
|
1843 | 1848 | fail(path, component) |
|
1844 | 1849 | |
|
1845 | 1850 | # Test the other direction -- that this path from p2 isn't a directory |
@@ -1851,7 +1856,7 b' class overlayworkingctx(committablectx):' | |||
|
1851 | 1856 | if len(mfiles) == 1 and mfiles[0] == path: |
|
1852 | 1857 | return |
|
1853 | 1858 | # omit the files which are deleted in current IMM wctx |
|
1854 |
mfiles = [m for m in mfiles if self |
|
|
1859 | mfiles = [m for m in mfiles if m in self] | |
|
1855 | 1860 | if not mfiles: |
|
1856 | 1861 | return |
|
1857 | 1862 | raise error.Abort("error: file '%s' cannot be written because " |
@@ -243,12 +243,16 b' Test reporting of path conflicts' | |||
|
243 | 243 | $ echo c > c/c |
|
244 | 244 | $ hg add c/c |
|
245 | 245 | $ hg ci -m 'c/c' |
|
246 | BROKEN: This should be a conflict, should not crash | |
|
247 | $ hg rebase -r . -d 3 -n 2>&1 | grep KeyError | |
|
248 | KeyError: 'c' | |
|
249 | BROKEN: This should be a conflict, should not crash | |
|
250 | $ hg rebase -r 3 -d . -n 2>&1 | grep KeyError | |
|
251 | KeyError: 'c/c' | |
|
246 | $ hg rebase -r . -d 3 -n | |
|
247 | starting dry-run rebase; repository will not be changed | |
|
248 | rebasing 8:755f0104af9b "c/c" (tip) | |
|
249 | abort: error: 'c/c' conflicts with file 'c' in 3. | |
|
250 | [255] | |
|
251 | $ hg rebase -r 3 -d . -n | |
|
252 | starting dry-run rebase; repository will not be changed | |
|
253 | rebasing 3:844a7de3e617 "c" | |
|
254 | abort: error: file 'c' cannot be written because 'c/' is a folder in 755f0104af9b (containing 1 entries: c/c) | |
|
255 | [255] | |
|
252 | 256 | |
|
253 | 257 | $ cd .. |
|
254 | 258 |
General Comments 0
You need to be logged in to leave comments.
Login now