Add a states.bypass option to push without touching state.
--- a/hgext/states.py Mon Nov 28 00:59:18 2011 +0100
+++ b/hgext/states.py Mon Nov 28 00:59:42 2011 +0100
@@ -985,11 +985,12 @@
def push(self, remote, *args, **opts):
"""altered push that also update states heads on local and remote"""
result = opush(remote, *args, **opts)
- remoteheads = self._pullstatesheads(remote)
- for st, heads in remoteheads.iteritems():
- self.setstate(st, heads)
- if heads != self.stateheads(st):
- self._pushstatesheads(remote, st, heads)
+ if not self.ui.configbool('states', 'bypass', False):
+ remoteheads = self._pullstatesheads(remote)
+ for st, heads in remoteheads.iteritems():
+ self.setstate(st, heads)
+ if heads != self.stateheads(st):
+ self._pushstatesheads(remote, st, heads)
return result
def _pushstatesheads(self, remote, state, remoteheads):