subrepo: use posixpath when diffing, for consistent paths
This fixes a Windows failure in test-subrepo-recursion.t introduced
by
c84ef0047a94.
--- a/mercurial/patch.py Tue Nov 27 13:09:05 2012 -0800
+++ b/mercurial/patch.py Tue Nov 27 14:58:00 2012 -0800
@@ -6,7 +6,7 @@
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
-import cStringIO, email.Parser, os, errno, re
+import cStringIO, email.Parser, os, errno, re, posixpath
import tempfile, zlib, shutil
from i18n import _
@@ -1655,7 +1655,7 @@
copy, getfilectx, opts, losedatafn, prefix):
def join(f):
- return os.path.join(prefix, f)
+ return posixpath.join(prefix, f)
def addmodehdr(header, omode, nmode):
if omode != nmode:
--- a/mercurial/subrepo.py Tue Nov 27 13:09:05 2012 -0800
+++ b/mercurial/subrepo.py Tue Nov 27 14:58:00 2012 -0800
@@ -446,7 +446,7 @@
node2 = node.bin(node2)
cmdutil.diffordiffstat(self._repo.ui, self._repo, diffopts,
node1, node2, match,
- prefix=os.path.join(prefix, self._path),
+ prefix=posixpath.join(prefix, self._path),
listsubrepos=True, **opts)
except error.RepoLookupError, inst:
self._repo.ui.warn(_('warning: error "%s" in subrepository "%s"\n')