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

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Thu Oct 3 09:53:45 CDT 2013


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1380809766 -32400
#      Thu Oct 03 23:16:06 2013 +0900
# Node ID 49339a7e52914e9abbedcfce4f1906f6997dc0c8
# Parent  ba230978adae2a1b1c55cadc768ee5d3d71f687e
push: add more detailed explanation about "--force" to online help document

This patch adds more detailed 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.


More information about the Mercurial-devel mailing list