Show More
@@ -56,7 +56,6 b' def purge(ui, repo, *dirs, **opts):' | |||
|
56 | 56 | files that this program would delete use the --print option. |
|
57 | 57 | ''' |
|
58 | 58 | act = not opts['print'] |
|
59 | ignored = bool(opts['all']) | |
|
60 | 59 | abort_on_err = bool(opts['abort_on_err']) |
|
61 | 60 | eol = opts['print0'] and '\0' or '\n' |
|
62 | 61 | if eol == '\0': |
@@ -86,16 +85,14 b' def purge(ui, repo, *dirs, **opts):' | |||
|
86 | 85 | files = [] |
|
87 | 86 | match = cmdutil.match(repo, dirs, opts) |
|
88 | 87 | match.dir = directories.append |
|
89 | for src, f, st in repo.dirstate.statwalk(match, ignored=ignored): | |
|
90 | if src == 'f' and f not in repo.dirstate: | |
|
91 | files.append(f) | |
|
92 | ||
|
88 | status = repo.status(match=match, ignored=opts['all'], unknown=True) | |
|
89 | files = status[4] + status[5] | |
|
90 | files.sort() | |
|
93 | 91 | directories.sort() |
|
94 | 92 | |
|
95 | 93 | for f in files: |
|
96 | if f not in repo.dirstate: | |
|
97 | ui.note(_('Removing file %s\n') % f) | |
|
98 | remove(os.remove, f) | |
|
94 | ui.note(_('Removing file %s\n') % f) | |
|
95 | remove(os.remove, f) | |
|
99 | 96 | |
|
100 | 97 | for f in directories[::-1]: |
|
101 | 98 | if match(f) and not os.listdir(repo.wjoin(f)): |
General Comments 0
You need to be logged in to leave comments.
Login now