From patchwork Mon Aug 12 16:27:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [18,of,41] basefilectx: move linkrev from filectx From: Sean Farley X-Patchwork-Id: 2145 Message-Id: <37778c84ba5fafa0cca9.1376324834@laptop.local> To: mercurial-devel@selenic.com Date: Mon, 12 Aug 2013 11:27:14 -0500 # HG changeset patch # User Sean Farley # Date 1376279501 18000 # Sun Aug 11 22:51:41 2013 -0500 # Node ID 37778c84ba5fafa0cca95ffab5259145da3f2f17 # Parent f58609f89fd89d19eb220f3613e520e7c57091c2 basefilectx: move linkrev from filectx diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -485,10 +485,12 @@ return self._changectx.flags(self._path) def filelog(self): return self._filelog def rev(self): return self._changeid + def linkrev(self): + return self._filelog.linkrev(self._filerev) class filectx(basefilectx): """A filecontext object makes access to data related to a particular filerevision convenient.""" def __init__(self, repo, path, changeid=None, fileid=None, @@ -541,12 +543,10 @@ '''opens an arbitrary revision of the file without opening a new filelog''' return filectx(self._repo, self._path, fileid=fileid, filelog=self._filelog) - def linkrev(self): - return self._filelog.linkrev(self._filerev) def node(self): return self._changectx.node() def hex(self): return hex(self.node()) def user(self):