code: def get_checkout_command(self, revision, clean=False):
          
          command = ['hg', 'update']
          if clean:
              command.append('--clean')
          command.append('--rev=%s' % revision)
          return command
docs: Get the command to update the working tree of the local repository.