# HG changeset patch
# User Benoit Boissinot <benoit.boissinot@ens-lyon.org>
# Date 2009-10-31 17:02:34
# Node ID 618af2034ca6ad47d0c2d8b1808eb76d9764f450
# Parent  5c8651e2f5e07044c6ac943ab67961bffaeaf5c1

patch: use the public ctx API instead of the internals

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -1227,7 +1227,7 @@ def diff(repo, node1=None, node2=None, m
             if f not in cache:
                 if len(cache) > 20:
                     del cache[order.pop(0)]
-                cache[f] = fctx._filelog
+                cache[f] = fctx.filelog()
             else:
                 order.remove(f)
             order.append(f)