[PATCH v2 1/6] remote-hg: disable forced push by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In certain situations we might end up pushing garbage revisions (e.g. in
a rebase), and the patches to deal with that haven't been merged yet.

So let's disable forced pushes by default.

Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 contrib/remote-helpers/git-remote-hg | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 96ad30d..84901e9 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -908,7 +908,7 @@ def main(args):
 
     hg_git_compat = False
     track_branches = True
-    force_push = True
+    force_push = False
 
     try:
         if get_config('remote-hg.hg-git-compat') == 'true\n':
@@ -916,8 +916,8 @@ def main(args):
             track_branches = False
         if get_config('remote-hg.track-branches') == 'false\n':
             track_branches = False
-        if get_config('remote-hg.force-push') == 'false\n':
-            force_push = False
+        if get_config('remote-hg.force-push') == 'true\n':
+            force_push = True
     except subprocess.CalledProcessError:
         pass
 
-- 
1.8.3.rc1.579.g184e698

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]