##// END OF EJS Templates
revert: fix corner case found by faheem mitha....
Vadim Gelfer -
r2272:e9a0ed9e default
parent child Browse files
Show More
@@ -2277,6 +2277,7 b' def revert(ui, repo, *pats, **opts):'
2277 2277 'you must specify the revision to revert to'))
2278 2278 else:
2279 2279 node = parent
2280 pmf = None
2280 2281 mf = repo.manifest.read(repo.changelog.read(node)[0])
2281 2282
2282 2283 wlock = repo.wlock()
@@ -2359,7 +2360,12 b' def revert(ui, repo, *pats, **opts):'
2359 2360 if exact: ui.warn(_('no changes needed to %s\n' % rel))
2360 2361 continue
2361 2362 if not in_mf:
2362 handle(remove, False)
2363 if pmf is None:
2364 # only need parent manifest in this unlikely case,
2365 # so do not read by default
2366 pmf = repo.manifest.read(repo.changelog.read(parent)[0])
2367 if abs in pmf:
2368 handle(remove, False)
2363 2369 update[abs] = True
2364 2370
2365 2371 repo.dirstate.forget(forget[0])
@@ -68,4 +68,16 b' hg revert'
68 68 echo %% should print executable
69 69 test -x c && echo executable
70 70
71 echo %% issue 241
72 hg init a
73 cd a
74 echo a >> a
75 hg commit -A -d '1 0' -m a
76 echo a >> a
77 hg commit -d '2 0' -m a
78 hg update 0
79 mkdir b
80 echo b > b/b
81 hg revert -rtip
82
71 83 true
@@ -51,3 +51,6 b' non-executable'
51 51 reverting c
52 52 %% should print executable
53 53 executable
54 %% issue 241
55 adding a
56 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now