Skip to content

Commit bc1d173

Browse files
committed
Bug fix for exporting to relative pathnames
1 parent 0dc9577 commit bc1d173

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vcs_repo_mgr/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,10 @@ def export(self, directory, revision=None):
12741274
:param revision: The revision to export (a string or :data:`None`,
12751275
defaults to :attr:`default_revision`).
12761276
"""
1277+
# Make sure we're dealing with an absolute pathname (because a relative
1278+
# pathname would be interpreted as relative to the repository's main
1279+
# directory, which isn't necessarily what the caller expects).
1280+
directory = os.path.abspath(directory)
12771281
# Make sure the local repository exists.
12781282
self.create()
12791283
# Export the tree from the local repository.

0 commit comments

Comments
 (0)