``hg cat'' does not follow copies in history. Bug?

Brad Larsen brad.larsen at gmail.com
Sat Nov 17 19:29:50 CST 2007


Hi list,

I ran into the following just now.  I have a repository laid out something  
like this

foo/
	a b c
foo'/
	a b c

where foo' and its contents are a copy of foo and contents (done using hg  
copy).  So foo' and its contents are a different project forked off of foo  
with no plan to ever merge them.

(This arrangement might be silly in and of itself, but the repository  
contains a handful of very closely related projects and it's often more  
convenient to manipulate them as a group rather than have a bunch of  
discrete repositories, and I read that the forest extension is not in a  
working state.)

I wanted to cat an old version of a.  But when I do ``hg cat -r  
OLD-VERSION-BEFORE-COPY a'' in foo', hg tells me ``a:  No such file in rev  
d4254567f596''.  I assume this is because none of foo' existed in that old  
revision.

Is this a bug or perhaps a misfeature?  It was not what I was expecting.   
Since ``hg cat'' is used to spit out an unversioned copy of a file at a  
certain revision, it would make sense to me if it would follow history  
through copies and renames and such.

Cheers,
Brad Larsen


More information about the Mercurial mailing list