--- a/hgext/convert/subversion.py Mon Feb 06 15:22:34 2012 -0600
+++ b/hgext/convert/subversion.py Mon Feb 06 15:22:43 2012 -0600
@@ -197,7 +197,7 @@
proto = 'file'
path = os.path.abspath(url)
if proto == 'file':
- path = path.replace(os.sep, '/')
+ path = util.pconvert(path)
check = protomap.get(proto, lambda *args: False)
while '/' in path:
if check(ui, path, proto):
--- a/hgext/largefiles/lfutil.py Mon Feb 06 15:22:34 2012 -0600
+++ b/hgext/largefiles/lfutil.py Mon Feb 06 15:22:43 2012 -0600
@@ -303,7 +303,7 @@
# 2) Join with '/' because that's what dirstate always uses, even on
# Windows. Change existing separator to '/' first in case we are
# passed filenames from an external source (like the command line).
- return shortname + '/' + filename.replace(os.sep, '/')
+ return shortname + '/' + util.pconvert(filename)
def isstandin(filename):
'''Return true if filename is a big file standin. filename must be
@@ -314,7 +314,7 @@
# Split on / because that's what dirstate always uses, even on Windows.
# Change local separator to / first just in case we are passed filenames
# from an external source (like the command line).
- bits = filename.replace(os.sep, '/').split('/', 1)
+ bits = util.pconvert(filename).split('/', 1)
if len(bits) == 2 and bits[0] == shortname:
return bits[1]
else:
@@ -433,7 +433,7 @@
def unixpath(path):
'''Return a version of path normalized for use with the lfdirstate.'''
- return os.path.normpath(path).replace(os.sep, '/')
+ return util.pconvert(os.path.normpath(path))
def islfilesrepo(repo):
return ('largefiles' in repo.requirements and
--- a/mercurial/bdiff.c Mon Feb 06 15:22:34 2012 -0600
+++ b/mercurial/bdiff.c Mon Feb 06 15:22:43 2012 -0600
@@ -443,7 +443,7 @@
r = PyBytes_AsString(s);
rlen = PyBytes_Size(s);
- w = (char *)malloc(rlen);
+ w = (char *)malloc(rlen ? rlen : 1);
if (!w)
goto nomem;
--- a/mercurial/cmdutil.py Mon Feb 06 15:22:34 2012 -0600
+++ b/mercurial/cmdutil.py Mon Feb 06 15:22:43 2012 -0600
@@ -1224,8 +1224,8 @@
ui.status(_("skipping missing subrepository: %s\n")
% join(subpath))
- for f in match.files():
- if match.exact(f) or not explicitonly:
+ if not explicitonly:
+ for f in match.files():
if f not in repo.dirstate and not os.path.isdir(match.rel(join(f))):
if f not in forgot:
if os.path.exists(match.rel(join(f))):
--- a/mercurial/scmutil.py Mon Feb 06 15:22:34 2012 -0600
+++ b/mercurial/scmutil.py Mon Feb 06 15:22:43 2012 -0600
@@ -468,7 +468,7 @@
_HKEY_LOCAL_MACHINE)
if not isinstance(value, str) or not value:
return rcpath
- value = value.replace('/', os.sep)
+ value = util.localpath(value)
for p in value.split(os.pathsep):
if p.lower().endswith('mercurial.ini'):
rcpath.append(p)
--- a/tests/test-check-code-hg.t Mon Feb 06 15:22:34 2012 -0600
+++ b/tests/test-check-code-hg.t Mon Feb 06 15:22:43 2012 -0600
@@ -1,9 +1,9 @@
$ check_code="$TESTDIR"/../contrib/check-code.py
$ cd "$TESTDIR"/..
- $ "$check_code" `hg manifest` || echo 'FAILURE IS NOT AN OPTION!!!'
+ $ hg manifest | xargs "$check_code" || echo 'FAILURE IS NOT AN OPTION!!!'
- $ "$check_code" --warnings --nolineno --per-file=0 `hg manifest`
+ $ hg manifest | xargs "$check_code" --warnings --nolineno --per-file=0
contrib/check-code.py:0:
> # (r'^\s+[^_ \n][^_. \n]+_[^_\n]+\s*=', "don't use underbars in identifiers"),
warning: line over 80 characters
@@ -654,4 +654,4 @@
tests/test-walkrepo.py:0:
> print "Found %d repositories when I should have found 3" % (len(reposet),)
warning: line over 80 characters
- [1]
+ [123]
--- a/tests/test-subrepo-recursion.t Mon Feb 06 15:22:34 2012 -0600
+++ b/tests/test-subrepo-recursion.t Mon Feb 06 15:22:43 2012 -0600
@@ -193,10 +193,14 @@
$ hg add foo/bar/z2.txt
$ hg status -S
A foo/bar/z2.txt
-This is expected to forget the file, but is currently broken
$ hg forget foo/bar/z2.txt
$ hg status -S
? foo/bar/z2.txt
+ $ hg forget foo/bar/z2.txt
+ not removing foo/bar/z2.txt: file is already untracked
+ [1]
+ $ hg status -S
+ ? foo/bar/z2.txt
$ rm foo/bar/z2.txt
Log with the relationships between repo and its subrepo: