def generate_package_revision(root):
  if os.path.islink(root):
    real_path = os.readlink(root)
    if not real_path.startswith('/'):
      abs_path = "%s/%s" % (os.path.dirname(root), real_path)
    else:
      abs_path = real_path
  else:
    abs_path = root

  try:
    try:
      cmd = ["svn", "info"]
      revision_prefix = "Revision: "
      return "r%s" % get_revision_number(cmd, revision_prefix, abs_path)
    except:
      cmd = ["git", "show"]
      commit_prefix = "commit "
      return get_revision_number(cmd, commit_prefix, abs_path)
  except:
    # We cannot get the version No., just return a fake one
    return "r%s" % FAKE_SVN_VERSION
The task's logic
dataset/ETHPy150Open XiaoMi/minos/client/deploy_utils.py/generate_package_revision--crossover with--dataset/ETHPy150Open MinerKasch/HadoopWithPython/python/Luigi/wordcount.py/WordCount.run