##// END OF EJS Templates
wrapfunction: use sysstr instead of bytes as argument in "narrow"...
marmoute -
r51680:584fc92d default
parent child Browse files
Show More
@@ -193,7 +193,7 b' def _uisetup(ui):'
193 if name == b'rebase':
193 if name == b'rebase':
194 # TODO: teach exthelper to handle this
194 # TODO: teach exthelper to handle this
195 extensions.wrapfunction(
195 extensions.wrapfunction(
196 module, b'rebase', overrides.overriderebasecmd
196 module, 'rebase', overrides.overriderebasecmd
197 )
197 )
198
198
199
199
@@ -485,10 +485,10 b' def overridelog(orig, ui, repo, *pats, *'
485 return lambda ctx: match
485 return lambda ctx: match
486
486
487 wrappedmatchandpats = extensions.wrappedfunction(
487 wrappedmatchandpats = extensions.wrappedfunction(
488 scmutil, b'matchandpats', overridematchandpats
488 scmutil, 'matchandpats', overridematchandpats
489 )
489 )
490 wrappedmakefilematcher = extensions.wrappedfunction(
490 wrappedmakefilematcher = extensions.wrappedfunction(
491 logcmdutil, b'_makenofollowfilematcher', overridemakefilematcher
491 logcmdutil, '_makenofollowfilematcher', overridemakefilematcher
492 )
492 )
493 with wrappedmatchandpats, wrappedmakefilematcher:
493 with wrappedmatchandpats, wrappedmakefilematcher:
494 return orig(ui, repo, *pats, **opts)
494 return orig(ui, repo, *pats, **opts)
@@ -793,7 +793,7 b' def overridecopy(orig, ui, repo, pats, o'
793 match = orig(ctx, pats, opts, globbed, default, badfn=badfn)
793 match = orig(ctx, pats, opts, globbed, default, badfn=badfn)
794 return composenormalfilematcher(match, manifest)
794 return composenormalfilematcher(match, manifest)
795
795
796 with extensions.wrappedfunction(scmutil, b'match', normalfilesmatchfn):
796 with extensions.wrappedfunction(scmutil, 'match', normalfilesmatchfn):
797 try:
797 try:
798 result = orig(ui, repo, pats, opts, rename)
798 result = orig(ui, repo, pats, opts, rename)
799 except error.Abort as e:
799 except error.Abort as e:
@@ -887,8 +887,8 b' def overridecopy(orig, ui, repo, pats, o'
887 copiedfiles.append((src, dest))
887 copiedfiles.append((src, dest))
888 orig(src, dest, *args, **kwargs)
888 orig(src, dest, *args, **kwargs)
889
889
890 with extensions.wrappedfunction(util, b'copyfile', overridecopyfile):
890 with extensions.wrappedfunction(util, 'copyfile', overridecopyfile):
891 with extensions.wrappedfunction(scmutil, b'match', overridematch):
891 with extensions.wrappedfunction(scmutil, 'match', overridematch):
892 result += orig(ui, repo, listpats, opts, rename)
892 result += orig(ui, repo, listpats, opts, rename)
893
893
894 lfdirstate = lfutil.openlfdirstate(ui, repo)
894 lfdirstate = lfutil.openlfdirstate(ui, repo)
@@ -999,7 +999,7 b' def overriderevert(orig, ui, repo, ctx, '
999 m.matchfn = matchfn
999 m.matchfn = matchfn
1000 return m
1000 return m
1001
1001
1002 with extensions.wrappedfunction(scmutil, b'match', overridematch):
1002 with extensions.wrappedfunction(scmutil, 'match', overridematch):
1003 orig(ui, repo, ctx, *pats, **opts)
1003 orig(ui, repo, ctx, *pats, **opts)
1004
1004
1005 newstandins = lfutil.getstandinsstate(repo)
1005 newstandins = lfutil.getstandinsstate(repo)
@@ -128,7 +128,7 b' def clonenarrowcmd(orig, ui, repo, *args'
128 kwargs[b'depth'] = opts[b'depth']
128 kwargs[b'depth'] = opts[b'depth']
129
129
130 wrappedextraprepare = extensions.wrappedfunction(
130 wrappedextraprepare = extensions.wrappedfunction(
131 exchange, b'_pullbundle2extraprepare', pullbundle2extraprepare_widen
131 exchange, '_pullbundle2extraprepare', pullbundle2extraprepare_widen
132 )
132 )
133
133
134 with wrappedextraprepare:
134 with wrappedextraprepare:
@@ -146,7 +146,7 b' def pullnarrowcmd(orig, ui, repo, *args,'
146 kwargs[b'depth'] = opts['depth']
146 kwargs[b'depth'] = opts['depth']
147
147
148 wrappedextraprepare = extensions.wrappedfunction(
148 wrappedextraprepare = extensions.wrappedfunction(
149 exchange, b'_pullbundle2extraprepare', pullbundle2extraprepare_widen
149 exchange, '_pullbundle2extraprepare', pullbundle2extraprepare_widen
150 )
150 )
151
151
152 with wrappedextraprepare:
152 with wrappedextraprepare:
@@ -201,7 +201,7 b' def pullbundle2extraprepare(orig, pullop'
201
201
202
202
203 extensions.wrapfunction(
203 extensions.wrapfunction(
204 exchange, b'_pullbundle2extraprepare', pullbundle2extraprepare
204 exchange, '_pullbundle2extraprepare', pullbundle2extraprepare
205 )
205 )
206
206
207
207
@@ -366,7 +366,7 b' def _widen('
366 kwargs[b'excludepats'] = newexcludes
366 kwargs[b'excludepats'] = newexcludes
367
367
368 wrappedextraprepare = extensions.wrappedfunction(
368 wrappedextraprepare = extensions.wrappedfunction(
369 exchange, b'_pullbundle2extraprepare', pullbundle2extraprepare_widen
369 exchange, '_pullbundle2extraprepare', pullbundle2extraprepare_widen
370 )
370 )
371
371
372 # define a function that narrowbundle2 can call after creating the
372 # define a function that narrowbundle2 can call after creating the
@@ -36,7 +36,7 b' def reposetup(repo):'
36 kwargs["excludepats"] = b','.join(exclude)
36 kwargs["excludepats"] = b','.join(exclude)
37 return orig(cmd, *args, **kwargs)
37 return orig(cmd, *args, **kwargs)
38
38
39 extensions.wrapfunction(peer, b'_calltwowaystream', wrapped)
39 extensions.wrapfunction(peer, '_calltwowaystream', wrapped)
40
40
41 hg.wirepeersetupfuncs.append(wirereposetup)
41 hg.wirepeersetupfuncs.append(wirereposetup)
42
42
General Comments 0
You need to be logged in to leave comments. Login now