[PATCH 2 of 2] largefiles: drop os.path.join() in subrepo archive override
Matt Harbison
mharbison72 at gmail.com
Tue May 5 22:54:10 CDT 2015
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1430795052 14400
# Mon May 04 23:04:12 2015 -0400
# Node ID b10b7c0fb31417b1d129d00da6b27fc6bc419456
# Parent 7d27fb197d23993b076d485f8ae5884ec2e5bcca
largefiles: drop os.path.join() in subrepo archive override
This is related to 41cd8171e58f, but not required for that to function correctly
because 'prefix' always ends with '/', so os.path.join(prefix, _path) simply
concatenates the strings. Take the opportunity to drop the os.path usage, and
avoid confusion by using the same pattern as the overridden subrepo method.
diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -985,7 +985,7 @@
for subpath in sorted(ctx.substate):
sub = ctx.sub(subpath)
submatch = match_.narrowmatcher(subpath, match)
- sub.archive(archiver, os.path.join(prefix, repo._path) + '/', submatch)
+ sub.archive(archiver, prefix + repo._path + '/', submatch)
# If a largefile is modified, the change is not reflected in its
# standin until a commit. cmdutil.bailifchanged() raises an exception
More information about the Mercurial-devel
mailing list