Returns dict mapping local path to remote name.
17468
def output_extras(self, output_file):
        
        output_directory = dirname(output_file)

        def local_path(name):
            return join(output_directory, self.path_helper.local_name(name))

        files_directory = "%s_files%s" % (basename(output_file)[0:-len(".dat")], self.path_helper.separator)
        names = filter(lambda o: o.startswith(files_directory), self.output_directory_contents)
        return dict(map(lambda name: (local_path(name), name), names))
1215717
def get_path():
    '''
    
    '''
    ret = salt.utils.stringutils.to_unicode(
        __utils__['reg.read_value'](
            'HKEY_LOCAL_MACHINE',
            'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment',
            'PATH')['vdata']
    ).split(';')

    # Trim ending backslash
    return list(map(_normalize_dir, ret))
1033861
def get_remote(self, remote='origin'):
        """"""
        repo = self.get_repo()
        if repo is not None:
            remotes = {r.name: r for r in repo.remotes}
            r = repo.remotes[0] if remote not in remotes else remotes[remote]
        else:
            r = None
        return r
981684
def path(self):
        
        return "/".join([
            part
            for part in [
                self.version,
                self.qualifier,
            ]
            if part
        ])
1190217
def path(self, key):
    ''''''
    return os.path.join(self.root_path, self.relative_path(key))
84843
def scp_file_remote_to_local(self, remote_path, local_path):
        

        sshadd_command = [
            'ssh-add',
            '/Users/pyrat/.ssh/ubuntuNode'
        ]
        self.info_log(
            "executing command: %s" %
            ' '.join(sshadd_command)
        )
        p = subprocess.Popen(sshadd_command)
        p.wait()

        scp_command = [
            'scp',
            '-o',
            'StrictHostKeyChecking=no',
            '%s@%s:"%s"' %
            (
                self.browser_config.get('username'),
                self.get_ip(),
                remote_path
            ),
            local_path
        ]
        self.info_log(
            "executing command: %s" %
            ' '.join(scp_command)
        )
        p = subprocess.Popen(scp_command)
        p.wait()
1006673
def local_keys(self):
        '''
        
        '''
        ret = {'local': []}
        for fn_ in salt.utils.data.sorted_ignorecase(os.listdir(self.opts['pki_dir'])):
            if fn_.endswith('.pub') or fn_.endswith('.pem'):
                path = os.path.join(self.opts['pki_dir'], fn_)
                if os.path.isfile(path):
                    ret['local'].append(fn_)
        return ret
115917
def dirname(self, path):
        """"""
        if self.is_ssh(path):
            remotepath = self._get_remote(path)
            remotedir = os.path.dirname(remotepath)
            return self._get_tramp_path(remotedir)
        else:
            return os.path.dirname(path)
558762
def localpath(*args):
    """"""
    plist = [ROOT] + list(args)
    return os.path.abspath(pjoin(*plist))
577627
def get_remote_url(path, remote="origin"):
    
    path = get_path(path)
    cmd = ["config", "--get", "remote.%s.url" % remote]
    return __run_git(cmd, path)[0]
388229
def getpath(d, json_path, default=None, sep='.'):
    '''
    '''
    for key in json_path.split(sep):
        try:
            d = d[key]
        except (KeyError, TypeError):
            return default
    return d
755646
def remote(self, name='origin'):
        """"""
        r = Remote(self, name)
        if not r.exists():
            raise ValueError("Remote named '%s' didn't exist" % name)
        return r
442846
def get_path_name(self):
        
        path = fix_raw_path(os.path.dirname(os.path.abspath(self.path)))
        name = os.path.basename(self.path)
        return path, name
1001473
def get_remote_etag(storage, prefixed_path):
    
    normalized_path = safe_join(storage.location, prefixed_path).replace(
        '\\', '/')
    try:
        return storage.bucket.get_key(normalized_path).etag
    except AttributeError:
        pass
    try:
        return storage.bucket.Object(normalized_path).e_tag
    except:
        pass
    return None
831322
def resolve_remote(self, uri):
        """"""
        try:
            return super(LocalRefResolver, self).resolve_remote(uri)
        except ValueError:
            return super(LocalRefResolver, self).resolve_remote(
                'file://' + get_schema_path(uri.rsplit('.json', 1)[0])
            )
775822
def _get_relative_path(self):
    """"""
    param_string = self._get_query_string()
    if self.path is None:
      path = '/'
    else:
      path = self.path
    if param_string:
      return '?'.join([path, param_string])
    else:
      return path
130324
def key_pair_paths(key_name):
    """"""
    public_key_path = os.path.expanduser("~/.ssh/{}.pub".format(key_name))
    private_key_path = os.path.expanduser("~/.ssh/{}.pem".format(key_name))
    return public_key_path, private_key_path