def _execute(self, options, args): # save current branch name branch = gitshelve.git('name-rev', '--name-only', 'HEAD') or 'master' # stash changes try: gitshelve.git('stash') except gitshelve.GitError, error: if 'You do not have the initial commit yet' in error.stderr: # don't worry, we just created 'gitissius' branch pass else: raise
def _execute(self, options, args): user_email = gitshelve.git('config', 'user.email') if options.all: rules = [{'assigned_to': user_email}] else: rules = [{'assigned_to': user_email}, {'status__not': 'closed'}, {'status__not': 'invalid'} ] issues = common.issue_manager.filter(rules=rules, operator="and", sort_key=options.sort ) common.print_issues(issues)
def _execute(self, options, args): user_email = gitshelve.git('config', 'user.email') if options.all: rules = [{'assigned_to': user_email}] else: rules = [{ 'assigned_to': user_email }, { 'status__not': 'closed' }, { 'status__not': 'invalid' }] issues = common.issue_manager.filter(rules=rules, operator="and", sort_key=options.sort) common.print_issues(issues)
# stash changes try: gitshelve.git('stash') except gitshelve.GitError, error: if 'You do not have the initial commit yet' in error.stderr: # don't worry, we just created 'gitissius' branch pass else: raise else: # switch branches gitshelve.git('checkout', 'gitissius') # pull updates gitshelve.git('pull') # switch back to previous branch gitshelve.git('checkout', branch) # pop stashed changes try: gitshelve.git('stash', 'pop') except gitshelve.GitError, error: # no worries, no stash to apply pass
def _execute(self, options, args): gitshelve.git('push', 'origin', 'gitissius')
def _execute(self, options, args): gitshelve.git("push")