[PATCH 2 of 3 V3] push: add more detail explanation about "--force" to online help document

Augie Fackler raf at durin42.com
Mon Sep 30 14:38:59 CDT 2013


On Tue, Oct 01, 2013 at 12:54:31AM +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> # Date 1380554782 -32400
> #      Tue Oct 01 00:26:22 2013 +0900
> # Node ID ec66cf8455b1ef2dcf3cdf8e9178c7da52f74bae
> # Parent  220721e66ce9b2eb5b425ed633d0d85173676b9a
> push: add more detail explanation about "--force" to online help document

Feels like it could use some bikeshed painting on the exact wording,
but I really like this. Does anyone object to me just pushing this and
we can clean it up later in followups?

>
> This patch adds more detail explanation about "--force" to online help
> document of "hg push" to prevent novice users to execute "push
> --force" easily without understanding about problems of multiple
> branch heads in the repository.
>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -4650,8 +4650,11 @@
>      branch that is not present at the destination. This allows you to
>      only create a new branch without forcing other changes.
>
> -    Use -f/--force to override the default behavior and push all
> -    changesets on all branches.
> +    Although you can override the default behavior and push all
> +    changesets on all branches by -f/--force, pushing new heads in
> +    particular is usually a mistake. Before pushing with --force, you
> +    should ask the owner of the destination repository for the policy
> +    about multiple heads in it.
>
>      If -r/--rev is used, the specified revision and all its ancestors
>      will be pushed to the remote repository.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list