scripts/hg_stat.py
author Xavier Algarra <xavier@pep-project.org>
Tue, 06 Jun 2017 07:49:23 +0200
changeset 2248 75013a586bfd
parent 2243 05737c0603c1
child 3436 fc6468e6f644
permissions -rwxr-xr-x
IOS-137 add multiple accounts option with the new login
     1 #!/usr/bin/env python3
     2 
     3 #
     4 # From pEp_for_iOS, invoke like this:
     5 # python3 scripts/hg_stat.py
     6 # Or:
     7 # ./scripts/hg_stat.py
     8 #
     9 
    10 import os
    11 from subprocess import call
    12 
    13 base = '../'
    14 dirs = ['pEp_for_iOS', 'MessageModel', 'pEpObjCAdapter', 'pantomime-iOS',
    15         'pEpEngine', 'netpgp-et', 'libAccountSettings', 'OpenSSL-for-iPhone']
    16 
    17 if __name__ == '__main__':
    18     current_dir = os.getcwd()
    19     for d in dirs:
    20         path = base + d
    21         os.chdir(path)
    22         print("\n*** " + d)
    23         git_dir = '.git/'
    24         hg_dir = '.hg/'
    25         if os.path.exists(git_dir):
    26             call(['git', 'status'])
    27         if os.path.exists(hg_dir):
    28             call(['hg', 'summary', '--remote'])
    29         os.chdir(current_dir)
    30