Show More
@@ -2166,9 +2166,19 b' def revert(ui, repo, *pats, **opts):' | |||||
2166 |
|
2166 | |||
2167 | # walk target manifest. |
|
2167 | # walk target manifest. | |
2168 |
|
2168 | |||
|
2169 | def badmatch(path): | |||
|
2170 | if path in names: | |||
|
2171 | return True | |||
|
2172 | path_ = path + '/' | |||
|
2173 | for f in names: | |||
|
2174 | if f.startswith(path_): | |||
|
2175 | return True | |||
|
2176 | return False | |||
|
2177 | ||||
2169 | for src, abs, rel, exact in cmdutil.walk(repo, pats, opts, node=node, |
|
2178 | for src, abs, rel, exact in cmdutil.walk(repo, pats, opts, node=node, | |
2170 |
badmatch= |
|
2179 | badmatch=badmatch): | |
2171 |
if abs in names: |
|
2180 | if abs in names or src == 'b': | |
|
2181 | continue | |||
2172 | names[abs] = (rel, exact) |
|
2182 | names[abs] = (rel, exact) | |
2173 | target_only[abs] = True |
|
2183 | target_only[abs] = True | |
2174 |
|
2184 |
@@ -88,5 +88,8 b' hg revert --all -rtip' | |||||
88 | echo %% issue332 |
|
88 | echo %% issue332 | |
89 | hg ci -A -m b -d '1000001 0' |
|
89 | hg ci -A -m b -d '1000001 0' | |
90 | echo foobar > b/b |
|
90 | echo foobar > b/b | |
91 | hg revert b |
|
91 | mkdir newdir | |
|
92 | echo foo > newdir/newfile | |||
|
93 | hg add newdir/newfile | |||
|
94 | hg revert b newdir | |||
92 | true |
|
95 | true |
General Comments 0
You need to be logged in to leave comments.
Login now