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

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Sept. 30, 2013, 3:54 p.m.
Message ID <ec66cf8455b1ef2dcf3c.1380556471@juju>
Download mbox | patch
Permalink /patch/2672/
State Superseded
Delegated to: Augie Fackler
Headers show

Comments

Katsunori FUJIWARA - Sept. 30, 2013, 3:54 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@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

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.
Augie Fackler - Sept. 30, 2013, 7:38 p.m.
On Tue, Oct 01, 2013 at 12:54:31AM +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@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@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

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.