Submitter | Katsunori FUJIWARA |
---|---|
Date | Oct. 3, 2013, 2:53 p.m. |
Message ID | <49339a7e52914e9abbed.1380812025@juju> |
Download | mbox | patch |
Permalink | /patch/2727/ |
State | Accepted |
Commit | 4f53de036af82548c1137dbb1940a6750133557f |
Delegated to: | Augie Fackler |
Headers | show |
Comments
On Thu, 2013-10-03 at 23:53 +0900, FUJIWARA Katsunori wrote: > # HG changeset patch > # User FUJIWARA Katsunori <foozy@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 ... > + 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. I've queued these, thanks, but I've rewritten this message: + .. note:: + Extra care should be used with the -f/--force option, + which will push all new heads on all branches, an action which will + almost always cause confusion for collaborators.
Matt Mackall schreef op 21-10-13 01:12: > On Thu, 2013-10-03 at 23:53 +0900, FUJIWARA Katsunori wrote: >> # HG changeset patch >> # User FUJIWARA Katsunori <foozy@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 > ... >> + 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. > I've queued these, thanks, but I've rewritten this message: > > + .. note:: > + Extra care should be used with the -f/--force option, > + which will push all new heads on all branches, an action which will > + almost always cause confusion for collaborators. Nit: ...should be taken ~Laurens
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.