Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 5575:8788ff630c26
imported patch rollback-help
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 02 Dec 2007 15:26:01 -0600 |
parents | d4ec6d61b3ee |
children | 9981b6b19ecf |
comparison
equal
deleted
inserted
replaced
5574:d4ec6d61b3ee | 5575:8788ff630c26 |
---|---|
2452 return r | 2452 return r |
2453 finally: | 2453 finally: |
2454 del wlock | 2454 del wlock |
2455 | 2455 |
2456 def rollback(ui, repo): | 2456 def rollback(ui, repo): |
2457 """roll back the last transaction in this repository | 2457 """roll back the last transaction |
2458 | 2458 |
2459 Roll back the last transaction in this repository, restoring the | 2459 This command should be used with care. There is only one level of |
2460 project to its state prior to the transaction. | 2460 rollback, and there is no way to undo a rollback. It will also |
2461 restore the dirstate at the time of the last transaction, losing | |
2462 any dirstate changes since that time. | |
2461 | 2463 |
2462 Transactions are used to encapsulate the effects of all commands | 2464 Transactions are used to encapsulate the effects of all commands |
2463 that create new changesets or propagate existing changesets into a | 2465 that create new changesets or propagate existing changesets into a |
2464 repository. For example, the following commands are transactional, | 2466 repository. For example, the following commands are transactional, |
2465 and their effects can be rolled back: | 2467 and their effects can be rolled back: |
2467 commit | 2469 commit |
2468 import | 2470 import |
2469 pull | 2471 pull |
2470 push (with this repository as destination) | 2472 push (with this repository as destination) |
2471 unbundle | 2473 unbundle |
2472 | |
2473 This command should be used with care. There is only one level of | |
2474 rollback, and there is no way to undo a rollback. It will also | |
2475 restore the dirstate at the time of the last transaction, which | |
2476 may lose subsequent dirstate changes. | |
2477 | 2474 |
2478 This command is not intended for use on public repositories. Once | 2475 This command is not intended for use on public repositories. Once |
2479 changes are visible for pull by other users, rolling a transaction | 2476 changes are visible for pull by other users, rolling a transaction |
2480 back locally is ineffective (someone else may already have pulled | 2477 back locally is ineffective (someone else may already have pulled |
2481 the changes). Furthermore, a race is possible with readers of the | 2478 the changes). Furthermore, a race is possible with readers of the |