Finding and un-removing previously removed files

Luis Navarro lunadesign at gmail.com
Sun Oct 17 05:44:46 UTC 2010


Is there an easy way to find previously removed files?  For example, is
there an HG command or TortoiseHG operation that would list any files that
previously existed in the current directory?

I know I can walk through the changeset log to find files that have been
removed, but that's very changeset-centric.  Unless I know which files and
roughly when they were removed, I could be searching for a while.

I'm looking for something that's more directory-specific.  Ideally, I'd love
to see some sort of repository browser/explorer that allows me to walk
through the directory hierarchy with a toggle that additionally shows files
that were previously resided in the current directory but no longer do
because they were removed or moved to another directory.  It would also
allow me to view a file's contents as they stood just before the removal
and/or allow me to reincarnate (un-remove) the file.

Is there something like this in HG or TortoiseHG that I've missed?

While I'm at it, once I've found a file that I want to un-remove / undelete,
what's the proper approach?  Do I use "hg revert -r rev" to get the file
back in the working directory and then use "hg add" to put it back under
revision control?  Will this preserve the history from the changesets before
it was removed?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20101016/a217babd/attachment.html>


More information about the Mercurial mailing list