Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 3ad95df1b9ec0c823807557dbacf5694 > files > 390

bzr-doc-2.2.4-1.fc14.noarch.rpm

revert
======

:Purpose: Revert files to a previous revision.
:Usage:   bzr revert [FILE...]

:Options:
  -v, --verbose         Display more information.
  -h, --help            Show help message.
  -q, --quiet           Only display errors and warnings.
  --forget-merges       Remove pending merge marker, without changing any
                        files.
  --usage               Show usage message and options.
  --no-backup           Do not save backups of reverted files.
  -r ARG, --revision=ARG
                        See "help revisionspec" for details.

:Description:
  Giving a list of files will revert only those files.  Otherwise, all files
  will be reverted.  If the revision is not specified with '--revision', the
  last committed revision is used.
  
  To remove only some changes, without reverting to a prior version, use
  merge instead.  For example, "merge . --revision -2..-3" will remove the
  changes introduced by -2, without affecting the changes introduced by -1.
  Or to remove certain changes on a hunk-by-hunk basis, see the Shelf plugin.
  
  By default, any files that have been manually changed will be backed up
  first.  (Files changed only by merge are not backed up.)  Backup files have
  '.~#~' appended to their name, where # is a number.
  
  When you provide files, you can use their current pathname or the pathname
  from the target revision.  So you can use revert to "undelete" a file by
  name.  If you name a directory, all the contents of that directory will be
  reverted.
  
  If you have newly added files since the target revision, they will be
  removed.  If the files to be removed have been changed, backups will be
  created as above.  Directories containing unknown files will not be
  deleted.
  
  The working tree contains a list of revisions that have been merged but
  not yet committed. These revisions will be included as additional parents
  of the next commit.  Normally, using revert clears that list as well as
  reverting the files.  If any files are specified, revert leaves the list
  of uncommitted merges alone and reverts only the files.  Use ``bzr revert
  .`` in the tree root to revert all files but keep the recorded merges,
  and ``bzr revert --forget-merges`` to clear the pending merge list without
  reverting any files.
  
  Using "bzr revert --forget-merges", it is possible to apply all of the
  changes from a branch in a single revision.  To do this, perform the merge
  as desired.  Then doing revert with the "--forget-merges" option will keep
  the content of the tree as it was, but it will clear the list of pending
  merges.  The next commit will then contain all of the changes that are
  present in the other branch, but without any other parent revisions.
  Because this technique forgets where these changes originated, it may
  cause additional conflicts on later merges involving the same source and
  target branches.

:See also: :doc:`cat <cat-help>`, :doc:`export <export-help>`