swh.loader.mercurial 3.6.2__tar.gz → 3.6.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/.copier-answers.yml +1 -1
  2. swh_loader_mercurial-3.6.3/.copyright-updater.yaml +3 -0
  3. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/.pre-commit-config.yaml +16 -4
  4. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/PKG-INFO +4 -4
  5. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/requirements-test.txt +1 -1
  6. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/requirements.txt +1 -1
  7. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/directory.py +1 -1
  8. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/hgutil.py +7 -4
  9. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/test_directory.py +2 -2
  10. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh.loader.mercurial.egg-info/PKG-INFO +4 -4
  11. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh.loader.mercurial.egg-info/SOURCES.txt +1 -0
  12. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh.loader.mercurial.egg-info/requires.txt +3 -3
  13. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/tox.ini +4 -4
  14. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/.git-blame-ignore-revs +0 -0
  15. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/.gitignore +0 -0
  16. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/AUTHORS +0 -0
  17. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/CODE_OF_CONDUCT.md +0 -0
  18. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/CONTRIBUTORS +0 -0
  19. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/LICENSE +0 -0
  20. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/Makefile +0 -0
  21. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/README.rst +0 -0
  22. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/conftest.py +0 -0
  23. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/docs/.gitignore +0 -0
  24. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/docs/Makefile +0 -0
  25. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/docs/_static/.placeholder +0 -0
  26. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/docs/_templates/.placeholder +0 -0
  27. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/docs/conf.py +0 -0
  28. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/docs/index.rst +0 -0
  29. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/pyproject.toml +0 -0
  30. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/requirements-swh.txt +0 -0
  31. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/setup.cfg +0 -0
  32. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/__init__.py +0 -0
  33. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/archive_extract.py +0 -0
  34. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/converters.py +0 -0
  35. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/identify.py +0 -0
  36. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/loader.py +0 -0
  37. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/py.typed +0 -0
  38. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tasks.py +0 -0
  39. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/__init__.py +0 -0
  40. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/conftest.py +0 -0
  41. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/anomad-d.tgz +0 -0
  42. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/build.py +0 -0
  43. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/example.json +0 -0
  44. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/example.sh +0 -0
  45. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/example.tgz +0 -0
  46. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/hello.json +0 -0
  47. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/hello.tgz +0 -0
  48. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/missing-filelog.sh +0 -0
  49. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/missing-filelog.tgz +0 -0
  50. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/multiple-heads.json +0 -0
  51. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/multiple-heads.sh +0 -0
  52. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/multiple-heads.tgz +0 -0
  53. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/the-sandbox.json +0 -0
  54. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/the-sandbox.tgz +0 -0
  55. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/transplant.json +0 -0
  56. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/data/transplant.tgz +0 -0
  57. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/loader_checker.py +0 -0
  58. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/test_converters.py +0 -0
  59. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/test_identify.py +0 -0
  60. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/test_loader.py +0 -0
  61. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/test_tasks.py +0 -0
  62. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/tests/test_tasks_directory.py +0 -0
  63. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh/loader/mercurial/utils.py +0 -0
  64. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh.loader.mercurial.egg-info/dependency_links.txt +0 -0
  65. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh.loader.mercurial.egg-info/entry_points.txt +0 -0
  66. {swh_loader_mercurial-3.6.2 → swh_loader_mercurial-3.6.3}/swh.loader.mercurial.egg-info/top_level.txt +0 -0
@@ -1,5 +1,5 @@
1
1
  # Changes here will be overwritten by Copier
2
- _commit: v0.3.4
2
+ _commit: v0.3.5
3
3
  _src_path: https://gitlab.softwareheritage.org/swh/devel/swh-py-template.git
4
4
  description: Software Heritage Mercurial Loader
5
5
  distribution_name: swh-loader-mercurial
@@ -0,0 +1,3 @@
1
+ pattern: Copyright (C) {years} The Software Heritage developers
2
+
3
+ ignore_commits_before: 2026-01-24
@@ -1,23 +1,23 @@
1
1
  repos:
2
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v5.0.0
3
+ rev: v6.0.0
4
4
  hooks:
5
5
  - id: trailing-whitespace
6
6
  - id: check-json
7
7
  - id: check-yaml
8
8
 
9
9
  - repo: https://github.com/python/black
10
- rev: 25.1.0
10
+ rev: 25.9.0
11
11
  hooks:
12
12
  - id: black
13
13
 
14
14
  - repo: https://github.com/PyCQA/isort
15
- rev: 6.0.0
15
+ rev: 6.1.0
16
16
  hooks:
17
17
  - id: isort
18
18
 
19
19
  - repo: https://github.com/pycqa/flake8
20
- rev: 7.1.1
20
+ rev: 7.3.0
21
21
  hooks:
22
22
  - id: flake8
23
23
  additional_dependencies: [flake8-bugbear==24.12.12, flake8-pyproject]
@@ -51,3 +51,15 @@ repos:
51
51
  stages: [pre-push]
52
52
  language: python
53
53
  additional_dependencies: [twine, build]
54
+
55
+ - repo: https://github.com/nanoufo/copyright-hook
56
+ rev: v1.1.0
57
+ hooks:
58
+ - id: update-copyright
59
+ args: [--required]
60
+ files: ^.*\.py$
61
+ exclude: >
62
+ (?x)^(
63
+ .*__init__.py|
64
+ docs/conf.py
65
+ )$
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: swh.loader.mercurial
3
- Version: 3.6.2
3
+ Version: 3.6.3
4
4
  Summary: Software Heritage Mercurial Loader
5
5
  Author-email: Software Heritage developers <swh-devel@inria.fr>
6
6
  Project-URL: Homepage, https://gitlab.softwareheritage.org/swh/devel/swh-loader-mercurial
@@ -21,7 +21,7 @@ Requires-Dist: click
21
21
  Requires-Dist: patool
22
22
  Requires-Dist: python-dateutil
23
23
  Requires-Dist: python-hglib
24
- Requires-Dist: mercurial
24
+ Requires-Dist: mercurial>=7.2
25
25
  Requires-Dist: swh.model>=6.13.0
26
26
  Requires-Dist: swh.storage>=2.4.1
27
27
  Requires-Dist: swh.scheduler>=0.0.39
@@ -31,7 +31,7 @@ Requires-Dist: click; extra == "testing"
31
31
  Requires-Dist: patool; extra == "testing"
32
32
  Requires-Dist: python-dateutil; extra == "testing"
33
33
  Requires-Dist: python-hglib; extra == "testing"
34
- Requires-Dist: mercurial; extra == "testing"
34
+ Requires-Dist: mercurial>=7.2; extra == "testing"
35
35
  Requires-Dist: swh.model>=6.13.0; extra == "testing"
36
36
  Requires-Dist: swh.storage>=2.4.1; extra == "testing"
37
37
  Requires-Dist: swh.scheduler>=0.0.39; extra == "testing"
@@ -39,7 +39,7 @@ Requires-Dist: swh.loader.core>=5.24.0; extra == "testing"
39
39
  Requires-Dist: celery-types; extra == "testing"
40
40
  Requires-Dist: pytest; extra == "testing"
41
41
  Requires-Dist: pytest-mock; extra == "testing"
42
- Requires-Dist: swh.core[http]>=4.5.0; extra == "testing"
42
+ Requires-Dist: swh.core[http]>=4.5.3; extra == "testing"
43
43
  Requires-Dist: swh.loader.core[testing]>=5.24.0; extra == "testing"
44
44
  Requires-Dist: swh.scheduler[pytest]>=3.1.0; extra == "testing"
45
45
  Requires-Dist: swh.storage[pytest]>=3.1.0; extra == "testing"
@@ -1,7 +1,7 @@
1
1
  celery-types
2
2
  pytest
3
3
  pytest-mock
4
- swh.core[http] >= 4.5.0
4
+ swh.core[http] >= 4.5.3
5
5
  swh.loader.core[testing] >= 5.24.0
6
6
  swh.scheduler[pytest] >= 3.1.0
7
7
  swh.storage[pytest] >= 3.1.0
@@ -5,4 +5,4 @@ click
5
5
  patool
6
6
  python-dateutil
7
7
  python-hglib
8
- mercurial
8
+ mercurial >= 7.2
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2023 The Software Heritage developers
1
+ # Copyright (C) 2023 The Software Heritage developers
2
2
  # See the AUTHORS file at the top-level directory of this distribution
3
3
  # License: GNU General Public License version 3, or any later version
4
4
  # See top-level LICENSE file for more information
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2020-2023 The Software Heritage developers
1
+ # Copyright (C) 2020-2026 The Software Heritage developers
2
2
  # See the AUTHORS file at the top-level directory of this distribution
3
3
  # License: GNU General Public License version 3, or any later version
4
4
  # See top-level LICENSE file for more information
@@ -9,11 +9,13 @@ from functools import partial
9
9
  from typing import Dict, List, Mapping, NewType, Optional, Set
10
10
 
11
11
  # The internal Mercurial API is not guaranteed to be stable.
12
- from mercurial import bookmarks, context, error, hg, smartset, util
12
+ from mercurial import bookmarks, context, error, hg, initialization, smartset, util
13
13
  import mercurial.ui
14
14
 
15
15
  from swh.loader.core.utils import clone_with_timeout
16
16
 
17
+ initialization.init()
18
+
17
19
  NULLID = mercurial.node.nullid
18
20
  HgNodeId = NewType("HgNodeId", bytes)
19
21
  Repository = hg.localrepo
@@ -57,10 +59,11 @@ def branching_info(repo: hg.localrepo, ignored: Set[int]) -> BranchingInfo:
57
59
  branch_closed_heads = defaultdict(list)
58
60
  all_bookmarks = bookmarks.listbookmarks(repo)
59
61
 
60
- for branch_name, heads in repo.branchmap().items():
62
+ branchmap = repo.branchmap()
63
+ for branch_name in branchmap:
61
64
  # Sort the heads by node id since it's stable and doesn't depend on local
62
65
  # topology like cloning order.
63
- for head in sorted(heads):
66
+ for head in sorted(branchmap.branchheads(branch_name, closed=True)):
64
67
  head = repo[head]
65
68
  if head.rev() in ignored:
66
69
  # This revision or one of its ancestors is corrupted, ignore it
@@ -8,7 +8,7 @@ from pathlib import Path
8
8
 
9
9
  import pytest
10
10
 
11
- from swh.core.nar import Nar
11
+ from swh.core.nar import Nar, NarHashAlgo
12
12
  from swh.loader.exception import NotFound
13
13
  from swh.loader.mercurial.directory import HgCheckoutLoader, clone_repository
14
14
  from swh.loader.mercurial.hgutil import repository
@@ -22,7 +22,7 @@ from swh.model.hashutil import hash_to_bytes
22
22
 
23
23
 
24
24
  def compute_nar_hash_for_ref(
25
- repo_url: str, ref: str, hash_name: str = "sha256", temp_dir: str = "/tmp"
25
+ repo_url: str, ref: str, hash_name: NarHashAlgo = "sha256", temp_dir: str = "/tmp"
26
26
  ) -> str:
27
27
  """Compute the nar from a hg checked out by hg."""
28
28
  tmp_path = Path(os.path.join(temp_dir, "compute-nar"))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: swh.loader.mercurial
3
- Version: 3.6.2
3
+ Version: 3.6.3
4
4
  Summary: Software Heritage Mercurial Loader
5
5
  Author-email: Software Heritage developers <swh-devel@inria.fr>
6
6
  Project-URL: Homepage, https://gitlab.softwareheritage.org/swh/devel/swh-loader-mercurial
@@ -21,7 +21,7 @@ Requires-Dist: click
21
21
  Requires-Dist: patool
22
22
  Requires-Dist: python-dateutil
23
23
  Requires-Dist: python-hglib
24
- Requires-Dist: mercurial
24
+ Requires-Dist: mercurial>=7.2
25
25
  Requires-Dist: swh.model>=6.13.0
26
26
  Requires-Dist: swh.storage>=2.4.1
27
27
  Requires-Dist: swh.scheduler>=0.0.39
@@ -31,7 +31,7 @@ Requires-Dist: click; extra == "testing"
31
31
  Requires-Dist: patool; extra == "testing"
32
32
  Requires-Dist: python-dateutil; extra == "testing"
33
33
  Requires-Dist: python-hglib; extra == "testing"
34
- Requires-Dist: mercurial; extra == "testing"
34
+ Requires-Dist: mercurial>=7.2; extra == "testing"
35
35
  Requires-Dist: swh.model>=6.13.0; extra == "testing"
36
36
  Requires-Dist: swh.storage>=2.4.1; extra == "testing"
37
37
  Requires-Dist: swh.scheduler>=0.0.39; extra == "testing"
@@ -39,7 +39,7 @@ Requires-Dist: swh.loader.core>=5.24.0; extra == "testing"
39
39
  Requires-Dist: celery-types; extra == "testing"
40
40
  Requires-Dist: pytest; extra == "testing"
41
41
  Requires-Dist: pytest-mock; extra == "testing"
42
- Requires-Dist: swh.core[http]>=4.5.0; extra == "testing"
42
+ Requires-Dist: swh.core[http]>=4.5.3; extra == "testing"
43
43
  Requires-Dist: swh.loader.core[testing]>=5.24.0; extra == "testing"
44
44
  Requires-Dist: swh.scheduler[pytest]>=3.1.0; extra == "testing"
45
45
  Requires-Dist: swh.storage[pytest]>=3.1.0; extra == "testing"
@@ -1,4 +1,5 @@
1
1
  .copier-answers.yml
2
+ .copyright-updater.yaml
2
3
  .git-blame-ignore-revs
3
4
  .gitignore
4
5
  .pre-commit-config.yaml
@@ -2,7 +2,7 @@ click
2
2
  patool
3
3
  python-dateutil
4
4
  python-hglib
5
- mercurial
5
+ mercurial>=7.2
6
6
  swh.model>=6.13.0
7
7
  swh.storage>=2.4.1
8
8
  swh.scheduler>=0.0.39
@@ -13,7 +13,7 @@ click
13
13
  patool
14
14
  python-dateutil
15
15
  python-hglib
16
- mercurial
16
+ mercurial>=7.2
17
17
  swh.model>=6.13.0
18
18
  swh.storage>=2.4.1
19
19
  swh.scheduler>=0.0.39
@@ -21,7 +21,7 @@ swh.loader.core>=5.24.0
21
21
  celery-types
22
22
  pytest
23
23
  pytest-mock
24
- swh.core[http]>=4.5.0
24
+ swh.core[http]>=4.5.3
25
25
  swh.loader.core[testing]>=5.24.0
26
26
  swh.scheduler[pytest]>=3.1.0
27
27
  swh.storage[pytest]>=3.1.0
@@ -24,17 +24,17 @@ commands =
24
24
  [testenv:black]
25
25
  skip_install = true
26
26
  deps =
27
- black==25.1.0
27
+ black==25.9.0
28
28
  commands =
29
29
  {envpython} -m black --check swh
30
30
 
31
31
  [testenv:flake8]
32
32
  skip_install = true
33
33
  deps =
34
- flake8==7.1.1
34
+ flake8==7.3.0
35
35
  flake8-bugbear==24.12.12
36
36
  flake8-pyproject==1.2.3
37
- pycodestyle==2.12.1
37
+ pycodestyle==2.14.0
38
38
 
39
39
  commands =
40
40
  {envpython} -m flake8
@@ -43,7 +43,7 @@ commands =
43
43
  extras =
44
44
  testing
45
45
  deps =
46
- mypy==1.15.0
46
+ mypy==1.18.2
47
47
  commands =
48
48
  mypy swh
49
49