##// END OF EJS Templates
revert: ensure that copies and renames are honored (issue3920)...
Bryan O'Sullivan -
r19129:bd19587a stable
parent child Browse files
Show More
@@ -2055,6 +2055,12 b' def revert(ui, repo, ctx, parents, *pats'
2055 2055 checkout(f)
2056 2056 normal(f)
2057 2057
2058 copied = copies.pathcopies(repo[parent], ctx)
2059
2060 for f in add[0] + undelete[0] + revert[0]:
2061 if f in copied:
2062 repo.dirstate.copy(copied[f], f)
2063
2058 2064 if targetsubs:
2059 2065 # Revert the subrepos on the revert list
2060 2066 for sub in targetsubs:
@@ -275,4 +275,28 b' should silently revert the named files'
275 275 $ hg revert --no-backup ignored removed
276 276 $ hg st -mardi
277 277
278 someone set up us the copies
279
280 $ rm .hgignore
281 $ hg update -C
282 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
283 $ hg mv ignored allyour
284 $ hg copy removed base
285 $ hg commit -m rename
286
287 copies and renames, you have no chance to survive make your time (issue3920)
288
289 $ hg update '.^'
290 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
291 $ hg revert -rtip -a
292 adding allyour
293 adding base
294 removing ignored
295 $ hg status -C
296 A allyour
297 ignored
298 A base
299 removed
300 R ignored
301
278 302 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now