1280 def setrebaseconfig(orig, ui, repo, **opts): |
1280 def setrebaseconfig(orig, ui, repo, **opts): |
1281 repo.ui.setconfig(b'experimental', b'topicrebase', b'yes', |
1281 repo.ui.setconfig(b'experimental', b'topicrebase', b'yes', |
1282 source=b'topic-extension') |
1282 source=b'topic-extension') |
1283 return orig(ui, repo, **opts) |
1283 return orig(ui, repo, **opts) |
1284 |
1284 |
1285 def new_init(orig, *args, **kwargs): |
1285 def new_init(orig, self, *args, **kwargs): |
1286 runtime = orig(*args, **kwargs) |
1286 orig(self, *args, **kwargs) |
1287 |
1287 |
1288 if util.safehasattr(runtime, 'extrafns'): |
1288 if util.safehasattr(self, 'extrafns'): |
1289 runtime.extrafns.append(savetopic) |
1289 self.extrafns.append(savetopic) |
1290 |
|
1291 return runtime |
|
1292 |
1290 |
1293 try: |
1291 try: |
1294 rebase = extensions.find(b"rebase") |
1292 rebase = extensions.find(b"rebase") |
1295 extensions.wrapfunction(rebase.rebaseruntime, '__init__', new_init) |
1293 extensions.wrapfunction(rebase.rebaseruntime, '__init__', new_init) |
1296 # This exists to store in the config that rebase is running so that we can |
1294 # This exists to store in the config that rebase is running so that we can |