1101 |
1101 |
1102 return result |
1102 return result |
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 |
1110 resuming = opts.get('continue') |
1110 resuming = opts.get('continue') |
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() |
|
1121 |
|
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) |
1118 |
1136 |
1119 |
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()): |
1756 for lfile in oldclean: |
1774 for lfile in oldclean: |
1757 lfdirstate.normallookup(lfile) |
1775 lfdirstate.normallookup(lfile) |
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) |
1768 filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) |
1789 filelist = lfutil.getlfilestoupdate(oldstandins, newstandins) |
1769 |
1790 |