def _create_file_internal(self, sha1, parent1=NULL_NODE_ID, parent2=NULL_NODE_ID): hg_file = File() hg_file.content = GitHgHelper.cat_file(b'blob', sha1) FileFindParents.set_parents(hg_file, parent1, parent2) node = hg_file.node = hg_file.sha1 GitHgHelper.set(b'file', node, sha1) return hg_file
def _create_file_internal(self, sha1, parent1=NULL_NODE_ID, parent2=NULL_NODE_ID, git_manifest_parents=None, path=None): hg_file = File() hg_file.content = GitHgHelper.cat_file('blob', sha1) FileFindParents.set_parents( hg_file, parent1, parent2, git_manifest_parents=git_manifest_parents, path=path) node = hg_file.node = hg_file.sha1 GitHgHelper.set('file', node, sha1) return hg_file