# HG changeset patch # User Matt Mackall # Date 2014-05-30 18:53:10 # Node ID c08a22bfa16e92aa7163e701cf8d6ea13584c80c # Parent 9c35f3a8cac48b9404ee8dbbda18467f6123b82f 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. diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -352,7 +352,7 @@ def getremotechanges(ui, repo, other, on if not incoming: try: if bundlename: - repo.vfs.unlink(bundlename) + os.unlink(bundlename) except OSError: pass return repo, [], other.close @@ -394,7 +394,7 @@ def getremotechanges(ui, repo, other, on if bundlerepo: bundlerepo.close() if bundle: - repo.vfs.unlink(bundle) + os.unlink(bundle) other.close() return (localrepo, csets, cleanup)