Help with extension writing

Vishakh Harikumar vsh426 at gmail.com
Wed May 5 02:19:40 CDT 2010


On Wed, May 5, 2010 at 12:00 PM, Matthew Watson <mattw.watson at gmail.com>wrote:

> Hi Guys,
>
> Still working on FishEye (http://www.atlassian.com/software/fisheye/)
> support for mercurial.
>
> I've got another question, this time around file permission changes.
>
> A permission change seems to make no change to the filerev, but the
> file gets added to the changectx.files() - We want to capture that a
> change was made to the file (a meta change really) yet in a subsequent
> non-perm change to that file, the filectx.p0().linkrev() is not the
> commit that changed the perm, it's the commit that last changed the
> file content!
>

Changes in file permission are stored in the manifest[0], not in the filelog
which tracks only the content of the file.
Hence a filerev itself is not aware of the changes of the permissions.
The changectx reads these permissions from the manifest. Any filectx
created from the ctx will know these permissions, but its linkrev will still
point to last commit modifying file contents.

>
> Unfortunately, this means that when we try to reconstruct the DAG for
> the file, the permission change "revision" is left out on an orphaned
> branch and only file content changes are part of the direct
> ancestor/predecessor graph.
>
> Is there some way to find the commit in which a file was last changed,
> including where its permissions might have changed?
>

I don't know anyway short of going through the entire changelog.
Maybe someone else knows a better way.

[0]http://mercurial.selenic.com/wiki/Manifest

-- 
vsh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100505/6730269b/attachment.htm>


More information about the Mercurial-devel mailing list