[PATCH 1 of 2] push: hide description about "-f" in the hint to prevent from misunderstanding

Angel Ezquerra angel.ezquerra at gmail.com
Wed Jan 16 09:05:29 CST 2013


On Wed, Jan 16, 2013 at 3:47 PM, FUJIWARA Katsunori
<foozy at lares.dti.ne.jp> wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> # Date 1358347312 -32400
> # Node ID 3842a427e56915d1d08660b86d5cc107ff9e30c9
> # Parent  5db16424142c5a52a2fbdcd5db20e8deec355028
> push: hide description about "-f" in the hint to prevent from misunderstanding
>
> "use push -f to force" in the hint at abortion of "hg push" may cause
> novice users to execute "push -f" easily without understanding about
> problems of multiple headed repository.
>
> This patch hides description about "-f" in the hint, and leads into
> seeing "hg help push" for detail about forcible pushing instead of it.
>
> This patch also adds detail about --force option into online help of
> "hg push".
>
> diff -r 5db16424142c -r 3842a427e569 mercurial/commands.py
> --- a/mercurial/commands.py     Wed Jan 09 19:10:44 2013 -0600
> +++ b/mercurial/commands.py     Wed Jan 16 23:41:52 2013 +0900
> @@ -4782,7 +4782,13 @@
>      only create a new branch without forcing other changes.
>
>      Use -f/--force to override the default behavior and push all
> -    changesets on all branches.
> +    specified changesets: by default, all changesets on all branches.
> +    If --force is used, -b/--branch may be useful to prevent from
> +    pushing unexpected heads on other named branches.
> +
> +    You should ask the administrator before pushing with --force,
> +    because it may violate the management policy of the destination
> +    repository. Multiple heads shouldn't be recommended, usually.

To my non native ears, the last sentence feels weird. Instead I'd say:

"It is usually not recommended to have multiple heads on a repository."

or something like that, and perhaps place that sentence before the
"You should ask the aministrator", which I would change to: "You
should change the repository administrator".

That is:

+    It is usually not recommended to have multiple heads on a repository.
+    You should ask the administrator before pushing with --force,
+    because it may violate the management policy of the destination
+    repository.

Angel


More information about the Mercurial-devel mailing list