def CheckRemoteGitState(self):
    """Checks the state of the remote git repository.

    Returns:
      A boolean value to indicate if the state is sane.
    """
    if self._command == u'close':
      if not self._git_helper.SynchronizeWithUpstream():
        print((
            u'{0:s} aborted - unable to synchronize with '
            u'upstream/master.').format(self._command.title()))
        return False

    elif (u'create', u'update') in self._command:
      if not self._git_helper.CheckSynchronizedWithUpstream():
        if not self._git_helper.SynchronizeWithUpstream():
          print((
              u'{0:s} aborted - unable to synchronize with '
              u'upstream/master.').format(self._command.title()))
          return False

        force_push = True
      else:
        force_push = False

      if not self._git_helper.PushToOrigin(
          self._active_branch, force=force_push):
        print(u'{0:s} aborted - unable to push updates to origin/{1:s}.'.format(
            self._command.title(), self._active_branch))
        return False

    elif self._command == u'lint':
      self._git_helper.CheckSynchronizedWithUpstream()

    elif self._command == u'merge':
      if not self._git_helper.SynchronizeWithOrigin():
        print((
            u'{0:s} aborted - unable to synchronize with '
            u'origin/master.').format(self._command.title()))
        return False

    return True
dataset/ETHPy150Open log2timeline/dfvfs/utils/review.py/ReviewHelper.CheckRemoteGitState/swapped operands of `in`