Show More
@@ -195,7 +195,9 b' def _uisetup(ui):' | |||||
195 | for name, module in extensions.extensions(): |
|
195 | for name, module in extensions.extensions(): | |
196 | if name == b'rebase': |
|
196 | if name == b'rebase': | |
197 | # TODO: teach exthelper to handle this |
|
197 | # TODO: teach exthelper to handle this | |
198 |
extensions.wrapfunction( |
|
198 | extensions.wrapfunction( | |
|
199 | module, b'rebase', overrides.overriderebasecmd | |||
|
200 | ) | |||
199 |
|
201 | |||
200 |
|
202 | |||
201 | revsetpredicate = eh.revsetpredicate |
|
203 | revsetpredicate = eh.revsetpredicate |
@@ -1103,7 +1103,7 b' def hgclone(orig, ui, opts, *args, **kwa' | |||||
1103 |
|
1103 | |||
1104 |
|
1104 | |||
1105 | @eh.wrapcommand(b'rebase', extension=b'rebase') |
|
1105 | @eh.wrapcommand(b'rebase', extension=b'rebase') | |
1106 | def overriderebase(orig, ui, repo, **opts): |
|
1106 | def overriderebasecmd(orig, ui, repo, **opts): | |
1107 | if not util.safehasattr(repo, b'_largefilesenabled'): |
|
1107 | if not util.safehasattr(repo, b'_largefilesenabled'): | |
1108 | return orig(ui, repo, **opts) |
|
1108 | return orig(ui, repo, **opts) | |
1109 |
|
1109 | |||
@@ -1111,12 +1111,30 b' def overriderebase(orig, ui, repo, **opt' | |||||
1111 | repo._lfcommithooks.append(lfutil.automatedcommithook(resuming)) |
|
1111 | repo._lfcommithooks.append(lfutil.automatedcommithook(resuming)) | |
1112 | repo._lfstatuswriters.append(lambda *msg, **opts: None) |
|
1112 | repo._lfstatuswriters.append(lambda *msg, **opts: None) | |
1113 | try: |
|
1113 | try: | |
1114 | return orig(ui, repo, **opts) |
|
1114 | with ui.configoverride( | |
|
1115 | {(b'rebase', b'experimental.inmemory'): False}, b"largefiles" | |||
|
1116 | ): | |||
|
1117 | return orig(ui, repo, **opts) | |||
1115 | finally: |
|
1118 | finally: | |
1116 | repo._lfstatuswriters.pop() |
|
1119 | repo._lfstatuswriters.pop() | |
1117 | repo._lfcommithooks.pop() |
|
1120 | repo._lfcommithooks.pop() | |
1118 |
|
1121 | |||
1119 |
|
1122 | |||
|
1123 | @eh.extsetup | |||
|
1124 | def overriderebase(ui): | |||
|
1125 | try: | |||
|
1126 | rebase = extensions.find(b'rebase') | |||
|
1127 | except KeyError: | |||
|
1128 | pass | |||
|
1129 | else: | |||
|
1130 | ||||
|
1131 | def _dorebase(orig, *args, **kwargs): | |||
|
1132 | kwargs['inmemory'] = False | |||
|
1133 | return orig(*args, **kwargs) | |||
|
1134 | ||||
|
1135 | extensions.wrapfunction(rebase, b'_dorebase', _dorebase) | |||
|
1136 | ||||
|
1137 | ||||
1120 | @eh.wrapcommand(b'archive') |
|
1138 | @eh.wrapcommand(b'archive') | |
1121 | def overridearchivecmd(orig, ui, repo, dest, **opts): |
|
1139 | def overridearchivecmd(orig, ui, repo, dest, **opts): | |
1122 | with lfstatus(repo.unfiltered()): |
|
1140 | with lfstatus(repo.unfiltered()): | |
@@ -1758,10 +1776,13 b' def mergeupdate(orig, repo, node, branch' | |||||
1758 | lfdirstate.write() |
|
1776 | lfdirstate.write() | |
1759 |
|
1777 | |||
1760 | oldstandins = lfutil.getstandinsstate(repo) |
|
1778 | oldstandins = lfutil.getstandinsstate(repo) | |
1761 | # Make sure the merge runs on disk, not in-memory. largefiles is not a |
|
1779 | wc = kwargs.get('wc') | |
1762 | # good candidate for in-memory merge (large files, custom dirstate, |
|
1780 | if wc and wc.isinmemory(): | |
1763 | # matcher usage). |
|
1781 | # largefiles is not a good candidate for in-memory merge (large | |
1764 | kwargs['wc'] = repo[None] |
|
1782 | # files, custom dirstate, matcher usage). | |
|
1783 | raise error.ProgrammingError( | |||
|
1784 | b'largefiles is not compatible with in-memory merge' | |||
|
1785 | ) | |||
1765 | result = orig(repo, node, branchmerge, force, *args, **kwargs) |
|
1786 | result = orig(repo, node, branchmerge, force, *args, **kwargs) | |
1766 |
|
1787 | |||
1767 | newstandins = lfutil.getstandinsstate(repo) |
|
1788 | newstandins = lfutil.getstandinsstate(repo) |
General Comments 0
You need to be logged in to leave comments.
Login now