mercurial/localrepo.py
branchstable
changeset 16023 90f8b8dd0326
parent 16020 7460f3a1fd6c
child 16030 308406677e9d
equal deleted inserted replaced
16022:04604d1a9fc3 16023:90f8b8dd0326
  1590         pass
  1590         pass
  1591 
  1591 
  1592     def push(self, remote, force=False, revs=None, newbranch=False):
  1592     def push(self, remote, force=False, revs=None, newbranch=False):
  1593         '''Push outgoing changesets (limited by revs) from the current
  1593         '''Push outgoing changesets (limited by revs) from the current
  1594         repository to remote. Return an integer:
  1594         repository to remote. Return an integer:
  1595           - 0 means HTTP error *or* nothing to push
  1595           - None means nothing to push
       
  1596           - 0 means HTTP error
  1596           - 1 means we pushed and remote head count is unchanged *or*
  1597           - 1 means we pushed and remote head count is unchanged *or*
  1597             we have outgoing changesets but refused to push
  1598             we have outgoing changesets but refused to push
  1598           - other values as described by addchangegroup()
  1599           - other values as described by addchangegroup()
  1599         '''
  1600         '''
  1600         # there are two ways to push to remote repo:
  1601         # there are two ways to push to remote repo:
  1624 
  1625 
  1625 
  1626 
  1626                 if not outgoing.missing:
  1627                 if not outgoing.missing:
  1627                     # nothing to push
  1628                     # nothing to push
  1628                     scmutil.nochangesfound(self.ui, outgoing.excluded)
  1629                     scmutil.nochangesfound(self.ui, outgoing.excluded)
  1629                     ret = 1
  1630                     ret = None
  1630                 else:
  1631                 else:
  1631                     # something to push
  1632                     # something to push
  1632                     if not force:
  1633                     if not force:
  1633                         discovery.checkheads(self, remote, outgoing,
  1634                         discovery.checkheads(self, remote, outgoing,
  1634                                              remoteheads, newbranch,
  1635                                              remoteheads, newbranch,