# HG changeset patch # User Christian Ebert # Date 1174748227 -3600 # Node ID 0382bccf861e9dbbe750bc6735d02b620c193457 # Parent b62dacbd2166154bd44cac02d4e471ab388d5ed3 Omit keyword argument for filelog __init__ Make keyword compatible with future changes in Mercurial. Should be safe and backwards compatible as well. diff -r b62dacbd2166 -r 0382bccf861e hgkw/keyword.py --- a/hgkw/keyword.py Thu Mar 22 12:36:51 2007 +0100 +++ b/hgkw/keyword.py Sat Mar 24 15:57:07 2007 +0100 @@ -89,12 +89,12 @@ from mercurial.demandload import * # stable from mercurial.i18n import gettext as _ demandload(globals(), 'mercurial:commands,fancyopts,templater,util') - demandload(globals(), 'mercurial:cmdutil,context,filelog,revlog') + demandload(globals(), 'mercurial:cmdutil,context,filelog') demandload(globals(), 'os re sys time') except ImportError: # demandimport from mercurial.i18n import _ from mercurial import commands, fancyopts, templater, util - from mercurial import cmdutil, context, filelog, revlog + from mercurial import cmdutil, context, filelog import os, re, sys, time deftemplates = { @@ -192,9 +192,8 @@ Superclass over filelog to customize its read, add, cmp methods. Keywords are "stored" unexpanded, and expanded on reading. ''' - def __init__(self, opener, path, kwtemplater, - defversion=revlog.REVLOG_DEFAULT_VERSION): - super(kwfilelog, self).__init__(opener, path, defversion) + def __init__(self, opener, path, kwtemplater): + super(kwfilelog, self).__init__(opener, path) self.path = path self.kwtemplater = kwtemplater @@ -253,9 +252,9 @@ # only use kwfilelog when needed if self.kwfmatcher(f): kwt = kwtemplater(self.ui, self) - return kwfilelog(self.sopener, f, kwt, self.revlogversion) + return kwfilelog(self.sopener, f, kwt) else: - return filelog.filelog(self.sopener, f, self.revlogversion) + return filelog.filelog(self.sopener, f) def commit(self, files=None, text="", user=None, date=None, match=util.always, force=False, lock=None, wlock=None,