cat --follow [was: extdiff --git ?]

Evan Powers evan.powers+hg at gmail.com
Mon Dec 17 14:27:46 CST 2007


On Dec 17, 2007 10:55 AM, Matt Mackall <mpm at selenic.com> wrote:
> On Sun, Dec 16, 2007 at 07:56:59PM -0800, j w wrote:
> > Any reason this might be a bad idea?
>
> Where are you following from? The current directory? What if you want
> to follow from a file in another revision?

I figured I'd point out Subversion's behavior in this area (as of 6-8
months ago when I stopped using svn) since it's relevant and may not
be widely known around here.

Anyway, Subversion lets you specify two revision numbers:
    svn cat -r X path/to/file at Y

The command looks up the path in version Y and then follows renames
backward (or forward) in time until version X and prints the result. Y
defaults to the working directory revision IIRC.

It'd be nice if hg's implementation was equally flexible.

- Evan


More information about the Mercurial mailing list