def filectxfn(repo, memctx, path): current_file = files[path] try: data, isexec, islink, copied = current.pop(current_file) except IOError: return compathacks.filectxfn_deleted_reraise(memctx) if isexec is None or islink is None: flags = parentctx.flags(path) if isexec is None: isexec = 'x' in flags if islink is None: islink = 'l' in flags if data is not None: if islink: if data.startswith('link '): data = data[len('link '):] else: ui.debug('file marked as link, but may contain data: ' '%s\n' % current_file) else: data = parentctx.filectx(path).data() return compathacks.makememfilectx(repo, path=path, data=data, islink=islink, isexec=isexec, copied=copied)
def fctxfun(repo, memctx, path): return compathacks.makememfilectx(repo, path='.hgtags', data=src, islink=False, isexec=False, copied=None)
def hgtagsfn(repo, memctx, path): assert path == '.hgtags' return compathacks.makememfilectx(repo, path=path, data=tagdata, islink=False, isexec=False, copied=False)
def filectxfn(repo, memctx, path): if path in externals: if externals[path] is None: raise IOError(errno.ENOENT, 'no externals') return compathacks.makememfilectx(repo, path=path, data=externals[path], islink=False, isexec=False, copied=None) for bad in bad_branch_paths[b]: if path.startswith(bad): raise IOError(errno.ENOENT, 'Path %s is bad' % path) return filectxfn2(repo, memctx, path)
def filectxfn(repo, memctx, path): svnpath = path if branchpath: svnpath = branchpath + '/' + path try: data, mode = svn.get_file(svnpath, r.revnum) except IOError: return compathacks.filectxfn_deleted_reraise(memctx) isexec = 'x' in mode islink = 'l' in mode copied = copies.get(path) # TODO this branch feels like it should not be required, # and this may actually imply a bug in getcopies if copied not in parentctx.manifest(): copied = None return compathacks.makememfilectx(repo, path=path, data=data, islink=islink, isexec=isexec, copied=copied)
def filectxfn(repo, memctx, path): if path in files_data and files_data[path] is None: return compathacks.filectxfn_deleted(memctx, path) if path in binary_files or path in unknown_files: pa = path if branchpath: pa = branchpath + '/' + path try: data, mode = svn.get_file(pa, r.revnum) except IOError: return compathacks.filectxfn_deleted_reraise(memctx) isexe = 'x' in mode islink = 'l' in mode else: isexe = exec_files.get(path, 'x' in parentctx.flags(path)) islink = link_files.get(path, 'l' in parentctx.flags(path)) data = '' if path in files_data: data = files_data[path] if islink: data = data[len('link '):] elif path in parentctx: data = parentctx[path].data() copied = copies.get(path) # TODO this branch feels like it should not be required, # and this may actually imply a bug in getcopies if copied not in parentctx.manifest(): copied = None return compathacks.makememfilectx(repo, path=path, data=data, islink=islink, isexec=isexe, copied=copied)