Show More
@@ -204,11 +204,11 b' i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n' | |||||
204 | # Packaging targets |
|
204 | # Packaging targets | |
205 |
|
205 | |||
206 | packaging_targets := \ |
|
206 | packaging_targets := \ | |
207 |
|
|
207 | rhel7 \ | |
208 |
|
|
208 | rhel8 \ | |
209 | deb \ |
|
209 | deb \ | |
210 |
docker- |
|
210 | docker-rhel7 \ | |
211 |
docker- |
|
211 | docker-rhel8 \ | |
212 | docker-debian-bullseye \ |
|
212 | docker-debian-bullseye \ | |
213 | docker-debian-buster \ |
|
213 | docker-debian-buster \ | |
214 | docker-debian-stretch \ |
|
214 | docker-debian-stretch \ |
@@ -13,20 +13,20 b' UBUNTU_CODENAMES := \\' | |||||
13 |
|
13 | |||
14 | FEDORA_RELEASE := 31 |
|
14 | FEDORA_RELEASE := 31 | |
15 |
|
15 | |||
16 |
|
|
16 | RHEL_RELEASES := \ | |
17 | 7 \ |
|
17 | 7 \ | |
18 | 8 |
|
18 | 8 | |
19 |
|
19 | |||
20 |
# Build a Python for these |
|
20 | # Build a Python for these RHEL (and derivatives) releases. | |
21 |
|
|
21 | RHEL_WITH_PYTHON_RELEASES := | |
22 |
|
|
22 | RHEL_WITH_NONVERSIONED_PYTHON := | |
23 |
|
|
23 | RHEL_WITH_36_DOCUTILS := 7 | |
24 |
|
24 | |||
25 | help: |
|
25 | help: | |
26 | @echo 'Packaging Make Targets' |
|
26 | @echo 'Packaging Make Targets' | |
27 | @echo '' |
|
27 | @echo '' | |
28 |
@echo 'docker- |
|
28 | @echo 'docker-rhel{$(strip $(RHEL_RELEASES))}' | |
29 |
@echo ' Build an RPM for a specific |
|
29 | @echo ' Build an RPM for a specific RHEL/derivative version using Docker.' | |
30 | @echo '' |
|
30 | @echo '' | |
31 | @echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}' |
|
31 | @echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}' | |
32 | @echo ' Build Debian packages specific to a Debian distro using Docker.' |
|
32 | @echo ' Build Debian packages specific to a Debian distro using Docker.' | |
@@ -53,8 +53,8 b' help:' | |||||
53 | @echo 'ppa' |
|
53 | @echo 'ppa' | |
54 | @echo ' Build a Debian source package locally targeting the current system' |
|
54 | @echo ' Build a Debian source package locally targeting the current system' | |
55 | @echo '' |
|
55 | @echo '' | |
56 |
@echo ' |
|
56 | @echo 'rhel{$(strip $(RHEL_RELEASES))}' | |
57 |
@echo ' Build an RPM for a specific |
|
57 | @echo ' Build an RPM for a specific RHEL/derivative version locally' | |
58 | @echo '' |
|
58 | @echo '' | |
59 | @echo 'fedora' |
|
59 | @echo 'fedora' | |
60 | @echo ' Build an RPM for Fedora $(FEDORA_RELEASE) locally' |
|
60 | @echo ' Build an RPM for Fedora $(FEDORA_RELEASE) locally' | |
@@ -106,22 +106,22 b' fedora:' | |||||
106 | docker-fedora: |
|
106 | docker-fedora: | |
107 | ./dockerrpm fedora$(FEDORA_RELEASE) |
|
107 | ./dockerrpm fedora$(FEDORA_RELEASE) | |
108 |
|
108 | |||
109 |
# |
|
109 | # RHEL targets. | |
110 |
define |
|
110 | define rhel_targets | |
111 |
.PHONY: |
|
111 | .PHONY: rhel$(1) | |
112 |
|
|
112 | rhel$(1): | |
113 |
mkdir -p $$(HGROOT)/packages/ |
|
113 | mkdir -p $$(HGROOT)/packages/rhel$(1) | |
114 |
./buildrpm $$(if $$(filter $(1),$$( |
|
114 | ./buildrpm $$(if $$(filter $(1),$$(RHEL_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(RHEL_WITH_NONVERSIONED_PYTHON)),--python python,))$$(if $$(filter $(1),$$(RHEL_WITH_36_DOCUTILS)), --docutilspackage python36-docutils,) | |
115 |
cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $$(HGROOT)/packages/ |
|
115 | cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $$(HGROOT)/packages/rhel$(1) | |
116 |
cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/ |
|
116 | cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/rhel$(1) | |
117 |
|
117 | |||
118 |
.PHONY: docker- |
|
118 | .PHONY: docker-rhel$(1) | |
119 |
docker- |
|
119 | docker-rhel$(1): | |
120 |
./dockerrpm |
|
120 | ./dockerrpm rhel$(1) $$(if $$(filter $(1),$$(RHEL_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(RHEL_WITH_NONVERSIONED_PYTHON)),--python python,))$$(if $$(filter $(1),$$(RHEL_WITH_36_DOCUTILS)), --docutilspackage python36-docutils,) | |
121 |
|
121 | |||
122 | endef |
|
122 | endef | |
123 |
|
123 | |||
124 |
$(foreach release,$( |
|
124 | $(foreach release,$(RHEL_RELEASES),$(eval $(call rhel_targets,$(release)))) | |
125 |
|
125 | |||
126 | .PHONY: linux-wheels |
|
126 | .PHONY: linux-wheels | |
127 | linux-wheels: linux-wheels-x86_64 linux-wheels-i686 |
|
127 | linux-wheels: linux-wheels-x86_64 linux-wheels-i686 |
@@ -3,7 +3,7 b' Upstream-Name: mercurial' | |||||
3 | Source: https://www.mercurial-scm.org/ |
|
3 | Source: https://www.mercurial-scm.org/ | |
4 |
|
4 | |||
5 | Files: * |
|
5 | Files: * | |
6 |
Copyright: 2005-202 |
|
6 | Copyright: 2005-2022, Olivia Mackall <olivia@selenic.com> and others. | |
7 | License: GPL-2+ |
|
7 | License: GPL-2+ | |
8 | This program is free software; you can redistribute it |
|
8 | This program is free software; you can redistribute it | |
9 | and/or modify it under the terms of the GNU General Public |
|
9 | and/or modify it under the terms of the GNU General Public |
1 | NO CONTENT: file renamed from contrib/packaging/docker/centos7 to contrib/packaging/docker/rhel7 |
|
NO CONTENT: file renamed from contrib/packaging/docker/centos7 to contrib/packaging/docker/rhel7 |
@@ -1,4 +1,4 b'' | |||||
1 | FROM centos:centos8 |
|
1 | FROM rockylinux/rockylinux:8 | |
2 |
|
2 | |||
3 | RUN groupadd -g %GID% build && \ |
|
3 | RUN groupadd -g %GID% build && \ | |
4 | useradd -u %UID% -g %GID% -s /bin/bash -d /build -m build |
|
4 | useradd -u %UID% -g %GID% -s /bin/bash -d /build -m build |
@@ -6,7 +6,7 b'' | |||||
6 | #endif |
|
6 | #endif | |
7 |
|
7 | |||
8 | [Setup] |
|
8 | [Setup] | |
9 |
AppCopyright=Copyright 2005-202 |
|
9 | AppCopyright=Copyright 2005-2022 Olivia Mackall and others | |
10 | AppName=Mercurial |
|
10 | AppName=Mercurial | |
11 | AppVersion={#VERSION} |
|
11 | AppVersion={#VERSION} | |
12 | OutputBaseFilename=Mercurial-{#VERSION}{#SUFFIX} |
|
12 | OutputBaseFilename=Mercurial-{#VERSION}{#SUFFIX} | |
@@ -29,7 +29,7 b' AppContact=mercurial@mercurial-scm.org' | |||||
29 | DefaultDirName={pf}\Mercurial |
|
29 | DefaultDirName={pf}\Mercurial | |
30 | SourceDir=stage |
|
30 | SourceDir=stage | |
31 | VersionInfoDescription=Mercurial distributed SCM (version {#VERSION}) |
|
31 | VersionInfoDescription=Mercurial distributed SCM (version {#VERSION}) | |
32 |
VersionInfoCopyright=Copyright 2005-202 |
|
32 | VersionInfoCopyright=Copyright 2005-2022 Olivia Mackall and others | |
33 | VersionInfoCompany=Olivia Mackall and others |
|
33 | VersionInfoCompany=Olivia Mackall and others | |
34 | VersionInfoVersion={#QUAD_VERSION} |
|
34 | VersionInfoVersion={#QUAD_VERSION} | |
35 | InternalCompressLevel=max |
|
35 | InternalCompressLevel=max |
@@ -140,7 +140,7 b' editor = whatever' | |||||
140 | </p> |
|
140 | </p> | |
141 |
|
141 | |||
142 | <p> |
|
142 | <p> | |
143 |
Mercurial is Copyright 2005-202 |
|
143 | Mercurial is Copyright 2005-2022 Olivia Mackall and others. | |
144 | </p> |
|
144 | </p> | |
145 |
|
145 | |||
146 | <p> |
|
146 | <p> |
@@ -7906,7 +7906,7 b' def version_(ui, **opts):' | |||||
7906 | ) |
|
7906 | ) | |
7907 | license = _( |
|
7907 | license = _( | |
7908 | b"(see https://mercurial-scm.org for more information)\n" |
|
7908 | b"(see https://mercurial-scm.org for more information)\n" | |
7909 |
b"\nCopyright (C) 2005-202 |
|
7909 | b"\nCopyright (C) 2005-2022 Olivia Mackall and others\n" | |
7910 | b"This is free software; see the source for copying conditions. " |
|
7910 | b"This is free software; see the source for copying conditions. " | |
7911 | b"There is NO\nwarranty; " |
|
7911 | b"There is NO\nwarranty; " | |
7912 | b"not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" |
|
7912 | b"not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" |
@@ -303,17 +303,17 b' def pack_dirstate(map, copy_map):' | |||||
303 | # Determine if the next entry is in the same sub-tree, if so don't |
|
303 | # Determine if the next entry is in the same sub-tree, if so don't | |
304 | # pack yet |
|
304 | # pack yet | |
305 | next_path = sorted_map[index][0] |
|
305 | next_path = sorted_map[index][0] | |
306 |
should_pack = not |
|
306 | should_pack = not is_ancestor(next_path, current_folder) | |
307 | if should_pack: |
|
307 | if should_pack: | |
308 | pack_directory_children(current_node, copy_map, data, stack) |
|
308 | pack_directory_children(current_node, copy_map, data, stack) | |
309 | while stack and current_node.path != b"": |
|
309 | while stack and current_node.path != b"": | |
310 | # Go up the tree and write until we reach the folder of the next |
|
310 | # Go up the tree and write until we reach the folder of the next | |
311 | # entry (if any, otherwise the root) |
|
311 | # entry (if any, otherwise the root) | |
312 | parent = current_node.parent |
|
312 | parent = current_node.parent | |
313 |
in_ |
|
313 | in_ancestor_of_next_path = next_path is not None and ( | |
314 |
|
|
314 | is_ancestor(next_path, get_folder(stack[-1].path)) | |
315 | ) |
|
315 | ) | |
316 |
if parent is None or in_ |
|
316 | if parent is None or in_ancestor_of_next_path: | |
317 | break |
|
317 | break | |
318 | pack_directory_children(parent, copy_map, data, stack) |
|
318 | pack_directory_children(parent, copy_map, data, stack) | |
319 | current_node = parent |
|
319 | current_node = parent | |
@@ -344,13 +344,34 b' def get_folder(path):' | |||||
344 | return path.rsplit(b'/', 1)[0] if b'/' in path else b'' |
|
344 | return path.rsplit(b'/', 1)[0] if b'/' in path else b'' | |
345 |
|
345 | |||
346 |
|
346 | |||
|
347 | def is_ancestor(path, maybe_ancestor): | |||
|
348 | """Returns whether `maybe_ancestor` is an ancestor of `path`. | |||
|
349 | ||||
|
350 | >>> is_ancestor(b"a", b"") | |||
|
351 | True | |||
|
352 | >>> is_ancestor(b"a/b/c", b"a/b/c") | |||
|
353 | False | |||
|
354 | >>> is_ancestor(b"hgext3rd/__init__.py", b"hgext") | |||
|
355 | False | |||
|
356 | >>> is_ancestor(b"hgext3rd/__init__.py", b"hgext3rd") | |||
|
357 | True | |||
|
358 | """ | |||
|
359 | if maybe_ancestor == b"": | |||
|
360 | return True | |||
|
361 | if path <= maybe_ancestor: | |||
|
362 | return False | |||
|
363 | path_components = path.split(b"/") | |||
|
364 | ancestor_components = maybe_ancestor.split(b"/") | |||
|
365 | return all(c == o for c, o in zip(path_components, ancestor_components)) | |||
|
366 | ||||
|
367 | ||||
347 | def move_to_correct_node_in_tree(target_folder, current_node, stack): |
|
368 | def move_to_correct_node_in_tree(target_folder, current_node, stack): | |
348 | """ |
|
369 | """ | |
349 | Move inside the dirstate node tree to the node corresponding to |
|
370 | Move inside the dirstate node tree to the node corresponding to | |
350 | `target_folder`, creating the missing nodes along the way if needed. |
|
371 | `target_folder`, creating the missing nodes along the way if needed. | |
351 | """ |
|
372 | """ | |
352 | while target_folder != current_node.path: |
|
373 | while target_folder != current_node.path: | |
353 |
if target_folder |
|
374 | if is_ancestor(target_folder, current_node.path): | |
354 | # We need to go down a folder |
|
375 | # We need to go down a folder | |
355 | prefix = target_folder[len(current_node.path) :].lstrip(b'/') |
|
376 | prefix = target_folder[len(current_node.path) :].lstrip(b'/') | |
356 | subfolder_name = prefix.split(b'/', 1)[0] |
|
377 | subfolder_name = prefix.split(b'/', 1)[0] |
@@ -112,7 +112,7 b' Mailing list: https://www.mercurial-scm.' | |||||
112 |
|
112 | |||
113 | Copying |
|
113 | Copying | |
114 | """"""" |
|
114 | """"""" | |
115 |
Copyright (C) 2005-202 |
|
115 | Copyright (C) 2005-2022 Olivia Mackall. | |
116 | Free use of this software is granted under the terms of the GNU General |
|
116 | Free use of this software is granted under the terms of the GNU General | |
117 | Public License version 2 or any later version. |
|
117 | Public License version 2 or any later version. | |
118 |
|
118 |
@@ -26,7 +26,7 b' See Also' | |||||
26 | Copying |
|
26 | Copying | |
27 | ======= |
|
27 | ======= | |
28 | This manual page is copyright 2006 Vadim Gelfer. |
|
28 | This manual page is copyright 2006 Vadim Gelfer. | |
29 |
Mercurial is copyright 2005-202 |
|
29 | Mercurial is copyright 2005-2022 Olivia Mackall. | |
30 | Free use of this software is granted under the terms of the GNU General |
|
30 | Free use of this software is granted under the terms of the GNU General | |
31 | Public License version 2 or any later version. |
|
31 | Public License version 2 or any later version. | |
32 |
|
32 |
@@ -34,7 +34,7 b' See Also' | |||||
34 | Copying |
|
34 | Copying | |
35 | ======= |
|
35 | ======= | |
36 | This manual page is copyright 2005 Bryan O'Sullivan. |
|
36 | This manual page is copyright 2005 Bryan O'Sullivan. | |
37 |
Mercurial is copyright 2005-202 |
|
37 | Mercurial is copyright 2005-2022 Olivia Mackall. | |
38 | Free use of this software is granted under the terms of the GNU General |
|
38 | Free use of this software is granted under the terms of the GNU General | |
39 | Public License version 2 or any later version. |
|
39 | Public License version 2 or any later version. | |
40 |
|
40 |
@@ -1,6 +1,6 b'' | |||||
1 | # utils.urlutil - code related to [paths] management |
|
1 | # utils.urlutil - code related to [paths] management | |
2 | # |
|
2 | # | |
3 |
# Copyright 2005-202 |
|
3 | # Copyright 2005-2022 Olivia Mackall <olivia@selenic.com> and others | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. |
@@ -1722,7 +1722,7 b' if py2exeloaded:' | |||||
1722 | extra['console'] = [ |
|
1722 | extra['console'] = [ | |
1723 | { |
|
1723 | { | |
1724 | 'script': 'hg', |
|
1724 | 'script': 'hg', | |
1725 |
'copyright': 'Copyright (C) 2005-202 |
|
1725 | 'copyright': 'Copyright (C) 2005-2022 Olivia Mackall and others', | |
1726 | 'product_version': version, |
|
1726 | 'product_version': version, | |
1727 | } |
|
1727 | } | |
1728 | ] |
|
1728 | ] |
@@ -1137,11 +1137,11 b' def has_pytype():' | |||||
1137 | return version and sv(_bytes2sys(version.group(0))) >= sv('2019.10.17') |
|
1137 | return version and sv(_bytes2sys(version.group(0))) >= sv('2019.10.17') | |
1138 |
|
1138 | |||
1139 |
|
1139 | |||
1140 |
@check("rustfmt", "rustfmt tool at version nightly-202 |
|
1140 | @check("rustfmt", "rustfmt tool at version nightly-2021-11-02") | |
1141 | def has_rustfmt(): |
|
1141 | def has_rustfmt(): | |
1142 | # We use Nightly's rustfmt due to current unstable config options. |
|
1142 | # We use Nightly's rustfmt due to current unstable config options. | |
1143 | return matchoutput( |
|
1143 | return matchoutput( | |
1144 |
'`rustup which --toolchain nightly-202 |
|
1144 | '`rustup which --toolchain nightly-2021-11-02 rustfmt` --version', | |
1145 | b'rustfmt', |
|
1145 | b'rustfmt', | |
1146 | ) |
|
1146 | ) | |
1147 |
|
1147 |
@@ -3,6 +3,8 b'' | |||||
3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
4 |
|
4 | |||
5 | $ cd "$TESTDIR"/.. |
|
5 | $ cd "$TESTDIR"/.. | |
|
6 | ||||
|
7 | Warning: Keep this in sync with hghave.py | |||
6 |
$ |
|
8 | $ RUSTFMT=$(rustup which --toolchain nightly-2021-11-02 rustfmt) | |
7 | $ for f in `testrepohg files 'glob:**/*.rs'` ; do |
|
9 | $ for f in `testrepohg files 'glob:**/*.rs'` ; do | |
8 | > $RUSTFMT --check --edition=2018 --unstable-features --color=never $f |
|
10 | > $RUSTFMT --check --edition=2018 --unstable-features --color=never $f |
@@ -103,3 +103,21 b' coherent (issue4353)' | |||||
103 | 1 |
|
103 | 1 | |
104 | $ hg status |
|
104 | $ hg status | |
105 | ? a |
|
105 | ? a | |
|
106 | ||||
|
107 | #if dirstate-v2 | |||
|
108 | Check that folders that are prefixes of others do not throw the packer into an | |||
|
109 | infinite loop. | |||
|
110 | ||||
|
111 | $ cd .. | |||
|
112 | $ hg init infinite-loop | |||
|
113 | $ cd infinite-loop | |||
|
114 | $ mkdir hgext3rd hgext | |||
|
115 | $ touch hgext3rd/__init__.py hgext/zeroconf.py | |||
|
116 | $ hg commit -Aqm0 | |||
|
117 | ||||
|
118 | $ hg st -c | |||
|
119 | C hgext/zeroconf.py | |||
|
120 | C hgext3rd/__init__.py | |||
|
121 | ||||
|
122 | $ cd .. | |||
|
123 | #endif |
@@ -132,6 +132,7 b' expected_mods_tested = set(' | |||||
132 | ('mercurial.cmdutil', '{}'), |
|
132 | ('mercurial.cmdutil', '{}'), | |
133 | ('mercurial.color', '{}'), |
|
133 | ('mercurial.color', '{}'), | |
134 | ('mercurial.dagparser', "{'optionflags': 4}"), |
|
134 | ('mercurial.dagparser', "{'optionflags': 4}"), | |
|
135 | ('mercurial.dirstateutils.v2', '{}'), | |||
135 | ('mercurial.encoding', '{}'), |
|
136 | ('mercurial.encoding', '{}'), | |
136 | ('mercurial.fancyopts', '{}'), |
|
137 | ('mercurial.fancyopts', '{}'), | |
137 | ('mercurial.formatter', '{}'), |
|
138 | ('mercurial.formatter', '{}'), |
General Comments 0
You need to be logged in to leave comments.
Login now