hg cat and renamed files
Matt Mackall
mpm at selenic.com
Wed Nov 19 22:51:17 UTC 2008
On Wed, 2008-11-19 at 23:19 +0100, Bastian Doetsch wrote:
> Hi there,
>
> iirc, hg cat doesn't follow renames. Are there plans to support this
> in the future?
First, let me point out that cat shouldn't follow renames by default.
If you say 'hg cat -r 1.0 Makefile', we assume you are asking for the
contents of Makefile at revision 1.0 regardless of whether or not that
file later got replaced by another file named, say,
'Makefile.experimental', which was *not the file actually used by Make*
to build your project.
In other words, file *names* usually have semantic precedence over file
*histories* because file *names* are what users and programs generally
operate on.
That said, it'd probably make sense to add a --follow meaning "follow
the contents of the file currently named x back in history to rev X".
But note that this operation is not well-defined! If one user renames
Makefile.experimental to Makefile and merges, there are now two files
with legitimate claim to being the ancestor at 1.0. We'd probably show
the latter here, because of the aforementioned semantic precedence
issues.
> I would really help for comparing file revisions in our
> MercurialEclipse history view, as we use hg cat to get the contents of
> files of the specified revisions in our history view.
>
> Are there any solutions out there that already support this? Did I
> miss an option in hg cat? I'd appreciate your help!
>
> Best regards
> Bastian
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list