changeset 6738:336fda65759a

use repo.changectx rather than context.changectx
author Matt Mackall <mpm@selenic.com>
date Wed, 25 Jun 2008 17:34:28 -0500
parents 7239e06e58e9
children c9fbd6ec3489
files hgext/keyword.py mercurial/patch.py
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/keyword.py	Wed Jun 25 17:33:51 2008 -0500
+++ b/hgext/keyword.py	Wed Jun 25 17:34:28 2008 -0500
@@ -78,7 +78,7 @@
 "Log = {desc}" expands to the first line of the changeset description.
 '''
 
-from mercurial import commands, cmdutil, context, dispatch, filelog, revlog
+from mercurial import commands, cmdutil, dispatch, filelog, revlog
 from mercurial import patch, localrepo, templater, templatefilters, util
 from mercurial.hgweb import webcommands
 from mercurial.node import nullid, hex
@@ -142,7 +142,7 @@
     def getnode(self, path, fnode):
         '''Derives changenode from file path and filenode.'''
         # used by kwfilelog.read and kwexpand
-        c = context.filectx(self.repo, path, fileid=fnode)
+        c = self.repo.filectx(path, fileid=fnode)
         return c.node()
 
     def substitute(self, data, path, node, subfunc):
--- a/mercurial/patch.py	Wed Jun 25 17:33:51 2008 -0500
+++ b/mercurial/patch.py	Wed Jun 25 17:34:28 2008 -0500
@@ -8,7 +8,7 @@
 
 from i18n import _
 from node import hex, nullid, short
-import base85, cmdutil, mdiff, util, context, revlog, diffhelpers, copies
+import base85, cmdutil, mdiff, util, revlog, diffhelpers, copies
 import cStringIO, email.Parser, os, popen2, re, errno
 import sys, tempfile, zlib
 
@@ -1180,7 +1180,7 @@
 
     # reading the data for node1 early allows it to play nicely
     # with repo.status and the revlog cache.
-    ctx1 = context.changectx(repo, node1)
+    ctx1 = repo.changectx(node1)
     # force manifest reading
     man1 = ctx1.manifest()
     date1 = util.datestr(ctx1.date())
@@ -1193,11 +1193,11 @@
         return
 
     if node2:
-        ctx2 = context.changectx(repo, node2)
+        ctx2 = repo.changectx(node2)
         execf2 = ctx2.manifest().execf
         linkf2 = ctx2.manifest().linkf
     else:
-        ctx2 = context.workingctx(repo)
+        ctx2 = repo.workingctx()
         execf2 = util.execfunc(repo.root, None)
         linkf2 = util.linkfunc(repo.root, None)
         if execf2 is None: