code: def checkin(url, files, message=None):
      
      from grit import Repo, Item
      r = Repo(url)
  
      if not files:
          raise GritError('No files')
  
      def _write(path):
          item = Item.from_path(repo=r, path=path)
          if r.isLocal():
              v.addItem(item=item)
          else:
              r.upload(filename=os.path.basename(path), filedata=open(path, 'r').read())
  
      if r.isLocal():
          v = r.addVersion()
      count = 1
      total = len(files) 
      while count <= total:
          print '[%s/%s] %0.2f%%' %(count, total, (float(count) / total) * 100), '*'*count, '\r',
          _write(os.path.abspath(files[count-1]))
          count += 1
          sys.stdout.flush()
      if message is None:
          message = 'Publishing %s' % ', '.join(files)
      if r.isLocal():
          v.save(message=message)
      print
docs: Check in files to a repository.
  
      :param url: URL of repo to check files into.
      :param message: Optional commit message.