Is this the expected revert behaviour ?

Vadim Gelfer vadim.gelfer at gmail.com
Thu May 4 17:26:05 CDT 2006


On 5/4/06, Sébastien Pierre <sebastien at xprima.com> wrote:
> > > Is it just me or do others think that this behaviour is
> > > counter-intuitive ?
> >
> > I have also been fooled by this.
>
> I just saw that there is an entry for this precise problem in the FAQ "I
> did an hg revert and my working directory still has changes in it!".

i have changed doc comments for revert. here is what "hg help revert" says now.

    revert modified files or dirs to their states as of some revision

    By default, revert the named files or directories to the contents
    they had in the parent of the working directory.  This restores
    the contents of the affected files to an unmodified state.

    Modified files are saved with a .orig suffix before reverting.
    To disable these backups, use --no-backup.

    Using the -r option, revert the given files or directories to
    their contents as of a specific revision.  This can be helpful to"roll
    back" some or all of a change that should not have been committed.

    Revert modifies the working directory.  It does not commit any
    changes, or change the parent of the working directory.  If you
    revert to a revision other than the parent of the working
    directory, the reverted files will thus appear modified
    afterwards.

    If a file has been deleted, it is recreated.  If the executable
    mode of a file was changed, it is reset.

    If names are given, all files matching the names are reverted.

    If no arguments are given, all files in the repository are reverted.

please let me know what you think.



More information about the Mercurial mailing list