[PATCH 3 of 3] publishing: unconditionally trust publishing flag

Matt Mackall mpm at selenic.com
Fri Jun 19 04:30:23 UTC 2015


# HG changeset patch
# User Matt Mackall <mpm at selenic.com>
# Date 1434659992 18000
#      Thu Jun 18 15:39:52 2015 -0500
# Node ID b21f2157f3bf414c65ba795fd7b4e76cd7592e9f
# Parent  c107cc0fb2fbb05d29c49a0659968fc256c8a846
publishing: unconditionally trust publishing flag

Unfortunately, there are currently no tests for this behavior because
we lack a good way of testing trust.

diff -r c107cc0fb2fb -r b21f2157f3bf mercurial/localrepo.py
--- a/mercurial/localrepo.py	Thu Jun 18 15:34:22 2015 -0500
+++ b/mercurial/localrepo.py	Thu Jun 18 15:39:52 2015 -0500
@@ -798,7 +798,9 @@
         return self
 
     def publishing(self):
-        return self.ui.configbool('phases', 'publish', True)
+        # it's safe (and desirable) to trust the publish flag unconditionally
+        # so that we don't finalize changes shared between users via ssh or nfs
+        return self.ui.configbool('phases', 'publish', True, untrusted=True)
 
     def cancopy(self):
         # so statichttprepo's override of local() works



More information about the Mercurial-devel mailing list