code: def revert(self, unchanged_only=False):
          
          if self._reverted:
              raise errors.ChangelistError('This changelist has been reverted')
  
          change = self._change
          if self._change == 0:
              change = 'default'
  
          cmd = ['revert', '-c', str(change)]
  
          if unchanged_only:
              cmd.append('-a')
  
          files = [f.depotFile for f in self._files]
          if files:
              cmd += files
              self._connection.run(cmd)
  
          self._files = []
          self._reverted = True
docs: Revert all files in this changelist
  
          :param unchanged_only: Only revert unchanged files
          :type unchanged_only: bool
          :raises: :class:`.ChangelistError`