mercurial/subrepo.py
changeset 13927 518344d02761
parent 13913 d3f90ff904b8
child 13972 d1f4e7fd970a
equal deleted inserted replaced
13926:61ba09d8d118 13927:518344d02761
   800             if self._gitstate() == revision:
   800             if self._gitstate() == revision:
   801                 self._gitcommand(['reset', '--hard', 'HEAD'])
   801                 self._gitcommand(['reset', '--hard', 'HEAD'])
   802                 return
   802                 return
   803         elif self._gitstate() == revision:
   803         elif self._gitstate() == revision:
   804             if overwrite:
   804             if overwrite:
   805                 # first reset the index to unmark new files for commit, because 
   805                 # first reset the index to unmark new files for commit, because
   806                 # reset --hard will otherwise throw away files added for commit,
   806                 # reset --hard will otherwise throw away files added for commit,
   807                 # not just unmark them.
   807                 # not just unmark them.
   808                 self._gitcommand(['reset', 'HEAD'])
   808                 self._gitcommand(['reset', 'HEAD'])
   809                 self._gitcommand(['reset', '--hard', 'HEAD'])
   809                 self._gitcommand(['reset', '--hard', 'HEAD'])
   810             return
   810             return