Bug 3253 - "hg cat -r [rev]" doesn't work with renamed files
Summary: "hg cat -r [rev]" doesn't work with renamed files
Status: RESOLVED WONTFIX
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal feature
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-06 11:12 UTC by Nikolaus Rath
Modified: 2013-07-27 19:42 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolaus Rath 2012-02-06 11:12 UTC
The "cat -r rev file" command fails if *file* had a different name in *rev*.
I believe that this should either work right away, or "hg cat" should get a
-f option like "hg log".

Example:

# hg init
# echo hello > file1
# hg addremove
adding file1
# hg commit -m "Added file1"
file1
committed changeset 0:81643ae53f34
# hg rename file1 file2
moving file1 to file2
# hg commit -m "Renamed"
file2
committed changeset 1:671e83868d03
# echo world >> file2
# hg commit -m "Edited"
file2
committed changeset 2:e065a3190cb2
# hg log -f file2
changeset:   2:e065a3190cb2
tag:         tip
user:        Nikolaus Rath <Nikolaus@rath.org>
date:        Mon Feb 06 12:04:09 2012 -0500
files:       file2
description:
Edited


changeset:   1:671e83868d03
user:        Nikolaus Rath <Nikolaus@rath.org>
date:        Mon Feb 06 12:03:53 2012 -0500
files:       file1 file2
description:
Renamed


changeset:   0:81643ae53f34
user:        Nikolaus Rath <Nikolaus@rath.org>
date:        Mon Feb 06 12:03:45 2012 -0500
files:       file1
description:
Added file1


# hg cat -r 0 file2
file2: no such file in rev 81643ae53f34
# hg --version
Mercurial Distributed SCM (version 2.0.2)
Comment 1 Bugzilla 2012-05-12 09:27 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:27 EDT  ---

This bug was previously known as _bug_ 3252 at http://mercurial.selenic.com/bts/issue3252

Bug Status was UNCONFIRMED but everconfirmed was true
   Setting status to CONFIRMED

Comment 2 Matt Mackall 2013-07-27 19:42 UTC
In progress but unassigned. We don't have a strategy for fixing this, the naive just-follow-copies won't work. Closing for now.