protected boolean isRebasing(AnActionEvent e) {
    HgRepository repository = getSelectedRepositoryFromEvent(e.getDataContext());
    return repository != null && repository.getState() == myState;
  }
protected boolean isRebasing(AnActionEvent e)