Mercurial > hg
changeset 51863:f4733654f144
typing: add `from __future__ import annotations` to most files
Now that py36 is no longer supported, we can postpone annotation evaluation.
This means that the quoting is usually optional (for things imported under the
guard of `if typing.TYPE_CHECKING:` to avoid circular imports), and there's less
overhead on startup[1].
There may be some missing here. I backed out 6000f5b25c9b (which removed the
`from __future__ import ...` that was supporting py2), reverted the changes in
`contrib/`, `doc/`, and `tests/`, and then ran:
$ hg status -n --change . | \
xargs sed -i -e 's/from __future__ import .*$/from __future__ import annotations/'
There were some minor tweaks needed when reviewing (mostly making the spacing
around the import consistent, and `mercurial/testing/__init__.py` had a
multiline import that wasn't fully rewritten.
[1] https://docs.python.org/3/whatsnew/3.7.html#pep-563-postponed-evaluation-of-annotations
line wrap: on
line diff
--- a/hg Mon Sep 16 15:36:38 2024 +0200 +++ b/hg Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import os import sys
--- a/hgdemandimport/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgdemandimport/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -11,6 +11,7 @@ # demand loading is per-package. Keeping demandimport in the mercurial package # would disable demand loading for any modules in mercurial. +from __future__ import annotations import os import sys
--- a/hgdemandimport/demandimportpy3.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgdemandimport/demandimportpy3.py Mon Sep 16 15:36:44 2024 +0200 @@ -23,6 +23,8 @@ enabled. """ +from __future__ import annotations + import contextlib import importlib.util import sys
--- a/hgdemandimport/tracing.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgdemandimport/tracing.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import contextlib import os
--- a/hgext/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)
--- a/hgext/absorb.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/absorb.py Mon Sep 16 15:36:44 2024 +0200 @@ -31,6 +31,7 @@ # * Converge getdraftstack() with other code in core # * move many attributes on fixupstate to be private +from __future__ import annotations import collections
--- a/hgext/acl.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/acl.py Mon Sep 16 15:36:44 2024 +0200 @@ -213,6 +213,7 @@ ''' +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/amend.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/amend.py Mon Sep 16 15:36:44 2024 +0200 @@ -10,6 +10,7 @@ ``commit --amend`` but does not prompt an editor. """ +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/automv.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/automv.py Mon Sep 16 15:36:44 2024 +0200 @@ -24,6 +24,7 @@ # # See http://markmail.org/thread/5pxnljesvufvom57 for context. +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/beautifygraph.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/beautifygraph.py Mon Sep 16 15:36:44 2024 +0200 @@ -11,6 +11,7 @@ A terminal with UTF-8 support and monospace narrow text are required. ''' +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/blackbox.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/blackbox.py Mon Sep 16 15:36:44 2024 +0200 @@ -42,6 +42,7 @@ """ +from __future__ import annotations import re
--- a/hgext/bookflow.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/bookflow.py Mon Sep 16 15:36:44 2024 +0200 @@ -14,6 +14,8 @@ :hg push -B .: push active bookmark """ +from __future__ import annotations + from mercurial.i18n import _ from mercurial import ( bookmarks,
--- a/hgext/bugzilla.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/bugzilla.py Mon Sep 16 15:36:44 2024 +0200 @@ -291,6 +291,7 @@ Changeset commit comment. Bug 1234. ''' +from __future__ import annotations import json import re
--- a/hgext/censor.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/censor.py Mon Sep 16 15:36:44 2024 +0200 @@ -31,6 +31,7 @@ :config-doc:`censor.policy` """ +from __future__ import annotations from mercurial.i18n import _ from mercurial.node import short
--- a/hgext/children.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/children.py Mon Sep 16 15:36:44 2024 +0200 @@ -14,6 +14,7 @@ "children(REV)"` instead. ''' +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/churn.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/churn.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,7 @@ '''command to display statistics about repository history''' +from __future__ import annotations import datetime import os
--- a/hgext/clonebundles.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/clonebundles.py Mon Sep 16 15:36:44 2024 +0200 @@ -308,6 +308,7 @@ If the file was already deleted, the command must still succeed. """ +from __future__ import annotations import os import weakref
--- a/hgext/closehead.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/closehead.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ '''close arbitrary heads without checking them out first''' +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/commitextras.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/commitextras.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ '''adds a new flag extras to commit (ADVANCED)''' +from __future__ import annotations import re
--- a/hgext/convert/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ '''import revisions from foreign VCS repositories into Mercurial''' +from __future__ import annotations from mercurial.i18n import _ from mercurial import registrar
--- a/hgext/convert/bzr.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/bzr.py Mon Sep 16 15:36:44 2024 +0200 @@ -9,6 +9,8 @@ # with Bazaar or `bzr`, that was formerly known as Bazaar-NG; # it cannot access `bar` repositories, but they were never used very much. +from __future__ import annotations + import os from mercurial.i18n import _
--- a/hgext/convert/common.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/common.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import base64 import os import pickle
--- a/hgext/convert/convcmd.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/convcmd.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import collections import heapq import os
--- a/hgext/convert/cvs.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/cvs.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import errno import os import re
--- a/hgext/convert/cvsps.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/cvsps.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import functools import os import pickle
--- a/hgext/convert/darcs.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/darcs.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import os import re import shutil
--- a/hgext/convert/filemap.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/filemap.py Mon Sep 16 15:36:44 2024 +0200 @@ -4,6 +4,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import posixpath import typing
--- a/hgext/convert/git.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/git.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import os from mercurial.i18n import _
--- a/hgext/convert/gnuarch.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/gnuarch.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import os import shutil import stat
--- a/hgext/convert/hg.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/hg.py Mon Sep 16 15:36:44 2024 +0200 @@ -17,6 +17,8 @@ # the converted revision to have a different identity than the # source. +from __future__ import annotations + import os import re import time
--- a/hgext/convert/monotone.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/monotone.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import os import re from typing import (
--- a/hgext/convert/p4.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/p4.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import marshal import re
--- a/hgext/convert/subversion.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/subversion.py Mon Sep 16 15:36:44 2024 +0200 @@ -2,6 +2,8 @@ # # Copyright(C) 2007 Daniel Holth et al +from __future__ import annotations + import codecs import locale import os
--- a/hgext/convert/transport.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/convert/transport.py Mon Sep 16 15:36:44 2024 +0200 @@ -17,6 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. +from __future__ import annotations + # pytype: disable=import-error import svn.client import svn.core
--- a/hgext/eol.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/eol.py Mon Sep 16 15:36:44 2024 +0200 @@ -91,6 +91,7 @@ used. """ +from __future__ import annotations import os import re
--- a/hgext/extdiff.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/extdiff.py Mon Sep 16 15:36:44 2024 +0200 @@ -81,6 +81,7 @@ pretty fast (at least faster than having to compare the entire tree). ''' +from __future__ import annotations import os import re
--- a/hgext/factotum.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/factotum.py Mon Sep 16 15:36:44 2024 +0200 @@ -45,6 +45,7 @@ ''' +from __future__ import annotations import os from mercurial.i18n import _
--- a/hgext/fastannotate/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fastannotate/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -102,6 +102,8 @@ # * format changes to the revmap file (maybe use length-encoding # instead of null-terminated file paths at least?) +from __future__ import annotations + from mercurial.i18n import _ from mercurial import ( error as hgerror,
--- a/hgext/fastannotate/commands.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fastannotate/commands.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os from typing import (
--- a/hgext/fastannotate/context.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fastannotate/context.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import collections import contextlib
--- a/hgext/fastannotate/error.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fastannotate/error.py Mon Sep 16 15:36:44 2024 +0200 @@ -4,6 +4,7 @@ # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations class CorruptedFileError(Exception):
--- a/hgext/fastannotate/formatter.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fastannotate/formatter.py Mon Sep 16 15:36:44 2024 +0200 @@ -4,6 +4,7 @@ # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from mercurial.node import ( hex,
--- a/hgext/fastannotate/protocol.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fastannotate/protocol.py Mon Sep 16 15:36:44 2024 +0200 @@ -4,6 +4,7 @@ # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import contextlib import os
--- a/hgext/fastannotate/revmap.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fastannotate/revmap.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import bisect import io
--- a/hgext/fastannotate/support.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fastannotate/support.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from mercurial import ( context as hgcontext,
--- a/hgext/fastexport.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fastexport.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,8 @@ # The format specification for fast-import streams can be found at # https://git-scm.com/docs/git-fast-import#_input_format +from __future__ import annotations + import re from mercurial.i18n import _
--- a/hgext/fetch.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fetch.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ '''pull, update and merge in one command (DEPRECATED)''' +from __future__ import annotations from mercurial.i18n import _ from mercurial.node import short
--- a/hgext/fix.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fix.py Mon Sep 16 15:36:44 2024 +0200 @@ -122,6 +122,7 @@ previously passed to the "postfixfile" hook. """ +from __future__ import annotations import collections import itertools
--- a/hgext/fsmonitor/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fsmonitor/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -107,6 +107,7 @@ # The issues related to nested repos and subrepos are probably not fundamental # ones. Patches to fix them are welcome. +from __future__ import annotations import codecs import os
--- a/hgext/fsmonitor/pywatchman/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fsmonitor/pywatchman/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -26,6 +26,8 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import annotations + import inspect import math import os
--- a/hgext/fsmonitor/pywatchman/capabilities.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fsmonitor/pywatchman/capabilities.py Mon Sep 16 15:36:44 2024 +0200 @@ -26,6 +26,8 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import annotations + def parse_version(vstr): res = 0
--- a/hgext/fsmonitor/pywatchman/compat.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fsmonitor/pywatchman/compat.py Mon Sep 16 15:36:44 2024 +0200 @@ -26,6 +26,8 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import annotations + import sys
--- a/hgext/fsmonitor/pywatchman/encoding.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fsmonitor/pywatchman/encoding.py Mon Sep 16 15:36:44 2024 +0200 @@ -26,6 +26,8 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import annotations + import sys from . import compat
--- a/hgext/fsmonitor/pywatchman/load.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fsmonitor/pywatchman/load.py Mon Sep 16 15:36:44 2024 +0200 @@ -26,6 +26,8 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import annotations + import ctypes
--- a/hgext/fsmonitor/pywatchman/pybser.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fsmonitor/pywatchman/pybser.py Mon Sep 16 15:36:44 2024 +0200 @@ -26,6 +26,8 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import annotations + import binascii import collections import ctypes
--- a/hgext/fsmonitor/state.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fsmonitor/state.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import errno import os
--- a/hgext/fsmonitor/watchmanclient.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/fsmonitor/watchmanclient.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import getpass
--- a/hgext/git/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/git/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -4,6 +4,7 @@ firstborn a la Rumpelstiltskin, etc. """ +from __future__ import annotations import os
--- a/hgext/git/dirstate.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/git/dirstate.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import contextlib import os
--- a/hgext/git/gitlog.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/git/gitlog.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + from mercurial.i18n import _ from mercurial.node import (
--- a/hgext/git/gitutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/git/gitutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,5 +1,7 @@ """utilities to assist in working with pygit2""" +from __future__ import annotations + from mercurial.node import bin, sha1nodeconstants pygit2_module = None
--- a/hgext/git/index.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/git/index.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import collections import os import sqlite3
--- a/hgext/git/manifest.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/git/manifest.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + from mercurial import ( match as matchmod, pathutil,
--- a/hgext/githelp.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/githelp.py Mon Sep 16 15:36:44 2024 +0200 @@ -15,6 +15,7 @@ produced. """ +from __future__ import annotations import getopt import re
--- a/hgext/gpg.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/gpg.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ '''commands to sign and verify changesets''' +from __future__ import annotations import binascii import os
--- a/hgext/graphlog.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/graphlog.py Mon Sep 16 15:36:44 2024 +0200 @@ -15,6 +15,7 @@ revision graph is also shown. ''' +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/hgk.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/hgk.py Mon Sep 16 15:36:44 2024 +0200 @@ -34,6 +34,7 @@ vdiff on hovered and selected revisions. ''' +from __future__ import annotations import os
--- a/hgext/highlight/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/highlight/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -26,6 +26,7 @@ match (even matches with a low confidence score) will be used. """ +from __future__ import annotations from . import highlight from mercurial.hgweb import (
--- a/hgext/highlight/highlight.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/highlight/highlight.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,7 @@ # The original module was split in an interface and an implementation # file to defer pygments loading and speedup extension setup. +from __future__ import annotations from mercurial import demandimport
--- a/hgext/histedit.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/histedit.py Mon Sep 16 15:36:44 2024 +0200 @@ -190,6 +190,7 @@ """ +from __future__ import annotations # chistedit dependencies that are not available everywhere try:
--- a/hgext/hooklib/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/hooklib/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -13,6 +13,9 @@ extension as option. The functionality itself is planned to be supported long-term. """ + +from __future__ import annotations + from . import ( changeset_obsoleted, changeset_published,
--- a/hgext/hooklib/changeset_obsoleted.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/hooklib/changeset_obsoleted.py Mon Sep 16 15:36:44 2024 +0200 @@ -17,6 +17,7 @@ python:hgext.hooklib.changeset_obsoleted.hook """ +from __future__ import annotations import email.errors as emailerrors import email.utils as emailutils
--- a/hgext/hooklib/changeset_published.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/hooklib/changeset_published.py Mon Sep 16 15:36:44 2024 +0200 @@ -17,6 +17,7 @@ python:hgext.hooklib.changeset_published.hook """ +from __future__ import annotations import email.errors as emailerrors import email.utils as emailutils
--- a/hgext/hooklib/enforce_draft_commits.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/hooklib/enforce_draft_commits.py Mon Sep 16 15:36:44 2024 +0200 @@ -14,6 +14,7 @@ python:hgext.hooklib.enforce_draft_commits.hook """ +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/hooklib/reject_merge_commits.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/hooklib/reject_merge_commits.py Mon Sep 16 15:36:44 2024 +0200 @@ -14,6 +14,7 @@ python:hgext.hooklib.reject_merge_commits.hook """ +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/hooklib/reject_new_heads.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/hooklib/reject_new_heads.py Mon Sep 16 15:36:44 2024 +0200 @@ -14,6 +14,7 @@ python:hgext.hooklib.reject_new_heads.hook """ +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/journal.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/journal.py Mon Sep 16 15:36:44 2024 +0200 @@ -11,6 +11,7 @@ """ +from __future__ import annotations import collections import os
--- a/hgext/keyword.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/keyword.py Mon Sep 16 15:36:44 2024 +0200 @@ -83,6 +83,8 @@ ''' +from __future__ import annotations + import os import re import weakref
--- a/hgext/largefiles/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/largefiles/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -105,6 +105,8 @@ command. ''' +from __future__ import annotations + from mercurial import ( cmdutil, configitems,
--- a/hgext/largefiles/basestore.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/largefiles/basestore.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,8 @@ '''base class for store implementations and store-related utility code''' +from __future__ import annotations + from mercurial.i18n import _ from mercurial.node import short
--- a/hgext/largefiles/lfcommands.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/largefiles/lfcommands.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,8 @@ '''High-level command function for lfconvert, plus the cmdtable.''' +from __future__ import annotations + import binascii import os import shutil
--- a/hgext/largefiles/lfutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/largefiles/lfutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,8 @@ '''largefiles utility code: must not import other modules in this package.''' +from __future__ import annotations + import contextlib import copy import os
--- a/hgext/largefiles/localstore.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/largefiles/localstore.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,8 @@ '''store class for local filesystem''' +from __future__ import annotations + from mercurial.i18n import _ from mercurial.pycompat import open from mercurial import util
--- a/hgext/largefiles/overrides.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/largefiles/overrides.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,8 @@ '''Overridden Mercurial commands and functions for the largefiles extension''' +from __future__ import annotations + import contextlib import copy import os
--- a/hgext/largefiles/proto.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/largefiles/proto.py Mon Sep 16 15:36:44 2024 +0200 @@ -3,6 +3,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import os from mercurial.i18n import _
--- a/hgext/largefiles/remotestore.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/largefiles/remotestore.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,8 @@ '''remote largefile store; the base class for wirestore''' +from __future__ import annotations + from mercurial.i18n import _ from mercurial import (
--- a/hgext/largefiles/reposetup.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/largefiles/reposetup.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,8 @@ '''setup for largefiles repositories: reposetup''' +from __future__ import annotations + import copy from mercurial.i18n import _
--- a/hgext/largefiles/storefactory.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/largefiles/storefactory.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,6 +1,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import re
--- a/hgext/largefiles/wirestore.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/largefiles/wirestore.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ '''largefile store working over Mercurial's wire protocol''' +from __future__ import annotations + from . import ( lfutil, remotestore,
--- a/hgext/lfs/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/lfs/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -120,6 +120,7 @@ usercache = /path/to/global/cache """ +from __future__ import annotations import sys
--- a/hgext/lfs/blobstore.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/lfs/blobstore.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import contextlib import errno
--- a/hgext/lfs/pointer.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/lfs/pointer.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import re
--- a/hgext/lfs/wireprotolfsserver.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/lfs/wireprotolfsserver.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import datetime import errno
--- a/hgext/lfs/wrapper.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/lfs/wrapper.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import hashlib
--- a/hgext/logtoprocess.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/logtoprocess.py Mon Sep 16 15:36:44 2024 +0200 @@ -32,6 +32,7 @@ """ +from __future__ import annotations import os
--- a/hgext/mq.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/mq.py Mon Sep 16 15:36:44 2024 +0200 @@ -62,6 +62,7 @@ in the strip extension. ''' +from __future__ import annotations import os import re
--- a/hgext/narrow/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/narrow/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # GNU General Public License version 2 or any later version. '''create clones which fetch history data for subset of files (EXPERIMENTAL)''' +from __future__ import annotations from mercurial import ( localrepo,
--- a/hgext/narrow/narrowbundle2.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/narrow/narrowbundle2.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import struct
--- a/hgext/narrow/narrowcommands.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/narrow/narrowcommands.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import itertools import os
--- a/hgext/narrow/narrowdirstate.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/narrow/narrowdirstate.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from mercurial.i18n import _ from mercurial import error
--- a/hgext/narrow/narrowrepo.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/narrow/narrowrepo.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from mercurial import wireprototypes
--- a/hgext/narrow/narrowtemplates.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/narrow/narrowtemplates.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from mercurial import ( registrar,
--- a/hgext/narrow/narrowwirepeer.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/narrow/narrowwirepeer.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from mercurial.i18n import _
--- a/hgext/notify.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/notify.py Mon Sep 16 15:36:44 2024 +0200 @@ -155,6 +155,8 @@ ''' +from __future__ import annotations + import email.errors as emailerrors import email.utils as emailutils import fnmatch
--- a/hgext/pager.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/pager.py Mon Sep 16 15:36:44 2024 +0200 @@ -22,6 +22,8 @@ attend-cat = false ''' +from __future__ import annotations + from mercurial import ( cmdutil, commands,
--- a/hgext/patchbomb.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/patchbomb.py Mon Sep 16 15:36:44 2024 +0200 @@ -72,6 +72,8 @@ ``patchbomb.confirm`` to true. ''' +from __future__ import annotations + import email.encoders as emailencoders import email.mime.base as emimebase import email.mime.multipart as emimemultipart
--- a/hgext/phabricator.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/phabricator.py Mon Sep 16 15:36:44 2024 +0200 @@ -57,6 +57,7 @@ example.phabtoken = cli-xxxxxxxxxxxxxxxxxxxxxxxxxxxx """ +from __future__ import annotations import base64 import contextlib
--- a/hgext/rebase.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/rebase.py Mon Sep 16 15:36:44 2024 +0200 @@ -14,6 +14,7 @@ https://mercurial-scm.org/wiki/RebaseExtension ''' +from __future__ import annotations import os
--- a/hgext/record.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/record.py Mon Sep 16 15:36:44 2024 +0200 @@ -10,6 +10,7 @@ The feature provided by this extension has been moved into core Mercurial as :hg:`commit --interactive`.''' +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/releasenotes.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/releasenotes.py Mon Sep 16 15:36:44 2024 +0200 @@ -11,6 +11,7 @@ process simpler by automating it. """ +from __future__ import annotations import difflib import re
--- a/hgext/relink.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/relink.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,8 @@ """recreates hardlinks between repository clones""" +from __future__ import annotations + import os import stat
--- a/hgext/remotefilelog/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -125,6 +125,8 @@ """ +from __future__ import annotations + import os import time import traceback
--- a/hgext/remotefilelog/basepack.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/basepack.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import collections import errno import mmap
--- a/hgext/remotefilelog/basestore.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/basestore.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import shutil import stat
--- a/hgext/remotefilelog/connectionpool.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/connectionpool.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from mercurial import ( hg,
--- a/hgext/remotefilelog/constants.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/constants.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import struct from mercurial.i18n import _
--- a/hgext/remotefilelog/contentstore.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/contentstore.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import threading from mercurial.node import (
--- a/hgext/remotefilelog/datapack.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/datapack.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import struct import zlib
--- a/hgext/remotefilelog/debugcommands.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/debugcommands.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import os import zlib
--- a/hgext/remotefilelog/fileserverclient.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/fileserverclient.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import io import os
--- a/hgext/remotefilelog/historypack.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/historypack.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import struct from mercurial.node import (
--- a/hgext/remotefilelog/metadatastore.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/metadatastore.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + from mercurial.node import ( hex, sha1nodeconstants,
--- a/hgext/remotefilelog/remotefilectx.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/remotefilectx.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import collections import time
--- a/hgext/remotefilelog/remotefilelog.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/remotefilelog.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import collections from typing import (
--- a/hgext/remotefilelog/remotefilelogserver.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/remotefilelogserver.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import os import stat import time
--- a/hgext/remotefilelog/repack.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/repack.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import time
--- a/hgext/remotefilelog/shallowbundle.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/shallowbundle.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + from mercurial.i18n import _ from mercurial.node import bin, hex from mercurial import (
--- a/hgext/remotefilelog/shallowrepo.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/shallowrepo.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import os from mercurial.i18n import _
--- a/hgext/remotefilelog/shallowstore.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/shallowstore.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + def wrapstore(store): class shallowstore(store.__class__):
--- a/hgext/remotefilelog/shallowutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/shallowutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import collections import os import stat
--- a/hgext/remotefilelog/shallowverifier.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotefilelog/shallowverifier.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + from mercurial.i18n import _ from mercurial import verify
--- a/hgext/remotenames.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/remotenames.py Mon Sep 16 15:36:44 2024 +0200 @@ -24,6 +24,7 @@ namespace (default: 'default') """ +from __future__ import annotations import collections.abc
--- a/hgext/schemes.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/schemes.py Mon Sep 16 15:36:44 2024 +0200 @@ -40,6 +40,8 @@ same name. """ +from __future__ import annotations + import os import re
--- a/hgext/share.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/share.py Mon Sep 16 15:36:44 2024 +0200 @@ -65,6 +65,7 @@ and there are no untracked files, delete that share and create a new share. ''' +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/show.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/show.py Mon Sep 16 15:36:44 2024 +0200 @@ -25,6 +25,7 @@ performed. """ +from __future__ import annotations from mercurial.i18n import _ from mercurial.node import nullrev
--- a/hgext/sparse.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/sparse.py Mon Sep 16 15:36:44 2024 +0200 @@ -71,6 +71,7 @@ tools/tests/** """ +from __future__ import annotations from mercurial.i18n import _ from mercurial import (
--- a/hgext/split.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/split.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ # GNU General Public License version 2 or any later version. """command to split a changeset into smaller ones (EXPERIMENTAL)""" +from __future__ import annotations from mercurial.i18n import _
--- a/hgext/sqlitestore.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/sqlitestore.py Mon Sep 16 15:36:44 2024 +0200 @@ -43,6 +43,7 @@ # --extra-config-opt extensions.sqlitestore= \ # --extra-config-opt storage.new-repo-backend=sqlite +from __future__ import annotations import sqlite3 import struct
--- a/hgext/strip.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/strip.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,8 @@ repository. See the command help for details. """ +from __future__ import annotations + from mercurial import commands # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
--- a/hgext/transplant.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/transplant.py Mon Sep 16 15:36:44 2024 +0200 @@ -14,6 +14,8 @@ map from a changeset hash to its hash in the source repository. ''' +from __future__ import annotations + import os from mercurial.i18n import _
--- a/hgext/uncommit.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/uncommit.py Mon Sep 16 15:36:44 2024 +0200 @@ -17,6 +17,7 @@ added and removed in the working directory. """ +from __future__ import annotations from mercurial.i18n import _
--- a/hgext/win32mbcs.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/win32mbcs.py Mon Sep 16 15:36:44 2024 +0200 @@ -45,6 +45,8 @@ It is useful for the users who want to commit with UTF-8 log message. ''' +from __future__ import annotations + import os import sys
--- a/hgext/win32text.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/win32text.py Mon Sep 16 15:36:44 2024 +0200 @@ -41,6 +41,7 @@ # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr ''' +from __future__ import annotations import re from mercurial.i18n import _
--- a/hgext/zeroconf/Zeroconf.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/zeroconf/Zeroconf.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + """ Multicast DNS Service Discovery for Python, v0.12 Copyright (C) 2003, Paul Scott-Murphy
--- a/hgext/zeroconf/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext/zeroconf/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -23,6 +23,8 @@ zc-test = http://example.com:8000/test ''' +from __future__ import annotations + import os import socket import time
--- a/hgext3rd/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/hgext3rd/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,4 +1,7 @@ # name space package to host third party extensions + +from __future__ import annotations + import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)
--- a/i18n/check-translation.py Mon Sep 16 15:36:38 2024 +0200 +++ b/i18n/check-translation.py Mon Sep 16 15:36:44 2024 +0200 @@ -2,6 +2,8 @@ # # check-translation.py - check Mercurial specific translation problems +from __future__ import annotations + import re import polib
--- a/i18n/hggettext Mon Sep 16 15:36:38 2024 +0200 +++ b/i18n/hggettext Mon Sep 16 15:36:44 2024 +0200 @@ -20,6 +20,7 @@ join the message cataloges to get the final catalog. """ +from __future__ import annotations import inspect import os
--- a/i18n/polib.py Mon Sep 16 15:36:38 2024 +0200 +++ b/i18n/polib.py Mon Sep 16 15:36:44 2024 +0200 @@ -13,6 +13,7 @@ :func:`~polib.mofile` convenience functions. """ +from __future__ import annotations __author__ = 'David Jean Louis <izimobil@gmail.com>' __version__ = '1.0.7'
--- a/i18n/posplit Mon Sep 16 15:36:38 2024 +0200 +++ b/i18n/posplit Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # license: MIT/X11/Expat # +from __future__ import annotations import polib import re
--- a/mercurial/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations # Allow 'from mercurial import demandimport' to keep working. import hgdemandimport
--- a/mercurial/ancestor.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/ancestor.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import heapq
--- a/mercurial/archival.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/archival.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import gzip import os
--- a/mercurial/bookmarks.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/bookmarks.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import struct
--- a/mercurial/branchmap.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/branchmap.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import struct
--- a/mercurial/bundle2.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/bundle2.py Mon Sep 16 15:36:44 2024 +0200 @@ -145,6 +145,7 @@ preserve. """ +from __future__ import annotations import collections import errno
--- a/mercurial/bundlerepo.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/bundlerepo.py Mon Sep 16 15:36:44 2024 +0200 @@ -11,6 +11,7 @@ were part of the actual repository. """ +from __future__ import annotations import contextlib import os
--- a/mercurial/cacheutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/cacheutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + from . import repoview
--- a/mercurial/cffi/bdiff.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/cffi/bdiff.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import struct
--- a/mercurial/cffi/bdiffbuild.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/cffi/bdiffbuild.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import cffi import os
--- a/mercurial/cffi/mpatch.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/cffi/mpatch.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from typing import List
--- a/mercurial/cffi/mpatchbuild.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/cffi/mpatchbuild.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import cffi import os
--- a/mercurial/cffi/osutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/cffi/osutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os import stat as statmod
--- a/mercurial/cffi/osutilbuild.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/cffi/osutilbuild.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import cffi ffi = cffi.FFI()
--- a/mercurial/changegroup.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/changegroup.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os import struct
--- a/mercurial/changelog.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/changelog.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import typing
--- a/mercurial/chgserver.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/chgserver.py Mon Sep 16 15:36:44 2024 +0200 @@ -39,6 +39,7 @@ skiphash = False """ +from __future__ import annotations import inspect import os
--- a/mercurial/cmdutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/cmdutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import copy as copymod import errno
--- a/mercurial/color.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/color.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import re
--- a/mercurial/commands.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/commands.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os import re
--- a/mercurial/commandserver.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/commandserver.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import gc import os
--- a/mercurial/commit.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/commit.py Mon Sep 16 15:36:44 2024 +0200 @@ -3,6 +3,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from .i18n import _ from .node import (
--- a/mercurial/config.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/config.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import errno import os
--- a/mercurial/configitems.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/configitems.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import functools import re
--- a/mercurial/context.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/context.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import filecmp import os
--- a/mercurial/copies.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/copies.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import collections import os
--- a/mercurial/crecord.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/crecord.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,7 @@ # This code is based on the Mark Edgington's crecord extension. # (Itself based on Bryan O'Sullivan's record extension.) +from __future__ import annotations import os import re
--- a/mercurial/dagop.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/dagop.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import heapq import typing
--- a/mercurial/dagparser.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/dagparser.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import re import string
--- a/mercurial/debugcommands.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/debugcommands.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import binascii import codecs
--- a/mercurial/destutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/destutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from .i18n import _ from . import bookmarks, error, obsutil, scmutil, stack
--- a/mercurial/diffhelper.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/diffhelper.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from .i18n import _
--- a/mercurial/diffutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/diffutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import typing from typing import (
--- a/mercurial/dirstate.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/dirstate.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import collections import contextlib
--- a/mercurial/dirstatemap.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/dirstatemap.py Mon Sep 16 15:36:44 2024 +0200 @@ -3,6 +3,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from typing import ( Optional,
--- a/mercurial/dirstateutils/docket.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/dirstateutils/docket.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import struct
--- a/mercurial/dirstateutils/timestamp.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/dirstateutils/timestamp.py Mon Sep 16 15:36:44 2024 +0200 @@ -3,6 +3,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import functools import os
--- a/mercurial/dirstateutils/v2.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/dirstateutils/v2.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import struct import typing
--- a/mercurial/discovery.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/discovery.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import functools
--- a/mercurial/dispatch.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/dispatch.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import errno import getopt
--- a/mercurial/encoding.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/encoding.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import locale import os
--- a/mercurial/error.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/error.py Mon Sep 16 15:36:44 2024 +0200 @@ -11,6 +11,7 @@ imports. """ +from __future__ import annotations import difflib
--- a/mercurial/exchange.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/exchange.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import collections import weakref
--- a/mercurial/extensions.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/extensions.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import ast import collections
--- a/mercurial/exthelper.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/exthelper.py Mon Sep 16 15:36:44 2024 +0200 @@ -9,6 +9,7 @@ ### Extension helper ### ##################################################################### +from __future__ import annotations from . import ( commands,
--- a/mercurial/fancyopts.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/fancyopts.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import abc import functools
--- a/mercurial/filelog.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/filelog.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import typing
--- a/mercurial/filemerge.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/filemerge.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import contextlib import os
--- a/mercurial/fileset.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/fileset.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import re
--- a/mercurial/filesetlang.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/filesetlang.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from .i18n import _ from . import (
--- a/mercurial/formatter.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/formatter.py Mon Sep 16 15:36:44 2024 +0200 @@ -105,6 +105,7 @@ baz: foo, bar """ +from __future__ import annotations import contextlib import itertools
--- a/mercurial/graphmod.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/graphmod.py Mon Sep 16 15:36:44 2024 +0200 @@ -17,6 +17,7 @@ Data depends on type. """ +from __future__ import annotations import typing
--- a/mercurial/grep.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/grep.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import difflib
--- a/mercurial/hbisect.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hbisect.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import collections import contextlib
--- a/mercurial/help.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/help.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import itertools import re
--- a/mercurial/hg.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hg.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os import posixpath
--- a/mercurial/hgweb/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hgweb/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os
--- a/mercurial/hgweb/common.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hgweb/common.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import base64 import errno
--- a/mercurial/hgweb/hgweb_mod.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import contextlib import os
--- a/mercurial/hgweb/hgwebdir_mod.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hgweb/hgwebdir_mod.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import gc import os
--- a/mercurial/hgweb/request.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hgweb/request.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations # import wsgiref.validate
--- a/mercurial/hgweb/server.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hgweb/server.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import errno import os
--- a/mercurial/hgweb/webcommands.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hgweb/webcommands.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import copy import mimetypes
--- a/mercurial/hgweb/webutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hgweb/webutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import copy import difflib
--- a/mercurial/hgweb/wsgicgi.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hgweb/wsgicgi.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,7 @@ # This was originally copied from the public domain code at # http://www.python.org/dev/peps/pep-0333/#the-server-gateway-side +from __future__ import annotations from .. import encoding, pycompat
--- a/mercurial/hgweb/wsgiheaders.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hgweb/wsgiheaders.py Mon Sep 16 15:36:44 2024 +0200 @@ -9,6 +9,7 @@ # Regular expression that matches `special' characters in parameters, the # existence of which force quoting of the parameter value. +from __future__ import annotations import re
--- a/mercurial/hook.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/hook.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import contextlib import errno
--- a/mercurial/httpconnection.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/httpconnection.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os
--- a/mercurial/httppeer.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/httppeer.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import errno import io
--- a/mercurial/i18n.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/i18n.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import gettext as gettextmod import locale
--- a/mercurial/interfaces/dirstate.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/interfaces/dirstate.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import contextlib from . import util as interfaceutil
--- a/mercurial/interfaces/repository.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/interfaces/repository.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from ..i18n import _ from .. import error
--- a/mercurial/interfaces/util.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/interfaces/util.py Mon Sep 16 15:36:44 2024 +0200 @@ -9,6 +9,7 @@ # bookkeeping for declaring interfaces. So, we use stubs for various # zope.interface primitives unless instructed otherwise. +from __future__ import annotations from .. import encoding
--- a/mercurial/keepalive.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/keepalive.py Mon Sep 16 15:36:44 2024 +0200 @@ -82,6 +82,7 @@ # $Id: keepalive.py,v 1.14 2006/04/04 21:00:32 mstenner Exp $ +from __future__ import annotations import collections import hashlib
--- a/mercurial/linelog.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/linelog.py Mon Sep 16 15:36:44 2024 +0200 @@ -19,6 +19,8 @@ in a new body of annotate information. """ +from __future__ import annotations + import abc import struct import typing
--- a/mercurial/localrepo.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/localrepo.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import functools import os
--- a/mercurial/lock.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/lock.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import contextlib import errno
--- a/mercurial/logcmdutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/logcmdutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import itertools import os
--- a/mercurial/logexchange.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/logexchange.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from .node import hex
--- a/mercurial/loggingutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/loggingutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import errno
--- a/mercurial/lsprof.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/lsprof.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import _lsprof import sys
--- a/mercurial/lsprofcalltree.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/lsprofcalltree.py Mon Sep 16 15:36:44 2024 +0200 @@ -10,6 +10,7 @@ of the GNU General Public License, incorporated herein by reference. """ +from __future__ import annotations from . import pycompat
--- a/mercurial/mail.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/mail.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import email import email.charset
--- a/mercurial/manifest.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/manifest.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import heapq import itertools
--- a/mercurial/match.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/match.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import bisect import copy
--- a/mercurial/mdiff.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/mdiff.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import re import struct
--- a/mercurial/merge.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/merge.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import collections import struct
--- a/mercurial/mergestate.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/mergestate.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import collections import shutil import struct
--- a/mercurial/mergeutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/mergeutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from .i18n import _
--- a/mercurial/minifileset.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/minifileset.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from .i18n import _ from . import (
--- a/mercurial/minirst.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/minirst.py Mon Sep 16 15:36:44 2024 +0200 @@ -18,6 +18,7 @@ when adding support for new constructs. """ +from __future__ import annotations import re
--- a/mercurial/namespaces.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/namespaces.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + from .i18n import _ from . import ( registrar,
--- a/mercurial/narrowspec.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/narrowspec.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import weakref from .i18n import _
--- a/mercurial/node.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/node.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import binascii
--- a/mercurial/obsolete.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/obsolete.py Mon Sep 16 15:36:44 2024 +0200 @@ -68,6 +68,8 @@ """ +from __future__ import annotations + import binascii import struct import weakref
--- a/mercurial/obsutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/obsutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import re
--- a/mercurial/parser.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/parser.py Mon Sep 16 15:36:44 2024 +0200 @@ -16,6 +16,7 @@ # an action is a tree node name, a tree label, and an optional match # __call__(program) parses program into a labeled tree +from __future__ import annotations from .i18n import _ from . import (
--- a/mercurial/patch.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/patch.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import collections import contextlib
--- a/mercurial/pathutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/pathutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import contextlib import errno import os
--- a/mercurial/phases.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/phases.py Mon Sep 16 15:36:44 2024 +0200 @@ -100,6 +100,7 @@ """ +from __future__ import annotations import heapq import struct
--- a/mercurial/policy.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/policy.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os import sys
--- a/mercurial/posix.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/posix.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import errno import fcntl
--- a/mercurial/profiling.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/profiling.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import contextlib import os
--- a/mercurial/progress.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/progress.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import threading import time
--- a/mercurial/pure/base85.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/pure/base85.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import struct
--- a/mercurial/pure/bdiff.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/pure/bdiff.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import difflib import re
--- a/mercurial/pure/charencode.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/pure/charencode.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import array
--- a/mercurial/pure/mpatch.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/pure/mpatch.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import io import struct
--- a/mercurial/pure/osutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/pure/osutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import ctypes import ctypes.util
--- a/mercurial/pure/parsers.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/pure/parsers.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import io import stat
--- a/mercurial/pushkey.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/pushkey.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from . import ( bookmarks,
--- a/mercurial/pvec.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/pvec.py Mon Sep 16 15:36:44 2024 +0200 @@ -48,6 +48,7 @@ different branches ''' +from __future__ import annotations from .node import nullrev from . import (
--- a/mercurial/pycompat.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/pycompat.py Mon Sep 16 15:36:44 2024 +0200 @@ -8,6 +8,7 @@ This contains aliases to hide python version-specific details from the core. """ +from __future__ import annotations import builtins import codecs
--- a/mercurial/rcutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/rcutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os
--- a/mercurial/registrar.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/registrar.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from typing import Any, List, Optional, Tuple from . import (
--- a/mercurial/repair.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/repair.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from .i18n import _ from .node import (
--- a/mercurial/repocache.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/repocache.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import collections import gc
--- a/mercurial/repoview.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/repoview.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import copy import weakref
--- a/mercurial/requirements.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/requirements.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations # obsolete experimental requirements: # - manifestv2: An experimental new manifest format that allowed
--- a/mercurial/revlog.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/revlog.py Mon Sep 16 15:36:44 2024 +0200 @@ -12,6 +12,7 @@ and O(changes) merge between branches. """ +from __future__ import annotations import binascii import collections
--- a/mercurial/revlogutils/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/revlogutils/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import typing
--- a/mercurial/revlogutils/constants.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/revlogutils/constants.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ # GNU General Public License version 2 or any later version. """Helper class to compute deltas stored inside revlogs""" +from __future__ import annotations import struct
--- a/mercurial/revlogutils/deltas.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/revlogutils/deltas.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ # GNU General Public License version 2 or any later version. """Helper class to compute deltas stored inside revlogs""" +from __future__ import annotations import abc import collections
--- a/mercurial/revlogutils/docket.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/revlogutils/docket.py Mon Sep 16 15:36:44 2024 +0200 @@ -15,6 +15,7 @@ # # * a data file, containing variable width data for these revisions, +from __future__ import annotations import os import random
--- a/mercurial/revlogutils/flagutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/revlogutils/flagutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from ..i18n import _
--- a/mercurial/revlogutils/nodemap.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/revlogutils/nodemap.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import re import struct
--- a/mercurial/revlogutils/revlogv0.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/revlogutils/revlogv0.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from ..node import sha1nodeconstants from .constants import (
--- a/mercurial/revlogutils/sidedata.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/revlogutils/sidedata.py Mon Sep 16 15:36:44 2024 +0200 @@ -30,6 +30,7 @@ the concept. """ +from __future__ import annotations import collections import struct
--- a/mercurial/revset.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/revset.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import binascii import functools
--- a/mercurial/revsetlang.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/revsetlang.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import string
--- a/mercurial/rewriteutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/rewriteutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import re
--- a/mercurial/scmposix.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/scmposix.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import array import errno import fcntl
--- a/mercurial/scmutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/scmutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import binascii import errno
--- a/mercurial/scmwindows.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/scmwindows.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import winreg # pytype: disable=import-error
--- a/mercurial/server.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/server.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os
--- a/mercurial/setdiscovery.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/setdiscovery.py Mon Sep 16 15:36:44 2024 +0200 @@ -40,6 +40,7 @@ classified with it (since all ancestors or descendants will be marked as well). """ +from __future__ import annotations import collections import random
--- a/mercurial/shelve.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/shelve.py Mon Sep 16 15:36:44 2024 +0200 @@ -21,6 +21,8 @@ shelve". """ +from __future__ import annotations + import collections import io import itertools
--- a/mercurial/similar.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/similar.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from .i18n import _ from . import (
--- a/mercurial/simplemerge.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/simplemerge.py Mon Sep 16 15:36:44 2024 +0200 @@ -16,6 +16,7 @@ # mbp: "you know that thing where cvs gives you conflict markers?" # s: "i hate that." +from __future__ import annotations from .i18n import _ from . import (
--- a/mercurial/smartset.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/smartset.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from . import ( encoding,
--- a/mercurial/sparse.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/sparse.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os
--- a/mercurial/sshpeer.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/sshpeer.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import re import uuid
--- a/mercurial/sslutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/sslutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import hashlib import os
--- a/mercurial/stack.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/stack.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + def getstack(repo, rev=None): """return a sorted smartrev of the stack containing either rev if it is
--- a/mercurial/state.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/state.py Mon Sep 16 15:36:44 2024 +0200 @@ -17,6 +17,7 @@ the data. """ +from __future__ import annotations import contextlib
--- a/mercurial/statichttprepo.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/statichttprepo.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import errno
--- a/mercurial/statprof.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/statprof.py Mon Sep 16 15:36:44 2024 +0200 @@ -101,6 +101,7 @@ main thread's work patterns. """ # no-check-code +from __future__ import annotations import collections import contextlib
--- a/mercurial/store.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/store.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import collections import functools import os
--- a/mercurial/streamclone.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/streamclone.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import contextlib import os
--- a/mercurial/strip.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/strip.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + from .i18n import _ from . import ( bookmarks as bookmarksmod,
--- a/mercurial/subrepo.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/subrepo.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import copy import errno
--- a/mercurial/subrepoutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/subrepoutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os import posixpath
--- a/mercurial/tagmerge.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/tagmerge.py Mon Sep 16 15:36:44 2024 +0200 @@ -71,6 +71,7 @@ # - put blocks whose nodes come all from p2 first # - write the tag blocks in the sorted order +from __future__ import annotations from .i18n import _ from . import (
--- a/mercurial/tags.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/tags.py Mon Sep 16 15:36:44 2024 +0200 @@ -10,6 +10,7 @@ # Eventually, it could take care of updating (adding/removing/moving) # tags too. +from __future__ import annotations import binascii import io
--- a/mercurial/templatefilters.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/templatefilters.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os import re
--- a/mercurial/templatefuncs.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/templatefuncs.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import binascii import re
--- a/mercurial/templatekw.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/templatekw.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from .i18n import _ from .node import (
--- a/mercurial/templater.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/templater.py Mon Sep 16 15:36:44 2024 +0200 @@ -65,6 +65,7 @@ operation. """ +from __future__ import annotations import abc import os
--- a/mercurial/templateutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/templateutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import abc import types
--- a/mercurial/testing/__init__.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/testing/__init__.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import time
--- a/mercurial/testing/revlog.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/testing/revlog.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import unittest # picked from test-parse-index2, copied rather than imported
--- a/mercurial/testing/storage.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/testing/storage.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import unittest
--- a/mercurial/transaction.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/transaction.py Mon Sep 16 15:36:44 2024 +0200 @@ -11,6 +11,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import errno import os
--- a/mercurial/treediscovery.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/treediscovery.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import collections
--- a/mercurial/txnutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/txnutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from . import encoding
--- a/mercurial/ui.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/ui.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import collections import contextlib
--- a/mercurial/unionrepo.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/unionrepo.py Mon Sep 16 15:36:44 2024 +0200 @@ -11,6 +11,8 @@ allowing operations like diff and log with revsets. """ +from __future__ import annotations + import contextlib
--- a/mercurial/upgrade.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/upgrade.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations from .i18n import _ from . import (
--- a/mercurial/upgrade_utils/actions.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/upgrade_utils/actions.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import random from typing import (
--- a/mercurial/upgrade_utils/engine.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/upgrade_utils/engine.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import stat
--- a/mercurial/url.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/url.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import base64 import socket
--- a/mercurial/urllibcompat.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/urllibcompat.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import http.server import urllib.error import urllib.parse
--- a/mercurial/util.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/util.py Mon Sep 16 15:36:44 2024 +0200 @@ -13,6 +13,7 @@ hide platform-specific details from the core. """ +from __future__ import annotations import abc import collections
--- a/mercurial/utils/cborutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/utils/cborutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import struct
--- a/mercurial/utils/compression.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/utils/compression.py Mon Sep 16 15:36:44 2024 +0200 @@ -3,6 +3,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import bz2 import collections
--- a/mercurial/utils/dateutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/utils/dateutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import calendar import datetime
--- a/mercurial/utils/hashutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/utils/hashutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -1,3 +1,5 @@ +from __future__ import annotations + import hashlib try:
--- a/mercurial/utils/procutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/utils/procutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import contextlib import errno
--- a/mercurial/utils/repoviewutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/utils/repoviewutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -6,6 +6,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + from .. import error ### Nearest subset relation
--- a/mercurial/utils/resourceutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/utils/resourceutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os import sys
--- a/mercurial/utils/storageutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/utils/storageutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import re import struct
--- a/mercurial/utils/stringutil.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/utils/stringutil.py Mon Sep 16 15:36:44 2024 +0200 @@ -7,6 +7,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import ast import codecs
--- a/mercurial/verify.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/verify.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os
--- a/mercurial/vfs.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/vfs.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,8 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations + import contextlib import os import shutil
--- a/mercurial/win32.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/win32.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import ctypes import ctypes.wintypes as wintypes
--- a/mercurial/windows.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/windows.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import errno import getpass
--- a/mercurial/wireprotoframing.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/wireprotoframing.py Mon Sep 16 15:36:44 2024 +0200 @@ -9,6 +9,7 @@ # protocol. For details about the protocol, see # `hg help internals.wireprotocol`. +from __future__ import annotations import collections import struct
--- a/mercurial/wireprotoserver.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/wireprotoserver.py Mon Sep 16 15:36:44 2024 +0200 @@ -4,6 +4,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import contextlib import struct
--- a/mercurial/wireprototypes.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/wireprototypes.py Mon Sep 16 15:36:44 2024 +0200 @@ -3,6 +3,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import typing
--- a/mercurial/wireprotov1peer.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/wireprotov1peer.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import sys import weakref
--- a/mercurial/wireprotov1server.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/wireprotov1server.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import binascii import os
--- a/mercurial/worker.py Mon Sep 16 15:36:38 2024 +0200 +++ b/mercurial/worker.py Mon Sep 16 15:36:44 2024 +0200 @@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import annotations import os import pickle