Shelves the file if it is in a changelist

        :param changelist: Changelist to add the move to
        :type changelist: :class:`.Changelist`

def shelve(self, changelist=None):
        """Shelves the file if it is in a changelist

        :param changelist: Changelist to add the move to
        :type changelist: :class:`.Changelist`
        """
        if changelist is None and self.changelist.description == 'default':
            raise errors.ShelveError('Unabled to shelve files in the default changelist')

        cmd = ['shelve']
        if changelist:
            cmd += ['-c', str(changelist)]

        cmd.append(self.depotFile)

        self._connection.run(cmd)

        self.query()