Show More
@@ -1745,13 +1745,19 b' class workingfilectx(committablefilectx)' | |||||
1745 | wvfs = self._repo.wvfs |
|
1745 | wvfs = self._repo.wvfs | |
1746 | f = self._path |
|
1746 | f = self._path | |
1747 | wvfs.audit(f) |
|
1747 | wvfs.audit(f) | |
1748 | if wvfs.isdir(f) and not wvfs.islink(f): |
|
|||
1749 | wvfs.rmtree(f, forcibly=True) |
|
|||
1750 | if self._repo.ui.configbool('experimental', 'merge.checkpathconflicts'): |
|
1748 | if self._repo.ui.configbool('experimental', 'merge.checkpathconflicts'): | |
|
1749 | # remove files under the directory as they should already be | |||
|
1750 | # warned and backed up | |||
|
1751 | if wvfs.isdir(f) and not wvfs.islink(f): | |||
|
1752 | wvfs.rmtree(f, forcibly=True) | |||
1751 | for p in reversed(list(util.finddirs(f))): |
|
1753 | for p in reversed(list(util.finddirs(f))): | |
1752 | if wvfs.isfileorlink(p): |
|
1754 | if wvfs.isfileorlink(p): | |
1753 | wvfs.unlink(p) |
|
1755 | wvfs.unlink(p) | |
1754 | break |
|
1756 | break | |
|
1757 | else: | |||
|
1758 | # don't remove files if path conflicts are not processed | |||
|
1759 | if wvfs.isdir(f) and not wvfs.islink(f): | |||
|
1760 | wvfs.removedirs(f) | |||
1755 |
|
1761 | |||
1756 | def setflags(self, l, x): |
|
1762 | def setflags(self, l, x): | |
1757 | self._repo.wvfs.setflags(self._path, l, x) |
|
1763 | self._repo.wvfs.setflags(self._path, l, x) |
@@ -30,23 +30,24 b" of the files in a commit we're updating " | |||||
30 |
|
30 | |||
31 | $ mkdir b && touch b/nonempty |
|
31 | $ mkdir b && touch b/nonempty | |
32 | $ hg up |
|
32 | $ hg up | |
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | abort: Directory not empty: '$TESTTMP/t/b' | |
|
34 | [255] | |||
34 | $ hg ci |
|
35 | $ hg ci | |
35 | nothing changed |
|
36 | abort: last update was interrupted | |
36 | [1] |
|
37 | (use 'hg update' to get a consistent checkout) | |
|
38 | [255] | |||
37 | $ hg sum |
|
39 | $ hg sum | |
38 |
parent: |
|
40 | parent: 0:538afb845929 | |
39 |
commit # |
|
41 | commit #0 | |
40 | branch: default |
|
42 | branch: default | |
41 | commit: (clean) |
|
43 | commit: 1 unknown (interrupted update) | |
42 | update: (current) |
|
44 | update: 1 new changesets (update) | |
43 | phases: 2 draft |
|
45 | phases: 2 draft | |
44 |
|
46 | |||
45 | The following line is commented out because the file doesn't exist at the moment, and some OSes error out even with `rm -f`. |
|
47 | $ rm b/nonempty | |
46 | $ rm b/nonempty |
|
|||
47 |
|
48 | |||
48 | $ hg up |
|
49 | $ hg up | |
49 |
|
|
50 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
50 | $ hg sum |
|
51 | $ hg sum | |
51 | parent: 1:b8bb4a988f25 tip |
|
52 | parent: 1:b8bb4a988f25 tip | |
52 | commit #1 |
|
53 | commit #1 |
@@ -50,7 +50,10 b' make sure that this does not erase untra' | |||||
50 | $ hg st |
|
50 | $ hg st | |
51 | ? name/file |
|
51 | ? name/file | |
52 | $ hg up 1 |
|
52 | $ hg up 1 | |
53 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | abort: Directory not empty: '$TESTTMP/r1/r2/name' | |
|
54 | [255] | |||
|
55 | $ cat name/file | |||
|
56 | text | |||
54 | $ cd .. |
|
57 | $ cd .. | |
55 |
|
58 | |||
56 | #if symlink |
|
59 | #if symlink |
General Comments 0
You need to be logged in to leave comments.
Login now