changeset 10809:da3b4b7a45ce stable

Merge with i18n
author Matt Mackall <mpm@selenic.com>
date Thu, 01 Apr 2010 17:40:47 -0500
parents 1ebba857b371 (current diff) 6e4cf8319f54 (diff)
children 2b01dab59416
files hgext/mq.py
diffstat 12 files changed, 33 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Thu Apr 01 19:32:08 2010 -0300
+++ b/contrib/check-code.py	Thu Apr 01 17:40:47 2010 -0500
@@ -53,6 +53,7 @@
     (r'\$PWD', "don't use $PWD, use `pwd`"),
     (r'[^\n]\Z', "no trailing newline"),
     (r'export.*=', "don't export and assign at once"),
+    ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"),
 ]
 
 testfilters = [
--- a/hgext/acl.py	Thu Apr 01 19:32:08 2010 -0300
+++ b/hgext/acl.py	Thu Apr 01 17:40:47 2010 -0500
@@ -63,7 +63,7 @@
         return None
 
     pats = [pat for pat, users in ui.configitems(key)
-            if user in users.replace(',', ' ').split()]
+            if users == '*' or user in users.replace(',', ' ').split()]
     ui.debug('acl: %s enabled, %d entries for user %s\n' %
              (key, len(pats), user))
     if pats:
--- a/hgext/convert/cvs.py	Thu Apr 01 19:32:08 2010 -0300
+++ b/hgext/convert/cvs.py	Thu Apr 01 17:40:47 2010 -0500
@@ -227,6 +227,7 @@
         self.writep.flush()
 
         data = ""
+        mode = None
         while 1:
             line = self.readp.readline()
             if line.startswith("Created ") or line.startswith("Updated "):
@@ -244,6 +245,8 @@
                 data = chunkedread(self.readp, count)
             else:
                 if line == "ok\n":
+                    if mode is None:
+                        raise util.Abort(_('malformed response from CVS'))
                     return (data, "x" in mode and "x" or "")
                 elif line.startswith("E "):
                     self.ui.warn(_("cvs server: %s\n") % line[2:])
--- a/hgext/mq.py	Thu Apr 01 19:32:08 2010 -0300
+++ b/hgext/mq.py	Thu Apr 01 17:40:47 2010 -0500
@@ -2668,9 +2668,10 @@
     entry = extensions.wrapcommand(commands.table, 'init', mqinit)
     entry[1].extend(mqopt)
 
+    norepo = commands.norepo.split(" ")
     for cmd in commands.table.keys():
         cmd = cmdutil.parsealiases(cmd)[0]
-        if cmd in commands.norepo:
+        if cmd in norepo:
             continue
         entry = extensions.wrapcommand(commands.table, cmd, mqcommand)
         entry[1].extend(mqopt)
--- a/hgext/share.py	Thu Apr 01 19:32:08 2010 -0300
+++ b/hgext/share.py	Thu Apr 01 17:40:47 2010 -0500
@@ -9,7 +9,7 @@
 from mercurial import hg, commands
 
 def share(ui, source, dest=None, noupdate=False):
-    """create a new shared repository (experimental)
+    """create a new shared repository
 
     Initialize a new repository and working directory that shares its
     history with another repository.
--- a/mercurial/dispatch.py	Thu Apr 01 19:32:08 2010 -0300
+++ b/mercurial/dispatch.py	Thu Apr 01 17:40:47 2010 -0500
@@ -194,6 +194,7 @@
 
         args = shlex.split(self.definition)
         cmd = args.pop(0)
+        args = map(util.expandpath, args)
 
         try:
             tableentry = cmdutil.findcmd(cmd, cmdtable, False)[1]
--- a/mercurial/url.py	Thu Apr 01 19:32:08 2010 -0300
+++ b/mercurial/url.py	Thu Apr 01 17:40:47 2010 -0500
@@ -145,6 +145,8 @@
                 continue
             group, setting = key.split('.', 1)
             gdict = config.setdefault(group, dict())
+            if setting in ('cert', 'key'):
+                val = util.expandpath(val)
             gdict[setting] = val
 
         # Find the best match
--- a/tests/test-alias	Thu Apr 01 19:32:08 2010 -0300
+++ b/tests/test-alias	Thu Apr 01 17:40:47 2010 -0500
@@ -13,6 +13,7 @@
 shortlog = log --template '{rev} {node|short} | {date|isodate}\n'
 dln = lognull --debug
 nousage = rollback
+put = export -r 0 -o "\$PWD/%R.diff"
 
 [defaults]
 mylog = -q
@@ -59,3 +60,7 @@
 
 echo '% properly recursive'
 hg dln
+
+echo '% path expanding'
+hg put
+cat 0.diff
--- a/tests/test-alias.out	Thu Apr 01 19:32:08 2010 -0300
+++ b/tests/test-alias.out	Thu Apr 01 17:40:47 2010 -0500
@@ -30,3 +30,16 @@
 date:        Thu Jan 01 00:00:00 1970 +0000
 extra:       branch=default
 
+% path expanding
+# HG changeset patch
+# User test
+# Date 0 0
+# Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0
+# Parent  0000000000000000000000000000000000000000
+foo
+
+diff -r 000000000000 -r e63c23eaa88a foo
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/foo	Thu Jan 01 00:00:00 1970 +0000
+@@ -0,0 +1,1 @@
++foo
--- a/tests/test-convert-baz	Thu Apr 01 19:32:08 2010 -0300
+++ b/tests/test-convert-baz	Thu Apr 01 17:40:47 2010 -0500
@@ -30,7 +30,7 @@
 dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null
 baz add b
 # HACK: hide GNU tar-1.22 "tar: The --preserve option is deprecated, use --preserve-permissions --preserve-order instead"
-baz commit -s "added a file, src and src/b (binary)" 2>&1 | grep -v ^tar
+baz commit -s "added a file, src and src/b (binary)" 2>&1 | grep -v '^tar'
 
 echo % create link file and modify a
 ln -s ../a a-link
--- a/tests/test-convert-cvs-synthetic	Thu Apr 01 19:32:08 2010 -0300
+++ b/tests/test-convert-cvs-synthetic	Thu Apr 01 17:40:47 2010 -0500
@@ -110,7 +110,7 @@
 
 echo "% convert to hg (#2: with merge detection)"
 filterpath hg convert \
-  --config convert.cvsps.mergefrom="\"^MERGE from (\S+):\"" \
+  --config convert.cvsps.mergefrom='"^MERGE from (\S+):"' \
   --datesort \
   proj proj.hg2
 
--- a/tests/test-subrepo-svn	Thu Apr 01 19:32:08 2010 -0300
+++ b/tests/test-subrepo-svn	Thu Apr 01 17:40:47 2010 -0500
@@ -14,6 +14,7 @@
 if [ $? -ne 0 ]; then
     escapedwd="/$escapedwd"
 fi
+escapedwd=`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$escapedwd"`
 filterpath="s|$escapedwd|/root|"
 filtersvn='s/ in transaction.*/ is out of date/;s/Out of date: /File /'
 
@@ -33,7 +34,7 @@
 svn ci -m 'Add alpha'
 svn up
 cat > extdef <<EOF
-externals -r1 "$SVNREPO/externals"
+externals -r1 $SVNREPO/externals
 EOF
 svn propset -F extdef svn:externals src
 svn ci -m 'Setting externals'