def _get_local_rev_and_branch(target, user, password):
 log.info('Checking local revision for {0}'.format(target))
 try:
  local_rev = __salt__['git.revision'](target, user=user, password=password, ignore_retcode=True)
 except CommandExecutionError:
  log.info('No local revision for {0}'.format(target))
  local_rev = None
 log.info('Checking local branch for {0}'.format(target))
 try:
  local_branch = __salt__['git.current_branch'](target, user=user, password=password, ignore_retcode=True)
 except CommandExecutionError:
  log.info('No local branch for {0}'.format(target))
  local_branch = None
 return (local_rev, local_branch)

def _get_local_rev_and_branch ( target , user , password ) : log . info ( 'Checking local revision for {0}' . format ( target ) ) try : local_rev = __salt__ [ 'git.revision' ] ( target , user = user , password = password , ignore_retcode = True ) except CommandExecutionError : log . info ( 'No local revision for {0}' . format ( target ) ) local_rev = None log . info ( 'Checking local branch for {0}' . format ( target ) ) try : local_branch = __salt__ [ 'git.current_branch' ] ( target , user = user , password = password , ignore_retcode = True ) except CommandExecutionError : log . info ( 'No local branch for {0}' . format ( target ) ) local_branch = None return ( local_rev , local_branch )
return the local revision for before/after comparisons .