Show More
@@ -1481,7 +1481,7 b' def revert(ui, repo, ctx, parents, *pats' | |||||
1481 | def badfn(path, msg): |
|
1481 | def badfn(path, msg): | |
1482 | if path in names: |
|
1482 | if path in names: | |
1483 | return |
|
1483 | return | |
1484 |
if path in |
|
1484 | if path in ctx.substate: | |
1485 | return |
|
1485 | return | |
1486 | path_ = path + '/' |
|
1486 | path_ = path + '/' | |
1487 | for f in names: |
|
1487 | for f in names: | |
@@ -1489,14 +1489,14 b' def revert(ui, repo, ctx, parents, *pats' | |||||
1489 | return |
|
1489 | return | |
1490 | ui.warn("%s: %s\n" % (m.rel(path), msg)) |
|
1490 | ui.warn("%s: %s\n" % (m.rel(path), msg)) | |
1491 |
|
1491 | |||
1492 |
m = scmutil.match( |
|
1492 | m = scmutil.match(ctx, pats, opts) | |
1493 | m.bad = badfn |
|
1493 | m.bad = badfn | |
1494 |
for abs in |
|
1494 | for abs in ctx.walk(m): | |
1495 | if abs not in names: |
|
1495 | if abs not in names: | |
1496 | names[abs] = m.rel(abs), m.exact(abs) |
|
1496 | names[abs] = m.rel(abs), m.exact(abs) | |
1497 |
|
1497 | |||
1498 | # get the list of subrepos that must be reverted |
|
1498 | # get the list of subrepos that must be reverted | |
1499 |
targetsubs = [s for s in |
|
1499 | targetsubs = [s for s in ctx.substate if m(s)] | |
1500 | m = scmutil.matchfiles(repo, names) |
|
1500 | m = scmutil.matchfiles(repo, names) | |
1501 | changes = repo.status(match=m)[:4] |
|
1501 | changes = repo.status(match=m)[:4] | |
1502 | modified, added, removed, deleted = map(set, changes) |
|
1502 | modified, added, removed, deleted = map(set, changes) |
General Comments 0
You need to be logged in to leave comments.
Login now