159
159
def generate_file_id(self, path):
160
160
# Git paths are just bytestrings
161
161
# We must just hope they are valid UTF-8..
164
162
if isinstance(path, text_type):
165
163
path = path.encode("utf-8")
166
166
return FILE_ID_PREFIX + escape_file_id(path)
168
168
def parse_file_id(self, file_id):
171
171
if not file_id.startswith(FILE_ID_PREFIX):
175
175
def revid_as_refname(self, revid):
176
176
if not isinstance(revid, bytes):