node id -> filename?

Jake Edge jake at edge2.net
Tue May 17 14:37:34 UTC 2005


if i am reading the code correctly, it would appear that there is no 
easy way to go from a nodeid that represents some revision of a file to 
the filename of that file (i.e. a text name of the file like 'hg').  The 
only way I could think of is to search every manifest in every revision 
for that nodeid and the key would be the filename, obviously not 
reasonable.  An alternative way to do what i am trying to do would be to 
get the changeset id from a node id, but I didn't see how to do that 
easily either ... hopefully i am just missing something obvious ... it 
would seem that this kind of lookup would be useful for other things 
(rename?  verify providing info about orphaned nodes?) as well ...

the reason i started thinking about it is for hgweb ... right now when 
it looks at a file, it sends the nodeid and the filename as part of the 
URL and that works fine, but for deeply nested trees (or those with lots 
of long filenames), we could hit the 1024 byte limit for URL GET 
requests ...

jake

-- 
Jake Edge - jake at edge2.net - http://www.edge2.net



More information about the Mercurial mailing list