INNER CODE UNIT · Python

save_status

emanuele-f/PCAPdroid · tools/weblate.py:54

def save_status(status):
    with open(STATUS_FILE, "w") as f:
        for locale in sorted(status):
            f.write(f"{locale}={status[locale]}\n")

# ---------------------------------------------------------------------------
# Git helpers
# ---------------------------------------------------------------------------

def is_on_master(commit):
    """True if *commit* is already reachable from HEAD."""
    return git("merge-base", "--is-ancestor", commit, "HEAD",
               check=False).returncode == 0

def get_pending_commits(locale, last_commit):
    """Commits on weblate/master after *last_commit* that touch *locale*."""
    path = locale_path(locale)
    args = ["log", "--format=%H", "--reverse", "--no-merges"]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…