Show More
@@ -293,8 +293,8 b' def updateworkingcopy(repo, assumeclean=' | |||
|
293 | 293 | removedmatch = matchmod.differencematcher(oldmatch, newmatch) |
|
294 | 294 | |
|
295 | 295 | ds = repo.dirstate |
|
296 |
lookup, status = ds.status(removedmatch, subrepos=[], ignored= |
|
|
297 |
clean=True, unknown= |
|
|
296 | lookup, status = ds.status(removedmatch, subrepos=[], ignored=True, | |
|
297 | clean=True, unknown=True) | |
|
298 | 298 | trackeddirty = status.modified + status.added |
|
299 | 299 | clean = status.clean |
|
300 | 300 | if assumeclean: |
@@ -306,6 +306,10 b' def updateworkingcopy(repo, assumeclean=' | |||
|
306 | 306 | uipathfn = scmutil.getuipathfn(repo) |
|
307 | 307 | for f in sorted(trackeddirty): |
|
308 | 308 | repo.ui.status(_('not deleting possibly dirty file %s\n') % uipathfn(f)) |
|
309 | for f in sorted(status.unknown): | |
|
310 | repo.ui.status(_('not deleting unknown file %s\n') % uipathfn(f)) | |
|
311 | for f in sorted(status.ignored): | |
|
312 | repo.ui.status(_('not deleting ignored file %s\n') % uipathfn(f)) | |
|
309 | 313 | for f in clean + trackeddirty: |
|
310 | 314 | ds.drop(f) |
|
311 | 315 |
@@ -28,6 +28,9 b'' | |||
|
28 | 28 | $ hg clone --narrow ssh://user@dummy/remote main -q \ |
|
29 | 29 | > --include d1 --include d3 --include d5 --include d7 |
|
30 | 30 | |
|
31 | Ignore file called "ignored" | |
|
32 | $ echo ignored > main/.hgignore | |
|
33 | ||
|
31 | 34 |
$ |
|
32 | 35 | updating working directory |
|
33 | 36 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
@@ -55,15 +58,19 b' Narrow the share and check that the main' | |||
|
55 | 58 | # Make d3/f dirty |
|
56 | 59 | $ echo x >> main/d3/f |
|
57 | 60 | $ echo y >> main/d3/g |
|
61 | $ touch main/d3/ignored | |
|
62 | $ touch main/d3/untracked | |
|
58 | 63 | $ hg add main/d3/g |
|
59 | 64 | $ hg -R main st |
|
60 | 65 | M d3/f |
|
61 | 66 | A d3/g |
|
67 | ? d3/untracked | |
|
62 | 68 | # Make d5/f not match the dirstate timestamp even though it's clean |
|
63 | 69 | $ sleep 2 |
|
64 | 70 | $ hg -R main st |
|
65 | 71 | M d3/f |
|
66 | 72 | A d3/g |
|
73 | ? d3/untracked | |
|
67 | 74 | $ hg -R main debugdirstate --no-dates |
|
68 | 75 | n 644 2 set d1/f |
|
69 | 76 | n 644 2 set d3/f |
@@ -91,6 +98,8 b' Narrow the share and check that the main' | |||
|
91 | 98 | not deleting possibly dirty file d3/f |
|
92 | 99 | not deleting possibly dirty file d3/g |
|
93 | 100 | not deleting possibly dirty file d5/f |
|
101 | not deleting unknown file d3/untracked | |
|
102 | not deleting ignored file d3/ignored | |
|
94 | 103 | # d1/f, d3/f, d3/g and d5/f should no longer be reported |
|
95 | 104 | $ hg -R main files |
|
96 | 105 | main/d7/f |
@@ -99,6 +108,8 b' Narrow the share and check that the main' | |||
|
99 | 108 | $ find main/d* -type f | sort |
|
100 | 109 | main/d3/f |
|
101 | 110 | main/d3/g |
|
111 | main/d3/ignored | |
|
112 | main/d3/untracked | |
|
102 | 113 | main/d5/f |
|
103 | 114 | main/d7/f |
|
104 | 115 | |
@@ -131,6 +142,8 b' Widen the share and check that the main ' | |||
|
131 | 142 | $ hg -R main st --all |
|
132 | 143 | M d3/f |
|
133 | 144 | ? d3/g |
|
145 | ? d3/untracked | |
|
146 | I d3/ignored | |
|
134 | 147 | C d1/f |
|
135 | 148 | C d7/f |
|
136 | 149 |
General Comments 0
You need to be logged in to leave comments.
Login now