Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def gitmode(flags):
    if 'l' in flags:
        return '120000'
    elif 'x' in flags:
        return '100755'
    else:
        return '100644'
        


src/g/i/gitifyhg-0.8.4/gitifyhg/hgimporter.py   gitifyhg(Download)
from mercurial import encoding
 
from .util import (log, output, gittz, gitmode,
    git_to_hg_spaces, hg_to_git_spaces, branch_head, ref_to_name_reftype,
    BRANCH, BOOKMARK, TAG, relative_path)
                data = filecontext.data()
                output("M %s inline %s" % (
                    gitmode(filecontext.flags()), relative_path(filecontext.path())))
                output("data %d" % len(data))
                output(data)