changeset 19327:cf1b0a58a0de

merge with stable
author Matt Mackall <mpm@selenic.com>
date Fri, 21 Jun 2013 15:31:40 -0500
parents 7014526d67a8 (current diff) ec17ddecdf64 (diff)
children 84dc9669bd71
files tests/test-pathencode.py
diffstat 3 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/doc/hgrc.5.txt	Mon Jun 17 19:44:00 2013 -0700
+++ b/doc/hgrc.5.txt	Fri Jun 21 15:31:40 2013 -0500
@@ -16,8 +16,8 @@
    :class: htmlonly
 
 
-Synopsis
-========
+Description
+===========
 
 .. include:: ../mercurial/help/config.txt
 
--- a/mercurial/pathencode.c	Mon Jun 17 19:44:00 2013 -0700
+++ b/mercurial/pathencode.c	Fri Jun 21 15:31:40 2013 -0500
@@ -585,7 +585,8 @@
 			   in a space or dot, which are unportable. */
 			if (d == '.' || d == ' ')
 				dest[destlen - 1] = '_';
-			if (destlen > maxshortdirslen)
+			/* The + 3 is to account for "dh/" in the beginning */
+			if (destlen > maxshortdirslen + 3)
 				break;
 			charcopy(dest, &destlen, destsize, src[i]);
 			p = -1;
--- a/tests/test-pathencode.py	Mon Jun 17 19:44:00 2013 -0700
+++ b/tests/test-pathencode.py	Fri Jun 21 15:31:40 2013 -0500
@@ -124,7 +124,8 @@
     p = pickfrom(rng, firsttable)(rng)
     l = len(p)
     ps = [p]
-    while l <= k:
+    maxl = rng.randint(1, k)
+    while l < maxl:
         p = pickfrom(rng, resttable)(rng)
         l += len(p)
         ps.append(p)