bundlerepo: backout dbf292f65b09
According to foozy:
This patch should be backed out, because "bundlename" and "bundle" in
this case are not relative paths to the root of repositories.
The former is specified via "hg incoming --bundle BUNDLENAME"
(relative path to cwd, or absolute one), and the latter is generated
in "changegroup.writebundle" by "tempfile.mkstemp" for internal
temporary usage (absolute path).
To be exact, the latter hunk in this patch can be applied, because
"os.join" for two absolute paths can generate correct result. But the
former hunk can't, because it may unexpected result, if specified path
is relative to cwd and cwd != root.
--- a/mercurial/bundlerepo.py Mon May 26 11:44:58 2014 -0700
+++ b/mercurial/bundlerepo.py Fri May 30 11:53:10 2014 -0700
@@ -352,7 +352,7 @@
if not incoming:
try:
if bundlename:
- repo.vfs.unlink(bundlename)
+ os.unlink(bundlename)
except OSError:
pass
return repo, [], other.close
@@ -394,7 +394,7 @@
if bundlerepo:
bundlerepo.close()
if bundle:
- repo.vfs.unlink(bundle)
+ os.unlink(bundle)
other.close()
return (localrepo, csets, cleanup)