revert changes to a single file

Masklinn masklinn at masklinn.net
Tue May 13 06:07:59 UTC 2014


On 2014-05-13, at 06:58 , Michael Mossey <michaelmossey at gmail.com> wrote:
> On Mon, May 12, 2014 at 9:29 PM, Steve Barnes <gadgetsteve at hotmail.com> wrote:
> On 13/05/14 05:19, Michael Mossey wrote:
>> How do I revert a single file to the tip revision, discarding any edits since the last update?
>> 
> hg revert file_name_you_would_like_to_revert seems like it would do the job.
> 
> Does that create a backup file called <filename>.orig ? I think that's what it just did.

Yes, it does:

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

(there's a -C alias to --no-backup)


More information about the Mercurial mailing list