def pull(cwd, opts=None, user=None, identity=None, repository=None):
 cmd = ['hg', 'pull']
 if identity:
  cmd.extend(_ssh_flag(identity))
 if opts:
  for opt in opts.split():
   cmd.append(opt)
 if (repository is not None):
  cmd.append(repository)
 ret = __salt__['cmd.run_all'](cmd, cwd=cwd, runas=user, python_shell=False)
 if (ret['retcode'] != 0):
  raise CommandExecutionError('Hg command failed: {0}'.format(ret.get('stderr', ret['stdout'])))
 return ret['stdout']

def pull ( cwd , opts = None , user = None , identity = None , repository = None ) : cmd = [ 'hg' , 'pull' ] if identity : cmd . extend ( _ssh_flag ( identity ) ) if opts : for opt in opts . split ( ) : cmd . append ( opt ) if ( repository is not None ) : cmd . append ( repository ) ret = __salt__ [ 'cmd.run_all' ] ( cmd , cwd = cwd , runas = user , python_shell = False ) if ( ret [ 'retcode' ] != 0 ) : raise CommandExecutionError ( 'Hg command failed: {0}' . format ( ret . get ( 'stderr' , ret [ 'stdout' ] ) ) ) return ret [ 'stdout' ]
pull changes from the default remote repository .