[issue3252] "hg cat -r [rev]" doesn't work with renamed files

Nikolaus Rath bugs at mercurial.selenic.com
Mon Feb 6 17:12:15 UTC 2012


New submission from Nikolaus Rath <Nikolaus at rath.org>:

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 at rath.org>
date:        Mon Feb 06 12:04:09 2012 -0500
files:       file2
description:
Edited


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


changeset:   0:81643ae53f34
user:        Nikolaus Rath <Nikolaus at 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)

----------
messages: 18975
nosy: Nikratio
priority: bug
status: unread
title: "hg cat -r [rev]" doesn't work with renamed files

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3252>
____________________________________________________



More information about the Mercurial-devel mailing list