|
@@ -207,7 +207,7 @@ def path_to_tree_path(repopath, path):
|
|
repopath = os.fsencode(repopath)
|
|
repopath = os.fsencode(repopath)
|
|
treepath = os.path.relpath(path, repopath)
|
|
treepath = os.path.relpath(path, repopath)
|
|
if treepath.startswith(b'..'):
|
|
if treepath.startswith(b'..'):
|
|
- raise ValueError('Path not in repo')
|
|
|
|
|
|
+ raise ValueError('Path %r not in repo path (%r)' % (path, repopath))
|
|
if os.path.sep != '/':
|
|
if os.path.sep != '/':
|
|
treepath = treepath.replace(os.path.sep.encode('ascii'), b'/')
|
|
treepath = treepath.replace(os.path.sep.encode('ascii'), b'/')
|
|
return treepath
|
|
return treepath
|