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FNh/ec6C3DzLWqWdmnWA/siV3nUR1bXHfTui95azxJfYvWoXH2R2yam+YhE256B4rDDYWS1LI9kNNM+A33xcPS2HxVowkByhjB5FPKR6I90dX42BYJpTS5s/VPx63wXLznjFWuD7XJ3P0VI7D72j/+6EQCmHaAUEE5bO00Ob2JxmzJlaP+02fYc814PAONE2/ocfR0aExAVS3VA+SJGXnXTVpoaHr7NJKC2sBLFsdnhIRwtCf3rtGEvIJ5v2U2xx0ZEz/mimtGzW5ovkthobV4mojk0DRz7xBtA96pOGSRTD8QndIsdMCUipo8zZ/AGAMByCtsQOX7OYhR6gp+I6+iPh8fTR5oCbkO7cizDDQtXcrR5OT/BDH9xkAF1ghNL8o23a09/wfZ9NPg5zrh/4T/dFfoe2COlkAJJ1ttDPYyQkCfMsoWm3OXk6xJ3ExVbwkZzUDQSzsxGS+oxbFDWJZ64Q=
04f1dba53c961dfdb875c8469adc96fa999cfbed 6.3.0
0000000000000000000000000000000000000000 6.3.0
c890d8b8bc59b18e5febf60caada629df5356ee2 6.3.1
+59466b13a3ae0e29a5d4f485393e516cfbb057d0 6.3.2
all: build doc
local:
- $(PYTHON) setup.py $(PURE) \
+ MERCURIAL_SETUP_MAKE_LOCAL=1 $(PYTHON) setup.py $(PURE) \
build_py -c -d . \
build_ext $(COMPILERFLAG) -i \
build_hgexe $(COMPILERFLAG) -i \
variables:
RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
PYTHON: python3
+ CI_CLEVER_CLOUD_FLAVOR: S
rust-cargo-test:
<<: *all
- make rust-tests
variables:
PYTHON: python3
+ CI_CLEVER_CLOUD_FLAVOR: S
test-c:
<<: *runtests
revision = breezy.revision
revisionspec = breezy.revisionspec
revisionspec.RevisionSpec
+
+ try:
+ # brz 3.3.0 (revno: 7614.2.2)
+ from breezy.transport import NoSuchFile
+ except ImportError:
+ from breezy.errors import NoSuchFile
except ImportError:
pass
try:
kind = revtree.kind(name)
- except breezy.errors.NoSuchFile:
+ except NoSuchFile:
return None, None
if kind not in supportedkinds:
# the file is not available anymore - was deleted
if root.startswith(b":pserver:"):
root = root[9:]
- m = re.match(r'(?:(.*?)(?::(.*?))?@)?([^:/]*)(?::(\d*))?(.*)', root)
+ m = re.match(
+ br'(?:(.*?)(?::(.*?))?@)?([^:/]*)(?::(\d*))?(.*)', root
+ )
if m:
conntype = b"pserver"
user, passw, serv, port, root = m.groups()
if sck.recv(128) != b"I LOVE YOU\n":
raise error.Abort(_(b"CVS pserver authentication failed"))
- self.writep = self.readp = sck.makefile(b'r+')
+ self.writep = self.readp = sck.makefile('rwb')
if not conntype and root.startswith(b":local:"):
conntype = b"local"
files = set()
if len(changesets) % 100 == 0:
- t = b'%d %s' % (len(changesets), repr(e.comment)[1:-1])
+ t = b'%d %s' % (
+ len(changesets),
+ pycompat.byterepr(e.comment)[2:-1],
+ )
ui.status(stringutil.ellipsis(t, 80) + b'\n')
c.entries.append(e)
def getcommit(self, rev):
elt = self.changes[rev]
dateformat = b'%a %b %d %H:%M:%S %Z %Y'
- date = dateutil.strdate(elt.get('local_date'), dateformat)
+ date = dateutil.strdate(self.recode(elt.get('local_date')), dateformat)
desc = elt.findtext('name') + '\n' + elt.findtext('comment', '')
# etree can return unicode objects for name, comment, and author,
# so recode() is used to ensure str objects are emitted.
command = fixer.command(ui, path, ranges)
if command is None:
continue
+ msg = b'fixing: %s - %s - %s\n'
+ msg %= (fixctx, fixername, path)
+ ui.debug(msg)
ui.debug(b'subprocess: %s\n' % (command,))
proc = subprocess.Popen(
procutil.tonativestr(command),
@action(
[b'_multifold'],
_(
- """fold subclass used for when multiple folds happen in a row
+ b"""fold subclass used for when multiple folds happen in a row
We only want to fire the editor for the folded message once when
(say) four changes are folded down into a single change. This is
if refresh:
try:
wlock = repo.wlock()
- fcounts = map(
+ fcounts = pycompat.maplist(
len,
sparse.refreshwdir(
repo, repo.status(), sparse.matcher(repo), force=force
try:
repo = localrepo.instance(ui, repopath, create=False)
tempparent = None
+ except error.RequirementError:
+ raise # no fallback if the backing repo is unsupported
except error.RepoError:
tempparent = pycompat.mkdtemp()
try:
)
node = logcmdutil.revsingle(repo, rev_).node()
+ if node is None:
+ raise error.InputError(_(b"cannot tag working directory"))
+
if not message:
# we don't translate commit messages
message = b'Added tag %s for changeset %s' % (
"""return a filename to backup a data-file or None"""
if not self._use_dirstate_v2:
return None
+ if self._map.docket.uuid is None:
+ # not created yet, nothing to backup
+ return None
data_filename = self._map.docket.data_filename()
return data_filename, self.data_backup_filename(backupname)
# this "invalidate()" prevents "wlock.release()" from writing
# changes of dirstate out after restoring from backup file
self.invalidate()
- filename = self._actualfilename(tr)
o = self._opener
+ if not o.exists(backupname):
+ # there was no file backup, delete existing files
+ filename = self._actualfilename(tr)
+ data_file = None
+ if self._use_dirstate_v2 and self._map.docket.uuid is not None:
+ data_file = self._map.docket.data_filename()
+ if o.exists(filename):
+ o.unlink(filename)
+ if data_file is not None and o.exists(data_file):
+ o.unlink(data_file)
+ return
+ filename = self._actualfilename(tr)
data_pair = self.backup_data_file(backupname)
- if util.samefile(o.join(backupname), o.join(filename)):
+ if o.exists(filename) and util.samefile(
+ o.join(backupname), o.join(filename)
+ ):
o.unlink(backupname)
else:
o.rename(backupname, filename, checkambig=True)
def clearbackup(self, tr, backupname):
'''Clear backup file'''
o = self._opener
- data_backup = self.backup_data_file(backupname)
- o.unlink(backupname)
-
- if data_backup is not None:
- o.unlink(data_backup[0])
+ if o.exists(backupname):
+ data_backup = self.backup_data_file(backupname)
+ o.unlink(backupname)
+ if data_backup is not None:
+ o.unlink(data_backup[0])
def verify(self, m1, m2):
"""check the dirstate content again the parent manifest and yield errors"""
new_docket = docketmod.DirstateDocket.with_new_uuid(
self.parents(), len(packed), meta
)
+ if old_docket.uuid == new_docket.uuid:
+ raise error.ProgrammingError(b'dirstate docket name collision')
data_filename = new_docket.data_filename()
self._opener.write(data_filename, packed)
# Write the new docket after the new data file has been
env['SERVER_PROTOCOL'] = self.request_version
env['wsgi.version'] = (1, 0)
env['wsgi.url_scheme'] = pycompat.sysstr(self.url_scheme)
- if env.get('HTTP_EXPECT', b'').lower() == b'100-continue':
+ if env.get('HTTP_EXPECT', '').lower() == '100-continue':
self.rfile = common.continuereader(self.rfile, self.wfile.write)
env['wsgi.input'] = self.rfile
import functools
import random
import re
-import sys
from .i18n import _
from .pycompat import getattr
return subset & s.filter(filter, condrepr=b'<roots>')
-MAXINT = sys.maxsize
+MAXINT = (1 << 31) - 1
MININT = -MAXINT - 1
)
try:
int(lbl)
+ if b'_' in lbl:
+ # If label contains underscores, Python might consider it an
+ # integer (with "_" as visual separators), but we do not.
+ # See PEP 515 - Underscores in Numeric Literals.
+ raise ValueError
raise error.InputError(_(b"cannot use an integer as a name"))
except ValueError:
pass
from importlib import resources # pytype: disable=import-error
# Force loading of the resources module
- resources.open_binary # pytype: disable=module-attr
+ if pycompat.safehasattr(resources, 'files'):
+ resources.files # pytype: disable=module-attr
+ else:
+ resources.open_binary # pytype: disable=module-attr
# py2exe raises an AssertionError if uses importlib.resources
if getattr(sys, "frozen", None) in ("console_exe", "windows_exe"):
from .. import encoding
def open_resource(package, name):
- return resources.open_binary( # pytype: disable=module-attr
- pycompat.sysstr(package), pycompat.sysstr(name)
- )
+ if pycompat.safehasattr(resources, 'files'):
+ return (
+ resources.files( # pytype: disable=module-attr
+ pycompat.sysstr(package)
+ )
+ .joinpath(pycompat.sysstr(name))
+ .open('rb')
+ )
+ else:
+ return resources.open_binary( # pytype: disable=module-attr
+ pycompat.sysstr(package), pycompat.sysstr(name)
+ )
def is_resource(package, name):
return resources.is_resource( # pytype: disable=module-attr
+= Mercurial 6.3.2 =
+
+ * [ecfc84b956a8] tests: expect the message from 1baf0fffd82f in test-hghave.t (issue6762)
+ * [5c095119bff4] tests: add the missing space to test-hghave.t (issue6762)
+ * [2c346c1c75ec] tests: use an all too familiar executable in test-run-tests.t (issue6661)
+ * [13c0e3b4fd35] tests: use `test -f` instead of `ls` to see if a file is present (issue6662)
+ * [8ced4ca30ea1] bisect: correct message about aborting an in-progress bisect (issue6527)
+ * filemerge: fix crash when using filesets in [partial-merge-tools]
+ * help: fix a py3 error interpolating Set into b'%s'
+ * match: make the FLAG_RE pattern a raw string
+ * python-compat: adapt to Python 3.11 BC breakage with `random.sample`
+ * rust-status: fix thread count ceiling
+ * hg: show the correct message when cloning an LFS repo with extension disabled
+ * extensions: process disabled external paths when `hgext` package is in-memory
+ * emitrevision: consider ancestors revision to emit as available base
+ * make: add a target for building pyoxidizer tests on macOS
+ * run-tests: support --pyoxidized on macOS
+ * packaging: add dependencies to the PyOxidizer build on macOS
+ * Miscellaneous test fixes
+
= Mercurial 6.3.1 =
* memory-usage: fix `hg log --follow --rev R F` space complexity (dcb2581e33be)
[[package]]
name = "crossbeam-deque"
-version = "0.8.0"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9"
+checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-epoch",
[[package]]
name = "rayon"
-version = "1.5.1"
+version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90"
+checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7"
dependencies = [
- "autocfg",
- "crossbeam-deque",
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
-version = "1.9.1"
+version = "1.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e"
+checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b"
dependencies = [
"crossbeam-channel",
"crossbeam-deque",
"crossbeam-utils",
- "lazy_static",
"num_cpus",
]
rand = "0.8.4"
rand_pcg = "0.3.1"
rand_distr = "0.4.3"
-rayon = "1.5.1"
+rayon = "1.6.1"
regex = "1.5.5"
sha-1 = "0.10.0"
twox-hash = "1.6.2"
}
for prefix in VALID_PREFIXES.iter() {
if pattern.starts_with(prefix.as_bytes()) {
- break;
+ return Ok(());
}
- return Err(SparseConfigError::InvalidNarrowPrefix(
- pattern.to_owned(),
- ));
}
+ return Err(SparseConfigError::InvalidNarrowPrefix(
+ pattern.to_owned(),
+ ));
}
Ok(())
}
format-bytes = "0.3.0"
users = "0.11.0"
which = "4.2.5"
-rayon = "1.5.1"
+rayon = "1.6.1"
return s.decode('latin-1')
+def eprint(*args, **kwargs):
+ kwargs['file'] = sys.stderr
+ print(*args, **kwargs)
+
+
import ssl
# ssl.HAS_TLSv1* are preferred to check support but they were added in Python
cmd = self.cmd + args
returncode, out, err = runcmd(cmd, self.env)
err = filterhgerr(err)
- if err or returncode != 0:
+ if err:
print("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr)
print(err, file=sys.stderr)
+ if returncode != 0:
return b''
return out
if retcode == 0 and not filterhgerr(err):
return hgcommand(hgcmd, hgenv)
- raise SystemExit(
- 'Unable to find a working hg binary to extract the '
- 'version from the repository tags'
- )
+ eprint("/!\\")
+ eprint(r"/!\ Unable to find a working hg binary")
+ eprint(r"/!\ Version cannot be extract from the repository")
+ eprint(r"/!\ Re-run the setup once a first version is built")
+ return None
def localhgenv():
version = ''
-if os.path.isdir('.hg'):
+
+def _try_get_version():
hg = findhg()
+ if hg is None:
+ return ''
+ hgid = None
+ numerictags = []
cmd = ['log', '-r', '.', '--template', '{tags}\n']
- numerictags = [t for t in sysstr(hg.run(cmd)).split() if t[0:1].isdigit()]
+ pieces = sysstr(hg.run(cmd)).split()
+ numerictags = [t for t in pieces if t[0:1].isdigit()]
hgid = sysstr(hg.run(['id', '-i'])).strip()
if not hgid:
- # Bail out if hg is having problems interacting with this repository,
- # rather than falling through and producing a bogus version number.
- # Continuing with an invalid version number will break extensions
- # that define minimumhgversion.
- raise SystemExit('Unable to determine hg version from local repository')
+ eprint("/!\\")
+ eprint(r"/!\ Unable to determine hg version from local repository")
+ eprint(r"/!\ Failed to retrieve current revision tags")
+ return ''
if numerictags: # tag(s) found
version = numerictags[-1]
if hgid.endswith('+'): # propagate the dirty status to the tag
version += '+'
- else: # no tag found
+ else: # no tag found on the checked out revision
ltagcmd = ['parents', '--template', '{latesttag}']
ltag = sysstr(hg.run(ltagcmd))
+ if not ltag:
+ eprint("/!\\")
+ eprint(r"/!\ Unable to determine hg version from local repository")
+ eprint(
+ r"/!\ Failed to retrieve current revision distance to lated tag"
+ )
+ return ''
changessincecmd = ['log', '-T', 'x\n', '-r', "only(.,'%s')" % ltag]
changessince = len(hg.run(changessincecmd).splitlines())
version = '%s+hg%s.%s' % (ltag, changessince, hgid)
if version.endswith('+'):
version = version[:-1] + 'local' + time.strftime('%Y%m%d')
+ return version
+
+
+if os.path.isdir('.hg'):
+ version = _try_get_version()
elif os.path.exists('.hg_archival.txt'):
kw = dict(
[[t.strip() for t in l.split(':', 1)] for l in open('.hg_archival.txt')]
with open('mercurial/__version__.py') as f:
data = f.read()
version = re.search('version = b"(.*)"', data).group(1)
-
-if version:
- versionb = version
- if not isinstance(versionb, bytes):
- versionb = versionb.encode('ascii')
-
- write_if_changed(
- 'mercurial/__version__.py',
- b''.join(
- [
- b'# this file is autogenerated by setup.py\n'
- b'version = b"%s"\n' % versionb,
- ]
- ),
- )
+if not version:
+ if os.environ.get("MERCURIAL_SETUP_MAKE_LOCAL") == "1":
+ version = "0.0+0"
+ eprint("/!\\")
+ eprint(r"/!\ Using '0.0+0' as the default version")
+ eprint(r"/!\ Re-run make local once that first version is built")
+ eprint("/!\\")
+ else:
+ eprint("/!\\")
+ eprint(r"/!\ Could not determine the Mercurial version")
+ eprint(r"/!\ You need to build a local version first")
+ eprint(r"/!\ Run `make local` and try again")
+ eprint("/!\\")
+ msg = "Run `make local` first to get a working local version"
+ raise SystemExit(msg)
+
+versionb = version
+if not isinstance(versionb, bytes):
+ versionb = versionb.encode('ascii')
+
+write_if_changed(
+ 'mercurial/__version__.py',
+ b''.join(
+ [
+ b'# this file is autogenerated by setup.py\n'
+ b'version = b"%s"\n' % versionb,
+ ]
+ ),
+)
class hgbuild(build):
elif not line.startswith(' '):
state = 'none'
+ elif not line.replace('^', '').replace('~', '').strip():
+ # PEP 657: Fine-grained error locations in tracebacks
+ # ~~~~~~^^^^^^^^^
+ continue
+
elif state == 'file':
# Ignore lines after " File "
state = 'tb'
"pyoxidizer-in-memory",
"running with pyoxidizer build as 'hg' with embedded resources",
)
-def has_pyoxidizer():
+def has_pyoxidizer_mem():
return 'PYOXIDIZED_IN_MEMORY_RSRC' in os.environ
"pyoxidizer-in-filesystem",
"running with pyoxidizer build as 'hg' with external resources",
)
-def has_pyoxidizer():
+def has_pyoxidizer_fs():
return 'PYOXIDIZED_FILESYSTEM_RSRC' in os.environ
return False
-@check("pygments25", "Pygments version >= 2.5")
-def pygments25():
+def getpygmentsversion():
try:
import pygments
v = pygments.__version__
- except ImportError:
- return False
-
- parts = v.split(".")
- major = int(parts[0])
- minor = int(parts[1])
-
- return (major, minor) >= (2, 5)
-
-@check("pygments211", "Pygments version >= 2.11")
-def pygments211():
- try:
- import pygments
-
- v = pygments.__version__
+ parts = v.split(".")
+ return (int(parts[0]), int(parts[1]))
except ImportError:
- return False
+ return (0, 0)
- parts = v.split(".")
- major = int(parts[0])
- minor = int(parts[1])
- return (major, minor) >= (2, 11)
+@checkvers("pygments", "Pygments version >= %s", (2.5, 2.11, 2.14))
+def has_pygments_range(v):
+ major, minor = v.split('.')[0:2]
+ return getpygmentsversion() >= (int(major), int(minor))
@check("outer-repo", "outer repo")
(use 'hg update' to switch to it)
[10]
+underscores in numeric branch names (issue6737)
+
+ $ hg branch 2700_210
+ marked working directory as branch 2700_210
+
verify update will accept invalid legacy branch names
$ hg init test-invalid-branch-name
> -X tests/test-check-format.t \
> -X tests/test-check-module-imports.t \
> -X tests/test-check-pyflakes.t \
- > -X tests/test-check-shbang.t
+ > -X tests/test-check-shbang.t \
+ > -X tests/test-highlight.t
[1]
The above exclusions are because they're looking for files that
repository cache
----------------
- $ rm log/server.log*
$ cp $HGRCPATH.unconfigured $HGRCPATH
$ cat <<'EOF' >> $HGRCPATH
> [cmdserver]
- > log = $TESTTMP/log/server.log
+ > log = $TESTTMP/log/server-cached.log
> max-repo-cache = 1
> track-log = command, repocache
> EOF
check server log:
- $ cat log/server.log | filterlog
- YYYY/MM/DD HH:MM:SS (PID)> worker process exited (pid=...)
- YYYY/MM/DD HH:MM:SS (PID)> worker process exited (pid=...) (?)
+ $ cat log/server-cached.log | filterlog
YYYY/MM/DD HH:MM:SS (PID)> init cached
YYYY/MM/DD HH:MM:SS (PID)> id -R cached
YYYY/MM/DD HH:MM:SS (PID)> loaded repo into cache: $TESTTMP/cached (in ...s)
# Don't import pycompat because it has too many side-effects.
ispy3 = sys.version_info[0] >= 3
+ispy311 = (sys.version_info.major, sys.version_info.minor) >= (3, 11)
# Only run if demandimport is allowed
if subprocess.call(
from mercurial import error as errorproxy
if ispy3:
- # unsure why this isn't lazy.
- assert not isinstance(f, _LazyModule)
+ assert isinstance(errorproxy, _LazyModule)
assert f(errorproxy) == "<module 'mercurial.error' from '?'>", f(errorproxy)
else:
assert f(errorproxy) == "<unloaded module 'error'>", f(errorproxy)
if ispy3:
assert not isinstance(os, _LazyModule)
- assert f(os) == "<module 'os' from '?'>", f(os)
+ if ispy311:
+ assert f(os) == "<module 'os' (frozen)>", f(os)
+ else:
+ assert f(os) == "<module 'os' from '?'>", f(os)
else:
assert f(os) == "<unloaded module 'os'>", f(os)
assert f(os.system) == '<built-in function system>', f(os.system)
-assert f(os) == "<module 'os' from '?'>", f(os)
+if ispy311:
+ assert f(os) == "<module 'os' (frozen)>", f(os)
+else:
+ assert f(os) == "<module 'os' from '?'>", f(os)
assert 'mercurial.utils.procutil' not in sys.modules
from mercurial.utils import procutil
uisetup(ui)
File "$TESTTMP/baduisetup.py", line 2, in uisetup
1 / 0
+ ~~^~~ (py311 !)
ZeroDivisionError: * by zero (glob)
*** failed to set up extension baduisetup: * by zero (glob)
Mercurial Distributed SCM (version *) (glob)
$ hg commit -Aqm "foo"
$ printf "Foo\nbar\nBaz\n" > foo.changed
$ hg --debug fix --working-dir
+ fixing: f65cf3136d41+ - uppercase-changed-lines - foo.changed
subprocess: * $TESTTMP/uppercase.py 1-1 3-3 (glob)
$ cd ..
<span id="l7"><span class="kn">import</span> <span class="nn">itertools</span></span><a href="#l7"></a>
<span id="l8"></span><a href="#l8"></a>
<span id="l9"><span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></span><a href="#l9"></a>
- <span id="l10"> <span class="sd">"""Generate all primes."""</span></span><a href="#l10"></a>
+ <span id="l10"><span class="w"> </span><span class="sd">"""Generate all primes."""</span></span><a href="#l10"></a> (pygments214 !)
+ <span id="l10"> <span class="sd">"""Generate all primes."""</span></span><a href="#l10"></a> (no-pygments214 !)
<span id="l11"> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></span><a href="#l11"></a>
<span id="l12"> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></span><a href="#l12"></a>
<span id="l13"> <span class="c"># It is important to yield *here* in order to stop the</span></span><a href="#l13"></a>
<a href="/rev/687f2d169546">changeset</a>
</div>
</td>
- <td class="source followlines-btn-parent"><a href="#l10"> 10</a> <span class="sd">"""Generate all primes."""</span></td>
+ <td class="source followlines-btn-parent"><a href="#l10"> 10</a> <span class="w"> </span><span class="sd">"""Generate all primes."""</span></td> (pygments214 !)
+ <td class="source followlines-btn-parent"><a href="#l10"> 10</a> <span class="sd">"""Generate all primes."""</span></td> (no-pygments214 !)
</tr>
<tr id="l11" class="thisrev">
<td class="annotate parity0">
> EOF
$ cat > unknownfile << EOF
- > #!$PYTHON
+ > #!/this/helps/pygments/detect/python
> def foo():
> pass
> EOF
$LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob)
$LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob)
$LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob)
+ $LOCALIP - - [$ERRDATE$] HG error: ^^^^^^^^^^^^^^^^^ (glob) (py311 !)
$LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8")) (glob)
$LOCALIP - - [$ERRDATE$] HG error: *Error: [Errno *] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob)
$LOCALIP - - [$ERRDATE$] HG error: (glob)
$LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob)
$LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob)
$LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob)
+ $LOCALIP - - [$ERRDATE$] HG error: ^^^^^^^^^^^^^^^^^ (glob) (py311 !)
$LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8")) (glob)
$LOCALIP - - [$ERRDATE$] HG error: *Error: [Errno *] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob)
$LOCALIP - - [$ERRDATE$] HG error: (glob)
self.do_hgweb()
for chunk in self.server.application(env, self._start_response):
for r in self._runwsgi(req, res, repo):
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (py311 !)
handled = wireprotoserver.handlewsgirequest( (py38 !)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (py311 !)
return _processbasictransfer( (py38 !)
+ ^^^^^^^^^^^^^^^^^^^^^^ (py311 !)
rctx, req, res, self.check_perm (no-py38 !)
rctx.repo, req, res, lambda perm: checkperm(rctx, req, perm) (no-py38 !)
res.setbodybytes(localstore.read(oid))
+ ^^^^^^^^^^^^^^^^^^^^ (py311 !)
blob = self._read(self.vfs, oid, verify)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (py311 !)
raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8"))
*Error: [Errno *] 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d: I/O error (glob)
$LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob)
$LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob)
$LOCALIP - - [$ERRDATE$] HG error: res.setbodybytes(localstore.read(oid)) (glob)
+ $LOCALIP - - [$ERRDATE$] HG error: ^^^^^^^^^^^^^^^^^^^^ (glob) (py311 !)
$LOCALIP - - [$ERRDATE$] HG error: blob = self._read(self.vfs, oid, verify) (glob)
+ $LOCALIP - - [$ERRDATE$] HG error: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (glob) (py311 !)
$LOCALIP - - [$ERRDATE$] HG error: blobstore._verify(oid, b'dummy content') (glob)
$LOCALIP - - [$ERRDATE$] HG error: raise LfsCorruptionError( (glob) (py38 !)
$LOCALIP - - [$ERRDATE$] HG error: hint=_(b'run hg verify'), (glob) (no-py38 !)
(narrow patterns must begin with one of the following: path:, rootfilesin:)
[255]
+rootfilesin: patterns work
+
+ $ hg clone --narrow ssh://user@dummy/master rootfilesin --noupdate --include 'rootfilesin:dir'
+ requesting all changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 0 changes to 0 files
+ new changesets 26ce255d5b5d
+ $ hg tracked -R rootfilesin
+ I rootfilesin:dir
+
narrow clone a file, f10
$ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/f10"
n 644 2 * z (glob)
$ echo xxxx > x
$ echo yyyy > y
+# run status early to avoid a flaky second fetch during commit.
+ $ hg st
+ M x
+ M y
+ \d+ files fetched over \d+ fetches .* (re) (?)
$ hg commit -m x
created new head
2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
new changesets fed61014d323
(run 'hg heads' to see heads, 'hg merge' to merge)
+# run status early to avoid a flaky second fetch during commit
+ $ hg status
+ \d+ files fetched over \d+ fetches .* (re) (?)
$ hg rebase -d tip
rebasing 1:9abfe7bca547 "a"
saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/9abfe7bca547-8b11e5ff-rebase.hg (glob)
abort: required features are not supported in the destination: featuresetup-test
[255]
+Bundlerepo also enforces the underlying repo requirements
+
+ $ hg --cwd supported bundle --all ../bundle.hg
+ 1 changesets found
+ $ echo outdoor-pool > push-dst/.hg/requires
+ $ hg --cwd push-dst log -R ../bundle.hg -T phases
+ abort: repository requires features unknown to this Mercurial: outdoor-pool
+ (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
+ [255]
+
$ cd ..
$ hg log --rev 'sort(all(), "-random")' | wc -l
\s*8 (re)
$ hg log --rev 'sort(all(), "random", random.seed=celeste)'
+ 0 b12 m111 u112 111 10800
+ 4 b111 m112 u111 110 14400
+ 2 b111 m11 u12 111 3600
6 b111 t2 tu 130 0
+ 1 b11 m12 u111 112 7200
7 b111 t3 tu 130 0
- 4 b111 m112 u111 110 14400
- 3 b112 m111 u11 120 0
5 b111 t1 tu 130 0
- 0 b12 m111 u112 111 10800
- 1 b11 m12 u111 112 7200
- 2 b111 m11 u12 111 3600
+ 3 b112 m111 u11 120 0
$ hg log --rev 'first(sort(all(), "random", random.seed=celeste))'
- 6 b111 t2 tu 130 0
+ 0 b12 m111 u112 111 10800
topographical sorting can't be combined with other sort keys, and you can't
abort: cannot tag null revision
[10]
+ $ hg tag -R empty -r "wdir()" -f wdirtag
+ abort: cannot tag working directory
+ [10]
+
issue5539: pruned tags do not appear in .hgtags
$ cat >> $HGRCPATH << EOF