D9472: testing phabricator encoding
martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9472 AFFECTED FILES newfile CHANGE DETAILS diff --git a/newfile b/newfile new file mode 100644 --- /dev/null +++ b/newfile @@ -0,0 +1,16 @@ +[package] +name = "rhg" +version = "0.1.0" +authors = [ +"Antoine Cezar ", +"Raphaël Gomès ", +] +edition = "2018" + +[dependencies] +hg-core = { path = "../hg-core"} +clap = "2.33.1" +log = "0.4.11" +micro-timer = "0.3.1" +env_logger = "0.7.1" +format-bytes = "0.1.3" To: martinvonz, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9471: procutil: correctly convert to bytes when shell=False
durin42 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9471 AFFECTED FILES mercurial/utils/procutil.py CHANGE DETAILS diff --git a/mercurial/utils/procutil.py b/mercurial/utils/procutil.py --- a/mercurial/utils/procutil.py +++ b/mercurial/utils/procutil.py @@ -654,9 +654,13 @@ stdin.write(stdin_bytes) stdin.flush() stdin.seek(0) +if shell: +script = tonativestr(script) +else: +script = [tonativestr(s) for s in script] p = subprocess.Popen( -tonativestr(script), +script, shell=shell, env=tonativeenv(env), close_fds=True, To: durin42, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
mercurial@45987: 88 new changesets
88 new changesets in mercurial: https://www.mercurial-scm.org/repo/hg/rev/0aa118f18d4b changeset: 45900:0aa118f18d4b user:Sebastien Boisvert date:Tue Nov 17 21:30:50 2020 -0500 summary: log: add bookmark option to "hg log" https://www.mercurial-scm.org/repo/hg/rev/bb9085ba12e6 changeset: 45901:bb9085ba12e6 user:Pulkit Goyal date:Sun Nov 22 23:53:09 2020 +0530 summary: chg: fix test-check-clang-format.t failure https://www.mercurial-scm.org/repo/hg/rev/6da22a068281 changeset: 45902:6da22a068281 user:Martin von Zweigbergk date:Mon Nov 23 11:30:43 2020 -0800 summary: tests: update test-https.t's #no-defaultcacertsloaded block with new exit code https://www.mercurial-scm.org/repo/hg/rev/64faa55716f4 changeset: 45903:64faa55716f4 user:Martin von Zweigbergk date:Mon Nov 23 11:56:10 2020 -0800 summary: tests: make test-worker.t pass on py2 https://www.mercurial-scm.org/repo/hg/rev/e63daff6e8ed changeset: 45904:e63daff6e8ed user:Simon Sapin date:Mon Nov 23 11:58:52 2020 +0100 summary: hgignore: add VS Code config https://www.mercurial-scm.org/repo/hg/rev/e131dbf6ee15 changeset: 45905:e131dbf6ee15 user:Simon Sapin date:Mon Nov 23 12:20:19 2020 +0100 summary: bisect: use tuple literal instead of split on string literal https://www.mercurial-scm.org/repo/hg/rev/95c4cca641f6 changeset: 45906:95c4cca641f6 user:Martin von Zweigbergk date:Mon Nov 23 11:18:48 2020 -0800 summary: errors: remove trailing "!" from some error messages for consistency https://www.mercurial-scm.org/repo/hg/rev/50afeeeb7b79 changeset: 45907:50afeeeb7b79 user:Martin von Zweigbergk date:Mon Nov 23 12:31:53 2020 -0800 summary: errors: consistently don't use trailing "!" in "not found in manifest" message https://www.mercurial-scm.org/repo/hg/rev/122f0b59f5f0 changeset: 45908:122f0b59f5f0 user:Martin von Zweigbergk date:Mon Nov 23 12:42:57 2020 -0800 summary: errors: remove trailing "!" in messages about creating new heads on push https://www.mercurial-scm.org/repo/hg/rev/ca39c45014fa changeset: 45909:ca39c45014fa user:Martin von Zweigbergk date:Mon Nov 23 12:47:08 2020 -0800 summary: errors: remove trailing "!" in messages about bad top-level args https://www.mercurial-scm.org/repo/hg/rev/f0626acf007d changeset: 45910:f0626acf007d user:Martin von Zweigbergk date:Mon Nov 23 14:48:05 2020 -0800 summary: errors: drop trailing "!" for some errors about bookmarks https://www.mercurial-scm.org/repo/hg/rev/8939062597f0 changeset: 45911:8939062597f0 user:Martin von Zweigbergk date:Mon Nov 23 10:42:03 2020 -0800 summary: errors: raise InputError on bad repo arguments https://www.mercurial-scm.org/repo/hg/rev/35ab6e39f482 changeset: 45912:35ab6e39f482 user:Martin von Zweigbergk date:Mon Nov 23 12:27:22 2020 -0800 summary: errors: raise ConfigError on bad alias definition https://www.mercurial-scm.org/repo/hg/rev/9acbe30953e8 changeset: 45913:9acbe30953e8 user:Martin von Zweigbergk date:Tue Nov 17 16:32:03 2020 -0800 summary: errors: raise InputError on bad bookmark argument https://www.mercurial-scm.org/repo/hg/rev/be25b66f86ab changeset: 45914:be25b66f86ab user:Martin von Zweigbergk date:Mon Nov 23 16:05:03 2020 -0800 summary: errors: raise InputError when too few arguments given to alias https://www.mercurial-scm.org/repo/hg/rev/8f50dc096cf4 changeset: 45915:8f50dc096cf4 user:Martin von Zweigbergk date:Mon Nov 23 16:20:02 2020 -0800 summary: errors: introduce SecurityError and use it in a few places https://www.mercurial-scm.org/repo/hg/rev/fa87536d3d70 changeset: 45916:fa87536d3d70 user:Martin von Zweigbergk date:Mon Nov 23 16:48:13 2020 -0800 summary: errors: raise StateError when there are unresolves merge conflicts https://www.mercurial-scm.org/repo/hg/rev/721f765a34ac changeset: 45917:721f765a34ac user:Martin von Zweigbergk date:Mon Nov 23 23:08:58 2020 -0800 summary: errors: raise StateError on uncommitted changes when merge starts https://www.mercurial-scm.org/repo/hg/rev/ac565222b9f8 changeset: 45918:ac565222b9f8 user:Martin von Zweigbergk date:Mon Nov 23 10:39:51 2020 -0800 summary: errors: raise InputError on bad top-level flags https://www.mercurial-scm.org/repo/hg/rev/aba4f2c97e74 changeset: 45919:aba4f2c97e74 user:Pulkit Goyal <7895pul...@gmail.com> date:Fri Oct 16 19:03:09 2020 +0530 summary: scmutil: try-delete `.hg/store/requires` if store requirements are empty https://www.mercurial-scm.org/repo/hg/rev/1441f4d57083 changeset: 45920:1441f4d57083 user:Pulkit Goyal <7895pul...@gmail.com> date:Fri Nov 20 14:34:15 2020 +0530 summary: dispatch:
[Bug 6446] New: PyOxidized binary echos password to the terminal
https://bz.mercurial-scm.org/show_bug.cgi?id=6446 Bug ID: 6446 Summary: PyOxidized binary echos password to the terminal Product: Mercurial Version: default branch Hardware: PC OS: Windows Status: UNCONFIRMED Severity: bug Priority: wish Component: Mercurial Assignee: bugzi...@mercurial-scm.org Reporter: matt_harbi...@yahoo.com CC: mercurial-devel@mercurial-scm.org Python Version: --- Using d0dbd6a41074, there's a warning that the password may be echoed to the terminal (and then it is). I didn't try reinstalling the 5.6 release, and I only tried this on Windows. $ hg.exe in *** failed to import extension mercurial_keyring: No module named 'mercurial_keyring' http authorization required for https://... realm: SONIA :: SCM Manager user: mharbison password: getpass:100: GetPassWarning: Can not control echo on the terminal. Warning: Password input may be echoed. -- You are receiving this mail because: You are on the CC list for the bug. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9470: tests: set old git default branch name for compatibility
martinvonz created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Git's default branch name has changed on my machine (from "master" to "main"). Let's set the old name in our tests so we're compatible with both defaults (and maybe still compatible with Git versions that don't know about the config option). REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9470 AFFECTED FILES tests/test-git-interop.t CHANGE DETAILS diff --git a/tests/test-git-interop.t b/tests/test-git-interop.t --- a/tests/test-git-interop.t +++ b/tests/test-git-interop.t @@ -30,6 +30,7 @@ [255] $ git init Initialized empty Git repository in $TESTTMP/nogit/.git/ + $ git config --global init.defaultBranch master This status invocation shows some hg gunk because we didn't use `hg init --git`, which fixes up .git/info/exclude for us. $ hg status To: martinvonz, durin42, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH website] display needed flag option to send patch for the website
On Mon, Oct 26, 2020 at 7:28 PM Stephane Blondon wrote: > > # HG changeset patch > # User "Stephane" > # Date 1603720533 -3600 > # Mon Oct 26 14:55:33 2020 +0100 > # Node ID 142a23c5f0b222a833d9859e884dd10529437dd1 > # Parent ca9d6015a0f2c8365636da5511c58a747d45ae35 > display needed flag option to send patch for the website Pushed this, many thanks! ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 2 of 2] who: replace "Open Source Projects" with "projects"
On Mon, Oct 26, 2020 at 7:34 PM Stéphane Blondon wrote: > > > > Le jeu. 22 oct. 2020 à 12:19, Pulkit Goyal <7895pul...@gmail.com> a écrit : >> >> On Sat, Oct 17, 2020 at 5:51 PM Stéphane Blondon >> wrote: >> > >> > >> > >> > On 13/10/2020 09:22, Pulkit Goyal wrote: >> > > I have the access, pushed these patches. Seems like I missed then >> > > initially. Kindly use `--flag website` for website related patches. >> > >> > >> > What do you think about adding this option into >> >> Completely agree. > > > > I sent a patch to add such line on mercurial-scm.org/thepage. Apologies for long silence, I was on a break. That patch is pushed now. Thanks a lot! > > Regards, > Stéphane > > ___ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH] rust-format: pin the formatted to a specific nightly version
On Sun, Nov 29, 2020 at 6:18 PM Pierre-Yves David wrote: > > # HG changeset patch > # User Pierre-Yves David > # Date 1606138438 -3600 > # Mon Nov 23 14:33:58 2020 +0100 > # Node ID b5a33ddb633aa0caedba4b9cca01a476a949044e > # Parent f96059fa519ca27b6c9c925c254eb02ded23258c > # EXP-Topic rust-format > # Available At https://foss.heptapod.net/octobus/mercurial-devel/ > # hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r > b5a33ddb633a > rust-format: pin the formatted to a specific nightly version > > Version 1.50 change the way rust-format behave. We pin the version for now, we > can figure out something better later. Queued this, many thanks! ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9468: upgrade: add an explicite --filelogs arguments
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This make it possible to select no revlog for upgrade, which is useful for some upgrade target or in some specific cases. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9468 AFFECTED FILES mercurial/debugcommands.py mercurial/upgrade.py tests/test-completion.t CHANGE DETAILS diff --git a/tests/test-completion.t b/tests/test-completion.t --- a/tests/test-completion.t +++ b/tests/test-completion.t @@ -328,7 +328,7 @@ debuguigetpass: prompt debuguiprompt: prompt debugupdatecaches: - debugupgraderepo: optimize, run, backup, changelog, manifest + debugupgraderepo: optimize, run, backup, changelog, manifest, filelogs debugwalk: include, exclude debugwhyunstable: debugwireargs: three, four, five, ssh, remotecmd, insecure diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py --- a/mercurial/upgrade.py +++ b/mercurial/upgrade.py @@ -1146,6 +1146,7 @@ backup=True, manifest=None, changelog=None, +filelogs=None, ): """Upgrade a repository in place.""" if optimize is None: @@ -1156,7 +1157,8 @@ revlogs = set(UPGRADE_ALL_REVLOGS) specentries = ( (UPGRADE_CHANGELOG, changelog), -(UPGRADE_MANIFEST, manifest) +(UPGRADE_MANIFEST, manifest), +(UPGRADE_FILELOGS, filelogs), ) specified = [(y, x) for (y, x) in specentries if x is not None] if specified: diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -3838,6 +3838,7 @@ (b'', b'backup', True, _(b'keep the old repository content around')), (b'', b'changelog', None, _(b'select the changelog for upgrade')), (b'', b'manifest', None, _(b'select the manifest for upgrade')), +(b'', b'filelogs', None, _(b'select all filelogs for upgrade')), ], ) def debugupgraderepo(ui, repo, run=False, optimize=None, backup=True, **opts): @@ -3866,6 +3867,8 @@ * `--no-manifest`: optimize all revlog but the manifest * `--changelog`: optimize the changelog only * `--no-changelog --no-manifest`: optimize filelogs only + * `--filelogs`: optimize the filelogs only + * `--no-changelog --no-manifest --no-filelogs`: skip all filelog optimisation """ return upgrade.upgraderepo( ui, repo, run=run, optimize=optimize, backup=backup, **opts To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9469: upgrade: display the list of processed revlog before proceeding
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This help to make sure we don't wrongly skip some in the test and to make sure the user is aware of the amount of processing they is signing up for. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9469 AFFECTED FILES mercurial/upgrade.py tests/test-copies-chain-merge.t tests/test-lfs-serve.t tests/test-persistent-nodemap.t tests/test-share-safe.t tests/test-upgrade-repo.t CHANGE DETAILS diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t --- a/tests/test-upgrade-repo.t +++ b/tests/test-upgrade-repo.t @@ -169,6 +169,11 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + processed revlogs: +- all-filelogs +- changelog +- manifest + additional optimizations are available by specifying "--optimize ": re-delta-parent @@ -188,6 +193,11 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + processed revlogs: +- all-filelogs +- changelog +- manifest + --optimize can be used to add optimizations @@ -203,6 +213,11 @@ re-delta-parent deltas within internal storage will choose a new base revision if needed + processed revlogs: +- all-filelogs +- changelog +- manifest + additional optimizations are available by specifying "--optimize ": re-delta-multibase @@ -229,6 +244,11 @@ re-delta-parent deltas within internal storage will choose a new base revision if needed + processed revlogs: +- all-filelogs +- changelog +- manifest + additional optimizations are available by specifying "--optimize ": re-delta-multibase @@ -246,6 +266,11 @@ optimisations: re-delta-parent + processed revlogs: +- all-filelogs +- changelog +- manifest + unknown optimization: @@ -343,6 +368,11 @@ sparserevlog Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. + processed revlogs: +- all-filelogs +- changelog +- manifest + additional optimizations are available by specifying "--optimize ": re-delta-parent @@ -362,6 +392,11 @@ preserved: revlogv1, store added: dotencode, fncache, generaldelta, sparserevlog + processed revlogs: +- all-filelogs +- changelog +- manifest + $ hg --config format.dotencode=false debugupgraderepo repository lacks features recommended by current config options: @@ -396,6 +431,11 @@ sparserevlog Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. + processed revlogs: +- all-filelogs +- changelog +- manifest + additional optimizations are available by specifying "--optimize ": re-delta-parent @@ -422,6 +462,11 @@ requirements preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store + processed revlogs: +- all-filelogs +- changelog +- manifest + beginning upgrade... repository locked and read-only creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob) @@ -473,6 +518,11 @@ generaldelta repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster + processed revlogs: +- all-filelogs +- changelog +- manifest + beginning upgrade... repository locked and read-only creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) @@ -569,6 +619,11 @@ sparserevlog Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. + processed revlogs: +- all-filelogs +- changelog +- manifest + beginning upgrade... repository locked and read-only creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) @@ -608,6 +663,9 @@ re-delta-parent deltas within internal storage will choose a new base revision if needed + processed revlogs: +- manifest + beginning upgrade... repository locked and read-only creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) @@ -684,6 +742,10 @@ re-delta-parent deltas
D9467: upgrade: directly use the upgrade action constant
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This make the code simpler and will make it simpler to add more case in the future. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9467 AFFECTED FILES mercurial/upgrade.py CHANGE DETAILS diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py --- a/mercurial/upgrade.py +++ b/mercurial/upgrade.py @@ -1154,25 +1154,22 @@ repo = repo.unfiltered() revlogs = set(UPGRADE_ALL_REVLOGS) -specentries = ((b'c', changelog), (b'm', manifest)) +specentries = ( +(UPGRADE_CHANGELOG, changelog), +(UPGRADE_MANIFEST, manifest) +) specified = [(y, x) for (y, x) in specentries if x is not None] if specified: # we have some limitation on revlogs to be recloned if any(x for y, x in specified): revlogs = set() -for r, enabled in specified: +for upgrade, enabled in specified: if enabled: -if r == b'c': -revlogs.add(UPGRADE_CHANGELOG) -elif r == b'm': -revlogs.add(UPGRADE_MANIFEST) +revlogs.add(upgrade) else: # none are enabled -for r, __ in specified: -if r == b'c': -revlogs.discard(UPGRADE_CHANGELOG) -elif r == b'm': -revlogs.discard(UPGRADE_MANIFEST) +for upgrade, __ in specified: +revlogs.discard(upgrade) # Ensure the repository can be upgraded. missingreqs = requiredsourcerequirements(repo) - repo.requirements To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9466: upgrade: rename UPGRADE_FILELOG to UPGRADE_FILELOGS
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY They are multiple filelog to upgrade, so this seems more accurate. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9466 AFFECTED FILES mercurial/upgrade.py CHANGE DETAILS diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py --- a/mercurial/upgrade.py +++ b/mercurial/upgrade.py @@ -716,10 +716,10 @@ UPGRADE_CHANGELOG = object() UPGRADE_MANIFEST = object() -UPGRADE_FILELOG = object() +UPGRADE_FILELOGS = object() UPGRADE_ALL_REVLOGS = frozenset( -[UPGRADE_CHANGELOG, UPGRADE_MANIFEST, UPGRADE_FILELOG] +[UPGRADE_CHANGELOG, UPGRADE_MANIFEST, UPGRADE_FILELOGS] ) @@ -753,7 +753,7 @@ return UPGRADE_CHANGELOG in revlogfilter elif entry.endswith(b'00manifest.i'): return UPGRADE_MANIFEST in revlogfilter -return UPGRADE_FILELOG in revlogfilter +return UPGRADE_FILELOGS in revlogfilter def _clonerevlogs( To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9465: [POC] node: replace nullid and friends with nodeconstants class
joerg.sonnenberger created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: durin42. Herald added a reviewer: durin42. Herald added a reviewer: martinvonz. Herald added a reviewer: martinvonz. Herald added subscribers: mercurial-patches, Kwan. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The introduction of 256bit hashes require changes to nullid and other constant magic values. Start pushing them down from repository and revlog where sensible. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9465 AFFECTED FILES contrib/perf.py hgext/absorb.py hgext/convert/git.py hgext/convert/hg.py hgext/extdiff.py hgext/fastannotate/context.py hgext/fastannotate/formatter.py hgext/fix.py hgext/git/dirstate.py hgext/git/gitlog.py hgext/git/gitutil.py hgext/git/index.py hgext/gpg.py hgext/hgk.py hgext/histedit.py hgext/infinitepush/bundleparts.py hgext/infinitepush/store.py hgext/journal.py hgext/largefiles/basestore.py hgext/largefiles/lfcommands.py hgext/largefiles/lfutil.py hgext/lfs/__init__.py hgext/lfs/blobstore.py hgext/lfs/wrapper.py hgext/mq.py hgext/narrow/narrowbundle2.py hgext/narrow/narrowcommands.py hgext/patchbomb.py hgext/phabricator.py hgext/rebase.py hgext/releasenotes.py hgext/remotefilelog/__init__.py hgext/remotefilelog/basepack.py hgext/remotefilelog/contentstore.py hgext/remotefilelog/datapack.py hgext/remotefilelog/debugcommands.py hgext/remotefilelog/fileserverclient.py hgext/remotefilelog/historypack.py hgext/remotefilelog/metadatastore.py hgext/remotefilelog/remotefilectx.py hgext/remotefilelog/remotefilelog.py hgext/remotefilelog/remotefilelogserver.py hgext/remotefilelog/repack.py hgext/remotefilelog/shallowbundle.py hgext/remotefilelog/shallowrepo.py hgext/remotefilelog/shallowutil.py hgext/split.py hgext/sqlitestore.py hgext/transplant.py hgext/uncommit.py mercurial/bookmarks.py mercurial/branchmap.py mercurial/bundle2.py mercurial/bundlerepo.py mercurial/changegroup.py mercurial/changelog.py mercurial/chgserver.py mercurial/cmdutil.py mercurial/commands.py mercurial/commit.py mercurial/context.py mercurial/copies.py mercurial/debugcommands.py mercurial/dirstate.py mercurial/discovery.py mercurial/exchange.py mercurial/exchangev2.py mercurial/filelog.py mercurial/filemerge.py mercurial/hg.py mercurial/hgweb/webutil.py mercurial/interfaces/dirstate.py mercurial/interfaces/repository.py mercurial/localrepo.py mercurial/logcmdutil.py mercurial/manifest.py mercurial/merge.py mercurial/mergestate.py mercurial/metadata.py mercurial/node.py mercurial/obsolete.py mercurial/obsutil.py mercurial/phases.py mercurial/pure/parsers.py mercurial/revlog.py mercurial/revset.py mercurial/revsetlang.py mercurial/rewriteutil.py mercurial/scmutil.py mercurial/setdiscovery.py mercurial/shelve.py mercurial/simplemerge.py mercurial/sparse.py mercurial/sslutil.py mercurial/statichttprepo.py mercurial/store.py mercurial/strip.py mercurial/subrepo.py mercurial/tagmerge.py mercurial/tags.py mercurial/templatefilters.py mercurial/templatefuncs.py mercurial/templatekw.py mercurial/testing/storage.py mercurial/thirdparty/selectors2.py mercurial/treediscovery.py mercurial/unionrepo.py mercurial/upgrade.py mercurial/util.py mercurial/utils/storageutil.py mercurial/verify.py mercurial/wireprotov1server.py mercurial/wireprotov2server.py setup.py tests/drawdag.py tests/simplestorerepo.py tests/test-annotate.t tests/test-check-interfaces.py tests/test-commit.t tests/test-fastannotate-hg.t tests/test-filelog.py tests/test-manifest.py tests/test-parseindex2.py tests/test-remotefilelog-datapack.py tests/test-remotefilelog-histpack.py tests/test-revlog-raw.py tests/testlib/ext-sidedata.py To: joerg.sonnenberger, indygreg, durin42, martinvonz, #hg-reviewers Cc: Kwan, mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9464: packaging: don't use plain 'python' if another python has been specified
Mathiasdm created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Before this change, packaging on CentOS 8 failed because 'python' is used instead of 'python3'. Change was tested with: - make docker-centos7 - make docker-centos8 - make docker-ubuntu-bionic REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9464 AFFECTED FILES contrib/packaging/buildrpm contrib/packaging/packagelib.sh CHANGE DETAILS diff --git a/contrib/packaging/packagelib.sh b/contrib/packaging/packagelib.sh --- a/contrib/packaging/packagelib.sh +++ b/contrib/packaging/packagelib.sh @@ -8,16 +8,21 @@ # # node: the node|short hg was built from, or empty if built from a tag gethgversion() { +if [ -z "${1+x}" ]; then +python="python" +else +python="$1" +fi export HGRCPATH= export HGPLAIN= -make cleanbutpackages -make local PURE=--pure +make cleanbutpackages PYTHON=$python +make local PURE=--pure PYTHON=$python HG="$PWD/hg" -"$HG" version > /dev/null || { echo 'abort: hg version failed!'; exit 1 ; } +$python "$HG" version > /dev/null || { echo 'abort: hg version failed!'; exit 1 ; } -hgversion=`LANGUAGE=C "$HG" version | sed -ne 's/.*(version \(.*\))$/\1/p'` +hgversion=`LANGUAGE=C $python "$HG" version | sed -ne 's/.*(version \(.*\))$/\1/p'` if echo $hgversion | grep + > /dev/null 2>&1 ; then tmp=`echo $hgversion | cut -d+ -f 2` diff --git a/contrib/packaging/buildrpm b/contrib/packaging/buildrpm --- a/contrib/packaging/buildrpm +++ b/contrib/packaging/buildrpm @@ -56,7 +56,7 @@ exit 1 fi -gethgversion +gethgversion $PYTHONEXE if [ -z "$type" ] ; then release=1 @@ -76,7 +76,7 @@ fi mkdir -p $RPMBUILDDIR/{SOURCES,BUILD,SRPMS,RPMS} -$HG archive -t tgz $RPMBUILDDIR/SOURCES/mercurial-$version-$release.tar.gz +$PYTHONEXE $HG archive -t tgz $RPMBUILDDIR/SOURCES/mercurial-$version-$release.tar.gz if [ "$PYTHONVER" ]; then ( mkdir -p build @@ -112,7 +112,7 @@ if echo $version | grep '+' > /dev/null 2>&1; then latesttag="`echo $version | sed -e 's/+.*//'`" -$HG log -r .:"$latesttag" -fM \ +$PYTHONEXE $HG log -r .:"$latesttag" -fM \ --template '{date|hgdate}\t{author}\t{desc|firstline}\n' | python -c ' import sys, time @@ -136,9 +136,9 @@ else -$HG log \ +$PYTHONEXE $HG log \ --template '{date|hgdate}\t{author}\t{desc|firstline}\n' \ - .hgtags | python -c ' + .hgtags | $PYTHONEXE -c ' import sys, time def datestr(date, format): To: Mathiasdm, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9463: tests: conditionalize return code on chg in test-config.t
pulkit created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If there is any error while reading config, chg just returns 255 instead of 30. It seems to me that we cannot conditionalize only return codes in output using trailing `(chg !)` and hence used testcases. The test was failing with chg but after this patch, it now passes. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D9463 AFFECTED FILES tests/test-config.t CHANGE DETAILS diff --git a/tests/test-config.t b/tests/test-config.t --- a/tests/test-config.t +++ b/tests/test-config.t @@ -6,35 +6,59 @@ $ cat > .hg/hgrc << EOF > novaluekey > EOF +#if chg + $ hg showconfig + config error at $TESTTMP/.hg/hgrc:1: novaluekey + [255] +#else $ hg showconfig config error at $TESTTMP/.hg/hgrc:1: novaluekey [30] +#endif Invalid syntax: no key $ cat > .hg/hgrc << EOF > =nokeyvalue > EOF +#if chg + $ hg showconfig + config error at $TESTTMP/.hg/hgrc:1: =nokeyvalue + [255] +#else $ hg showconfig config error at $TESTTMP/.hg/hgrc:1: =nokeyvalue [30] +#endif Test hint about invalid syntax from leading white space $ cat > .hg/hgrc << EOF > key=value > EOF +#if chg + $ hg showconfig + config error at $TESTTMP/.hg/hgrc:1: unexpected leading whitespace: key=value + [255] +#else $ hg showconfig config error at $TESTTMP/.hg/hgrc:1: unexpected leading whitespace: key=value [30] +#endif $ cat > .hg/hgrc << EOF > [section] > key=value > EOF +#if chg + $ hg showconfig + config error at $TESTTMP/.hg/hgrc:1: unexpected leading whitespace: [section] + [255] +#else $ hg showconfig config error at $TESTTMP/.hg/hgrc:1: unexpected leading whitespace: [section] [30] +#endif Reset hgrc To: pulkit, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9462: chgserver: catch RepoError while loading configuration
pulkit created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Recent share safe work introduced functionality to read share source config file on dispatch. This can result in RepoError while reading config file as the shared source might not be present. `test-share.t#safe` was failing with chg earlier because of this. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D9462 AFFECTED FILES mercurial/chgserver.py CHANGE DETAILS diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py --- a/mercurial/chgserver.py +++ b/mercurial/chgserver.py @@ -504,10 +504,21 @@ the instructions. """ args = self._readlist() +errorraised = False try: self.ui, lui = _loadnewui(self.ui, args, self.cdebug) +except error.RepoError as inst: +# RepoError can be raised while trying to read shared source +# configuration +self.ui.error(_(b"abort: %s\n") % inst) +if inst.hint: +self.ui.error(_("(%s)\n") % inst.hint) +errorraised = True except error.Abort as inst: self.ui.error(inst.format()) +errorraised = True + +if errorraised: self.ui.flush() self.cresult.write(b'exit 255') return To: pulkit, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel