Mercurial > evolve
comparison hgext/states.py @ 106:03bbce26553e
Allow setstate with the last non trcked state.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 28 Nov 2011 00:59:18 +0100 |
parents | 6300dd1c2df7 |
children | f45325da7970 |
comparison
equal
deleted
inserted
replaced
105:6300dd1c2df7 | 106:03bbce26553e |
---|---|
894 def setstate(self, state, nodes): | 894 def setstate(self, state, nodes): |
895 """change state of targets changeset and it's ancestors. | 895 """change state of targets changeset and it's ancestors. |
896 | 896 |
897 Simplify the list of head.""" | 897 Simplify the list of head.""" |
898 assert not isinstance(nodes, basestring), repr(nodes) | 898 assert not isinstance(nodes, basestring), repr(nodes) |
899 if not state.trackheads: | |
900 return | |
899 heads = self._statesheads[state] | 901 heads = self._statesheads[state] |
900 olds = heads[:] | 902 olds = heads[:] |
901 heads.extend(nodes) | 903 heads.extend(nodes) |
902 heads[:] = set(heads) | 904 heads[:] = set(heads) |
903 heads.sort() | 905 heads.sort() |