def showStatus(): un = helper.getUserNamePassword(configfilename) print 'Current status' print 'Github username:\t\t' + un['github_username'] print 'Github password:\t\tl3mmu$_is_cool_and' print 'Repository:\t\t\t' + helper.getStatus(configfilename,'current_repo') print 'Issue:\t\t\t\t' + helper.getStatus(configfilename,'current_issue') print 'Repository directory: \t\t' + helper.getStatus(configfilename,'repo_local_location') print 'Meta repository directory:\t' + helper.getStatus(configfilename,'repo_meta_local_location')
def showStatus(): un = helper.getUserNamePassword(configfilename) print 'Current status' print 'Github username:\t\t' + un['github_username'] print 'Github password:\t\tl3mmu$_is_cool_and' print 'Repository:\t\t\t' + helper.getStatus(configfilename, 'current_repo') print 'Issue:\t\t\t\t' + helper.getStatus(configfilename, 'current_issue') print 'Repository directory: \t\t' + helper.getStatus( configfilename, 'repo_local_location') print 'Meta repository directory:\t' + helper.getStatus( configfilename, 'repo_meta_local_location')
#!/usr/bin/python from github import * import helper, os, sh global repo configfilename = os.path.expanduser('~') + '/.lemmus' cred = helper.getUserNamePassword(configfilename) gh = Github(cred['github_username'], cred['github_password']) def mergeWithMaster(): git = sh.git.bake( _cwd=helper.getStatus(configfilename, 'repo_local_location')) git_meta = sh.git.bake( _cwd=helper.getStatus(configfilename, 'repo_meta_local_location')) issue = helper.getStatus(configfilename, 'current_issue') print 'You will merge ticket #' + issue + ' of repository ' + helper.getStatus( configfilename, 'current_repo') + ' to the master and meta master.' if not raw_input('Continue? [y/n]') == 'y': print 'Canceld by user input' exit(2) try: git_meta.checkout('master') except: print 'FATAL: Unable to switch to master branch of meta repository. .. exiting' exit(2) try:
#!/usr/bin/python from github import * import helper,os,sh global repo configfilename = os.path.expanduser('~') + '/.lemmus' cred = helper.getUserNamePassword(configfilename) gh = Github(cred['github_username'],cred['github_password']) def mergeWithMaster(): git = sh.git.bake(_cwd=helper.getStatus(configfilename,'repo_local_location')) git_meta = sh.git.bake(_cwd=helper.getStatus(configfilename,'repo_meta_local_location')) issue = helper.getStatus(configfilename,'current_issue') print 'You will merge ticket #' + issue + ' of repository ' + helper.getStatus(configfilename,'current_repo') + ' to the master and meta master.' if not raw_input('Continue? [y/n]') == 'y': print 'Canceld by user input' exit(2) try: git_meta.checkout('master') except: print 'FATAL: Unable to switch to master branch of meta repository. .. exiting' exit(2) try: git_meta.fetch() except: print 'WARNING: Unable to fetch latest updates of master of the meta repository on Github' if not raw_input('Continue? [y/n]') == 'y':
exit(1) try: import ConfigParser except ImportError: print 'Error while import [ConfigParser] module \nConsider checking your pc since os should really be there you fool!' exit(1) try: import helper except ImportError: print 'Error while import [helper] module \nConsider checking your pc since os should really be there you fool!' exit(1) global configfilename configfilename = os.path.expanduser('~') + '/.lemmus' def getConfigFilename(): return configfilename if not os.path.isfile(configfilename): print 'No config file found. Creating one' helper.createNewConfig(configfilename) current_config = helper.getUserNamePassword(configfilename) #if not helper.checkGithubLogin(current_config['github_username'],current_config['github_password']): # helper.setUsernamePassword(configfilename)