2230 names.append(abs) |
2230 names.append(abs) |
2231 repo.remove(names, True, wlock) |
2231 repo.remove(names, True, wlock) |
2232 return errs |
2232 return errs |
2233 |
2233 |
2234 def revert(ui, repo, *pats, **opts): |
2234 def revert(ui, repo, *pats, **opts): |
2235 """revert modified files or dirs back to their unmodified states |
2235 """revert modified files or dirs to their states as of some revision |
2236 |
2236 |
2237 In its default mode, it reverts any uncommitted modifications made |
2237 By default, revert the named files or directories to the contents |
2238 to the named files or directories. This restores the contents of |
2238 they had in the parent of the working directory. This restores |
2239 the affected files to an unmodified state. |
2239 the contents of the affected files to an unmodified state. |
2240 |
2240 |
2241 Modified files are saved with a .orig suffix before reverting. |
2241 Modified files are saved with a .orig suffix before reverting. |
2242 To disable these backups, use --no-backup. |
2242 To disable these backups, use --no-backup. |
2243 |
2243 |
2244 Using the -r option, it reverts the given files or directories to |
2244 Using the -r option, revert the given files or directories to |
2245 their state as of an earlier revision. This can be helpful to "roll |
2245 their contents as of a specific revision. This can be helpful to"roll |
2246 back" some or all of a change that should not have been committed. |
2246 back" some or all of a change that should not have been committed. |
2247 |
2247 |
2248 Revert modifies the working directory. It does not commit any |
2248 Revert modifies the working directory. It does not commit any |
2249 changes, or change the parent of the current working directory. |
2249 changes, or change the parent of the working directory. If you |
|
2250 revert to a revision other than the parent of the working |
|
2251 directory, the reverted files will thus appear modified |
|
2252 afterwards. |
2250 |
2253 |
2251 If a file has been deleted, it is recreated. If the executable |
2254 If a file has been deleted, it is recreated. If the executable |
2252 mode of a file was changed, it is reset. |
2255 mode of a file was changed, it is reset. |
2253 |
2256 |
2254 If names are given, all files matching the names are reverted. |
2257 If names are given, all files matching the names are reverted. |