Mercurial > public > mercurial-scm > hg-stable
diff tests/test-help.t @ 52113:31076a2301f1
py-3-13: stabilize the docstring output across all supported Python versions
Python 3.13 now trims indents from docstrings at compilation time
(to save space in .pyc), so all of our helptext is affected.
The indentation has never served a user-facing purpose and was more here
because nobody cared enough to remove it: we gain some screen space this way.
Rather than undo the transformation (which isn't really possible since the
transform also deletes leading/trailing whitespace), we align the behavior
of older Python versions with that of 3.13.
Unfortunately, this means breaking some of the translations. I've only
touched the ones that need to work for some tooling tests to pass, but
I do not have the time to fix the rest of them across all languages, since
they cannot be done in an automated way. i18n updates have been basically
abandonned for a good while now, hopefully someone cares enough to bring them
back.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 24 Oct 2024 15:23:52 +0200 |
parents | 8c990011c804 |
children | 19ae7730636a |
line wrap: on
line diff
--- a/tests/test-help.t Tue Oct 15 22:30:10 2024 -0400 +++ b/tests/test-help.t Thu Oct 24 15:23:52 2024 +0200 @@ -467,15 +467,15 @@ add the specified files on the next commit - Schedule files to be version controlled and added to the repository. - - The files will be added to the repository at the next commit. To undo an - add before that, see 'hg forget'. - - If no names are given, add all files to the repository (except files - matching ".hgignore"). - - Returns 0 if all files are successfully added. + Schedule files to be version controlled and added to the repository. + + The files will be added to the repository at the next commit. To undo an add + before that, see 'hg forget'. + + If no names are given, add all files to the repository (except files matching + ".hgignore"). + + Returns 0 if all files are successfully added. options ([+] can be repeated): @@ -493,40 +493,40 @@ add the specified files on the next commit - Schedule files to be version controlled and added to the repository. - - The files will be added to the repository at the next commit. To undo an - add before that, see 'hg forget'. - - If no names are given, add all files to the repository (except files - matching ".hgignore"). - - Examples: - - - New (unknown) files are added automatically by 'hg add': - - $ ls - foo.c - $ hg status - ? foo.c - $ hg add - adding foo.c - $ hg status - A foo.c - - - Specific files to be added can be specified: - - $ ls - bar.c foo.c - $ hg status - ? bar.c - ? foo.c - $ hg add bar.c - $ hg status - A bar.c - ? foo.c - - Returns 0 if all files are successfully added. + Schedule files to be version controlled and added to the repository. + + The files will be added to the repository at the next commit. To undo an add + before that, see 'hg forget'. + + If no names are given, add all files to the repository (except files matching + ".hgignore"). + + Examples: + + - New (unknown) files are added automatically by 'hg add': + + $ ls + foo.c + $ hg status + ? foo.c + $ hg add + adding foo.c + $ hg status + A foo.c + + - Specific files to be added can be specified: + + $ ls + bar.c foo.c + $ hg status + ? bar.c + ? foo.c + $ hg add bar.c + $ hg status + A bar.c + ? foo.c + + Returns 0 if all files are successfully added. options ([+] can be repeated): @@ -568,10 +568,10 @@ print the root (top) of the current working directory - Print the root directory of the current - repository. - - Returns 0 on success. + Print the root directory of the current + repository. + + Returns 0 on success. options: @@ -630,20 +630,19 @@ verify the integrity of the repository - Verify the integrity of the current repository. - - This will perform an extensive check of the repository's integrity, - validating the hashes and checksums of each entry in the changelog, - manifest, and tracked files, as well as the integrity of their crosslinks - and indices. - - Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more - information about recovery from corruption of the repository. - - For an alternative UI with a lot more control over the verification - process and better error reporting, try 'hg help admin::verify'. - - Returns 0 on success, 1 if errors are encountered. + Verify the integrity of the current repository. + + This will perform an extensive check of the repository's integrity, validating + the hashes and checksums of each entry in the changelog, manifest, and tracked + files, as well as the integrity of their crosslinks and indices. + + Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more + information about recovery from corruption of the repository. + + For an alternative UI with a lot more control over the verification process + and better error reporting, try 'hg help admin::verify'. + + Returns 0 on success, 1 if errors are encountered. options: @@ -654,36 +653,36 @@ diff repository (or selected files) - Show differences between revisions for the specified files. - - Differences between files are shown using the unified diff format. - - Note: - 'hg diff' may generate unexpected results for merges, as it will - default to comparing against the working directory's first parent - changeset if no revisions are specified. To diff against the conflict - regions, you can use '--config diff.merge=yes'. - - By default, the working directory files are compared to its first parent. - To see the differences from another revision, use --from. To see the - difference to another revision, use --to. For example, 'hg diff --from .^' - will show the differences from the working copy's grandparent to the - working copy, 'hg diff --to .' will show the diff from the working copy to - its parent (i.e. the reverse of the default), and 'hg diff --from 1.0 --to - 1.2' will show the diff between those two revisions. - - Alternatively you can specify -c/--change with a revision to see the - changes in that changeset relative to its first parent (i.e. 'hg diff -c - 42' is equivalent to 'hg diff --from 42^ --to 42') - - Without the -a/--text option, diff will avoid generating diffs of files it - detects as binary. With -a, diff will generate a diff anyway, probably - with undesirable results. - - Use the -g/--git option to generate diffs in the git extended diff format. - For more information, read 'hg help diffs'. - - Returns 0 on success. + Show differences between revisions for the specified files. + + Differences between files are shown using the unified diff format. + + Note: + 'hg diff' may generate unexpected results for merges, as it will default to + comparing against the working directory's first parent changeset if no + revisions are specified. To diff against the conflict regions, you can use + '--config diff.merge=yes'. + + By default, the working directory files are compared to its first parent. To + see the differences from another revision, use --from. To see the difference + to another revision, use --to. For example, 'hg diff --from .^' will show the + differences from the working copy's grandparent to the working copy, 'hg diff + --to .' will show the diff from the working copy to its parent (i.e. the + reverse of the default), and 'hg diff --from 1.0 --to 1.2' will show the diff + between those two revisions. + + Alternatively you can specify -c/--change with a revision to see the changes + in that changeset relative to its first parent (i.e. 'hg diff -c 42' is + equivalent to 'hg diff --from 42^ --to 42') + + Without the -a/--text option, diff will avoid generating diffs of files it + detects as binary. With -a, diff will generate a diff anyway, probably with + undesirable results. + + Use the -g/--git option to generate diffs in the git extended diff format. For + more information, read 'hg help diffs'. + + Returns 0 on success. options ([+] can be repeated): @@ -717,38 +716,37 @@ show changed files in the working directory - Show status of files in the repository. If names are given, only files - that match are shown. Files that are clean or ignored or the source of a - copy/move operation, are not listed unless -c/--clean, -i/--ignored, - -C/--copies or -A/--all are given. Unless options described with "show - only ..." are given, the options -mardu are used. - - Option -q/--quiet hides untracked (unknown and ignored) files unless - explicitly requested with -u/--unknown or -i/--ignored. - - Note: - 'hg status' may appear to disagree with diff if permissions have - changed or a merge has occurred. The standard diff format does not - report permission changes and diff only reports changes relative to one - merge parent. - - If one revision is given, it is used as the base revision. If two - revisions are given, the differences between them are shown. The --change - option can also be used as a shortcut to list the changed files of a - revision from its first parent. - - The codes used to show the status of files are: - - M = modified - A = added - R = removed - C = clean - ! = missing (deleted by non-hg command, but still tracked) - ? = not tracked - I = ignored - = origin of the previous file (with --copies) - - Returns 0 on success. + Show status of files in the repository. If names are given, only files that + match are shown. Files that are clean or ignored or the source of a copy/move + operation, are not listed unless -c/--clean, -i/--ignored, -C/--copies or + -A/--all are given. Unless options described with "show only ..." are given, + the options -mardu are used. + + Option -q/--quiet hides untracked (unknown and ignored) files unless + explicitly requested with -u/--unknown or -i/--ignored. + + Note: + 'hg status' may appear to disagree with diff if permissions have changed or + a merge has occurred. The standard diff format does not report permission + changes and diff only reports changes relative to one merge parent. + + If one revision is given, it is used as the base revision. If two revisions + are given, the differences between them are shown. The --change option can + also be used as a shortcut to list the changed files of a revision from its + first parent. + + The codes used to show the status of files are: + + M = modified + A = added + R = removed + C = clean + ! = missing (deleted by non-hg command, but still tracked) + ? = not tracked + I = ignored + = origin of the previous file (with --copies) + + Returns 0 on success. options ([+] can be repeated): @@ -907,13 +905,13 @@ summarize working directory state - This generates a brief summary of the working directory state, including - parents, branch, commit status, phase and available updates. - - With the --remote option, this will check the default paths for incoming - and outgoing changes. This can be time-consuming. - - Returns 0 on success. + This generates a brief summary of the working directory state, including + parents, branch, commit status, phase and available updates. + + With the --remote option, this will check the default paths for incoming and + outgoing changes. This can be time-consuming. + + Returns 0 on success. defined by: helpext