hgext/remotefilelog/__init__.py
changeset 42499 f93762f251d2
parent 42472 d768ca427249
child 42500 e387cb22f6c0
equal deleted inserted replaced
42498:089f14dd7df3 42499:f93762f251d2
   314     extensions.wrapfunction(patch, 'trydiff', trydiff)
   314     extensions.wrapfunction(patch, 'trydiff', trydiff)
   315     extensions.wrapfunction(hg, 'verify', _verify)
   315     extensions.wrapfunction(hg, 'verify', _verify)
   316     scmutil.fileprefetchhooks.add('remotefilelog', _fileprefetchhook)
   316     scmutil.fileprefetchhooks.add('remotefilelog', _fileprefetchhook)
   317 
   317 
   318     # disappointing hacks below
   318     # disappointing hacks below
   319     scmutil.getrenamedfn = getrenamedfn
   319     extensions.wrapfunction(scmutil, 'getrenamedfn', getrenamedfn)
   320     extensions.wrapfunction(revset, 'filelog', filelogrevset)
   320     extensions.wrapfunction(revset, 'filelog', filelogrevset)
   321     revset.symbols['filelog'] = revset.filelog
   321     revset.symbols['filelog'] = revset.filelog
   322     extensions.wrapfunction(cmdutil, 'walkfilerevs', walkfilerevs)
   322     extensions.wrapfunction(cmdutil, 'walkfilerevs', walkfilerevs)
   323 
   323 
   324 
   324 
   633                     'pending multiple integer revisions are not supported')
   633                     'pending multiple integer revisions are not supported')
   634         del pendingfilecommits[:]
   634         del pendingfilecommits[:]
   635         return node
   635         return node
   636     extensions.wrapfunction(changelog.changelog, 'add', changelogadd)
   636     extensions.wrapfunction(changelog.changelog, 'add', changelogadd)
   637 
   637 
   638 def getrenamedfn(repo, endrev=None):
   638 def getrenamedfn(orig, repo, endrev=None):
       
   639     if not isenabled(repo):
       
   640         return orig(repo, endrev)
       
   641 
   639     rcache = {}
   642     rcache = {}
   640 
   643 
   641     def getrenamed(fn, rev):
   644     def getrenamed(fn, rev):
   642         '''looks up all renames for a file (up to endrev) the first
   645         '''looks up all renames for a file (up to endrev) the first
   643         time the file is given. It indexes on the changerev and only
   646         time the file is given. It indexes on the changerev and only