PK͉|Itwatchman/.DS_StoreBud1cache_ __pycache__vSrnlong  @ @ @ @ EDSDB ` @ @ @PK}Ippwatchman/__init__.py""" watchman: version control status management made easy.""" __version__ = '0.0.4' __author__ = 'Aleph Melo' PK˪}IiWXXwatchman/main.pyfrom __future__ import print_function from argparse import ArgumentParser import sys import os from sh import cd, hg, watchman SCM_OPTIONS = ['git', 'hg'] def _get_subdirectories(current_dir): return [directory for directory in os.listdir(current_dir) if os.path.isdir(os.path.join(current_dir, directory)) and directory[0] != '.'] def check(scm): if scm in SCM_OPTIONS: current_working_directory = os.getcwd() child_dirs = _get_subdirectories(current_working_directory) for child in child_dirs: try: current_branch = hg.branch('-R', './%s' % child) output = '%-25s is on branch: %s' % (child, current_branch) print(output, end='') except Exception as e: continue else: print("The scm you typed is not supported yet or you just misspelled\nCurrent options are: hg (mercurial) or git.\n") print(watchman('--help')) def main(): parser = ArgumentParser() parser.add_argument('check', help='checks branch status of all immediate subdirectories') parser.add_argument('-s', '--scm', help='specify source code management application commands\ options: hg (mercurial) or git', action='store') arguments = parser.parse_args() if arguments.check: if arguments.scm is not None: check(arguments.scm) else: arguments.scm = 'hg' check(arguments.scm) if __name__ == '__main__': main() PK!H7 *1)watchman-0.0.4.dist-info/entry_points.txtN+I/N.,()*O,IMSU1r3@PK!H|&Ubwatchman-0.0.4.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,Q034 /, (-JLR()*M ILR(4KM̫#DPK!HЉtX!watchman-0.0.4.dist-info/METADATA]N0 F~@BT .ZDJ8C{{R1ĝsYqDB4~RPˍё/A;*YkOa8 N? ~-DFN2#98#a?w[> uyF"Վw^UۦJ T@3Q( 3Bn~|}G(gpcJ;-ll_ J(YdA-:e>j'~XzB/Z҅:\[0fǔehxwYm X7X\U7%%m$-wOȷ+ЮQw4V N<}PK͉|Itwatchman/.DS_StorePK}Ipp4watchman/__init__.pyPK˪}IiWXXwatchman/main.pyPK!H7 *1)\watchman-0.0.4.dist-info/entry_points.txtPK!H|&Ubwatchman-0.0.4.dist-info/WHEELPK!HЉtX!^ watchman-0.0.4.dist-info/METADATAPK!H{g]!watchman-0.0.4.dist-info/RECORDPK #