Get a file from the tip

Pierre-Yves David pierre-yves.david at logilab.fr
Wed Nov 21 09:04:21 CST 2012


On Wed, Nov 21, 2012 at 07:00:18AM -0800, v wrote:
> Pierre-Yves David wrote
> > On Wed, Nov 21, 2012 at 06:44:03AM -0800, v wrote:
> >> I'm writing an extension that needs to get the tip revision of a specific
> >> file. The only information passed to wrapper functions seems to be the
> >> ui,
> >> but I can't find any way to get from that to the content of a checked-in
> >> file.
> > 
> > You need a repo object for that. Then use
> > 
> >     repo['tip'][file].data()
> > 
> > or something similar
> 
> That's where I'm stuck. How do I get a repo from a wrapfunction?

What function are you wrapping, what are it's argument ?

-- 
Pierre-Yves David

http://www.logilab.fr/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20121121/6b3b4065/attachment.pgp>


More information about the Mercurial-devel mailing list