mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 06:18:07 +03:00
mdiff: remove experimental.xdiff config and related code
Summary: we have enabled xdiff for 5+ years, let's remove the experimental.xdiff config Reviewed By: quark-zju Differential Revision: D54324349 fbshipit-source-id: e058bd77c8c48c2e809a4ea4649d1a3ccb2d53e7
This commit is contained in:
parent
9b5289c0fd
commit
75186245ca
@ -275,7 +275,6 @@ coreconfigitem("experimental", "sparse-read.density-threshold", default=0.25)
|
||||
coreconfigitem("experimental", "sparse-read.min-gap-size", default="256K")
|
||||
coreconfigitem("experimental", "treemanifest", default=False)
|
||||
coreconfigitem("experimental", "uncommitondirtywdir", default=True)
|
||||
coreconfigitem("experimental", "xdiff", default=True)
|
||||
coreconfigitem("experimental", "gitcopytrace", default=True)
|
||||
coreconfigitem("extensions", ".*", default=None, generic=True)
|
||||
coreconfigitem("format", "aggressivemergedeltas", default=False)
|
||||
|
@ -1090,10 +1090,6 @@ def _dispatch(req):
|
||||
elif rpath:
|
||||
ui.warn(_("warning: --repository ignored\n"))
|
||||
|
||||
from . import match as matchmod, mdiff
|
||||
|
||||
mdiff.init(ui)
|
||||
|
||||
ui.log("command", "%s\n", msg)
|
||||
if repo:
|
||||
repo.dirstate.loginfo(ui, "pre")
|
||||
|
@ -17,7 +17,7 @@ import re
|
||||
import struct
|
||||
import zlib
|
||||
from hashlib import sha1
|
||||
from typing import Iterator, List, Optional, Pattern, Sized, Tuple, TYPE_CHECKING, Union
|
||||
from typing import Iterator, List, Optional, Pattern, Sized, Tuple, Union
|
||||
|
||||
import bindings
|
||||
|
||||
@ -28,13 +28,9 @@ from .pycompat import encodeutf8, range
|
||||
bdiff = bindings.cext.bdiff
|
||||
mpatch = bindings.cext.mpatch
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import sapling
|
||||
|
||||
|
||||
_missing_newline_marker = b"\\ No newline at end of file\n"
|
||||
|
||||
blocks = bdiff.blocks
|
||||
blocks = bindings.xdiff.blocks
|
||||
fixws = bdiff.fixws
|
||||
patches = mpatch.patches
|
||||
patchedsize = mpatch.patchedsize
|
||||
@ -44,12 +40,6 @@ wordsplitter: Pattern[bytes] = re.compile(
|
||||
rb"(\t+| +|[a-zA-Z0-9_\x80-\xff]+|[^ \ta-zA-Z0-9_\x80-\xff])"
|
||||
)
|
||||
|
||||
# called by dispatch.py
|
||||
def init(ui: "sapling.ui.ui") -> None:
|
||||
if ui.configbool("experimental", "xdiff"):
|
||||
global blocks
|
||||
blocks = bindings.xdiff.blocks
|
||||
|
||||
|
||||
def splitnewlines(text: bytes) -> "List[bytes]":
|
||||
"""like str.splitlines, but only split on newlines."""
|
||||
|
Loading…
Reference in New Issue
Block a user