Can't recover removed file, what am I doing wrong?

Marcus mh-mercurial at online.de
Thu Mar 5 12:58:28 UTC 2020


On 05/03/2020 12.30, Chris Green wrote:
> I thought I'd got the commands right but I can't get it to work:-
> 
>      chris$ hg log -r "removes(bin/hscan)"
>      changeset:   308:3f97156f9387
>      user:        chris <chris at isbd.co.uk>
>      date:        Mon Jan 27 21:43:11 2020 +0000
>      summary:     Removed because 'arp -a' is better, new script is called lan.
>      chris$ hg revert -r 308 bin/hscan
>      bin/hscan: no such file in rev 3f97156f9387
>      chris$ hg revert -r 308:3f97156f9387 bin/hscan
>      bin/hscan: no such file in rev 3f97156f9387
> 
> So what is the correct command to get my file back?

Shouldn't you revert to the commit *before* the file was removed, i.e. 
‘-r 308^’?




More information about the Mercurial mailing list