Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
Fills OrderedDict with hgsub file content passed as list of lines

        def parse_hgsub(lines):
    """Fills OrderedDict with hgsub file content passed as list of lines"""
    rv = OrderedDict()
    for l in lines:
        ls = l.strip();
        if not ls or ls[0] == '#': continue
        name, value = l.split('=', 1)
        rv[name.strip()] = value.strip()
    return rv
        


src/h/g/hg-git-HEAD/hggit/git_handler.py   hg-git(Download)
        gitmodules = self.parse_gitmodules(git_commit_tree)
        if gitmodules:
            hgsub = util.parse_hgsub(self.git_file_readlines(git_commit_tree, '.hgsub'))
            for (sm_path, sm_url, sm_name) in gitmodules:
                hgsub[sm_path] = '[git]' + sm_url

src/h/g/hg-git-HEAD/hggit/hg2git.py   hg-git(Download)
def parse_subrepos(ctx):
    sub = util.OrderedDict()
    if '.hgsub' in ctx:
        sub = util.parse_hgsub(ctx['.hgsub'].data().splitlines())
    substate = util.OrderedDict()

src/h/g/hg-git-0.5.0/hggit/hg2git.py   hg-git(Download)
 
        if '.hgsub' in ctx:
            sub = util.parse_hgsub(ctx['.hgsub'].data().splitlines())
 
        for path, sha in substate.iteritems():

src/h/g/hg-git-0.5.0/hggit/git_handler.py   hg-git(Download)
        gitmodules = self.parse_gitmodules(git_commit_tree)
        if gitmodules or gitlinks:
            hgsub = util.parse_hgsub(self.git_file_readlines(git_commit_tree, '.hgsub'))
            for (sm_path, sm_url, sm_name) in gitmodules:
                hgsub[sm_path] = '[git]' + sm_url