Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)
Spaces are allowed in mercurial, but not in git. We convert them to
the unlikely string ___

        def hg_to_git_spaces(name):
    '''Spaces are allowed in mercurial, but not in git. We convert them to
    the unlikely string ___'''
    return name.replace(' ', '___')
        


src/g/i/gitifyhg-0.8.4/gitifyhg/gitifyhg.py   gitifyhg(Download)
from mercurial.bookmarks import listbookmarks, readcurrent
 
from .util import (log, die, output, branch_head, GitMarks,
    HGMarks, hg_to_git_spaces, name_reftype_to_ref, BRANCH, BOOKMARK, TAG,
    version, deactivate_stdout)
            output("%s %s" %
                    (self._change_hash(branch_head(self, branch)),
                     name_reftype_to_ref(hg_to_git_spaces(branch), BRANCH)))
 
        # list the bookmark references
        for bookmark, changectx in self.bookmarks.items():
            if bookmark != "master":
                output("%s %s" %
                        (self._change_hash(changectx),
                         name_reftype_to_ref(hg_to_git_spaces(bookmark), BOOKMARK)))
                output("%s %s" %
                        (self._change_hash(self.repo[node]),
                         name_reftype_to_ref(hg_to_git_spaces(tag), TAG)))
 
        output()

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)