##// END OF EJS Templates
bisect: simplify conditional in 'check_state'...
Pierre-Yves David -
r30125:3528117c default
parent child Browse files
Show More
@@ -836,12 +836,12 b' def bisect(ui, repo, rev=None, extra=Non'
836 Returns 0 on success.
836 Returns 0 on success.
837 """
837 """
838 def checkstate(state):
838 def checkstate(state):
839 if not state['good'] or not state['bad']:
839 if state['good'] and state['bad']:
840 if not state['good']:
840 return True
841 raise error.Abort(_('cannot bisect (no known good revisions)'))
841 if not state['good']:
842 else:
842 raise error.Abort(_('cannot bisect (no known good revisions)'))
843 raise error.Abort(_('cannot bisect (no known bad revisions)'))
843 else:
844 return True
844 raise error.Abort(_('cannot bisect (no known bad revisions)'))
845
845
846 # backward compatibility
846 # backward compatibility
847 if rev in "good bad reset init".split():
847 if rev in "good bad reset init".split():
General Comments 0
You need to be logged in to leave comments. Login now