code: def hg_hook(ui, repo, node=None, **kwargs):
      
      seen = set()
      paths = []
      if len(repo):
          for rev in range(repo[node], len(repo)):
              for file_ in repo[rev].files():
                  file_ = op.join(repo.root, file_)
                  if file_ in seen or not op.exists(file_):
                      continue
                  seen.add(file_)
                  paths.append(file_)
  
      options = parse_options()
      setup_logger(options)
      if paths:
          process_paths(options, candidates=paths)
docs: Run pylama after mercurial commit.