hgext/states.py
changeset 107 f45325da7970
parent 106 03bbce26553e
equal deleted inserted replaced
106:03bbce26553e 107:f45325da7970
   983             return result
   983             return result
   984 
   984 
   985         def push(self, remote, *args, **opts):
   985         def push(self, remote, *args, **opts):
   986             """altered push that also update states heads on local and remote"""
   986             """altered push that also update states heads on local and remote"""
   987             result = opush(remote, *args, **opts)
   987             result = opush(remote, *args, **opts)
   988             remoteheads = self._pullstatesheads(remote)
   988             if not self.ui.configbool('states', 'bypass', False):
   989             for st, heads in remoteheads.iteritems():
   989                 remoteheads = self._pullstatesheads(remote)
   990                 self.setstate(st, heads)
   990                 for st, heads in remoteheads.iteritems():
   991                 if heads != self.stateheads(st):
   991                     self.setstate(st, heads)
   992                     self._pushstatesheads(remote, st,  heads)
   992                     if heads != self.stateheads(st):
       
   993                         self._pushstatesheads(remote, st,  heads)
   993             return result
   994             return result
   994 
   995 
   995         def _pushstatesheads(self, remote, state, remoteheads):
   996         def _pushstatesheads(self, remote, state, remoteheads):
   996             """push head of a given state for remote
   997             """push head of a given state for remote
   997 
   998