How to find a removed file?
Chris Green
cl at isbd.net
Fri Feb 11 10:31:25 UTC 2022
On Fri, Feb 11, 2022 at 11:01:42AM +0100, Adrian Buehlmann wrote:
> On 11.02.2022 10:15, Chris Green wrote:
> > On Thu, Feb 10, 2022 at 04:19:33PM -0700, Tom Hindle wrote:
> >> oh it you want one command then something like:
> >> hg log -r "parents(removes('*host_alive*'))" -T {rev} | xargs hg cat
> >> host_alive -r
> >
> > hg log -r "parents(removes('*host_alive*'))" -T {rev}
> >
> > returns absolutely nothing.
> >
> > Just to show I am in the right place:-
> >
> > chris at esprimo$ find . -name '*host_alive*'
> > ./.hg/store/data/share/bin/host_alive.i
> > ./.hg/store/data/bin/host_alive.i
> > ./.hg/store/data/t470/bin/host_alive.i
> > ./.hg/store/data/isbd/bin/host_alive.i
> > ./.hg/store/data/esprimo/bin/host_alive.i
> > ./.hg/store/data/host_alive.i
> > chris at esprimo$ hg log -r "parents(removes('*host_alive*'))" -T {rev}
> > chris at esprimo$
> >
>
> Filenames in the store are encoded.
>
> Uppercase is escaped: 'FOO' -> '_f_o_o'
>
> So the real filename is probably "hostAlive", not "host_alive".
>
Aha, brilliant, thank you. I have now got a copy of my file back. It
was just to check how I did it rather than to actually restore the
file though I might reinstate it as it's quite handy.
Thanks everyone!
--
Chris Green
More information about the Mercurial
mailing list