changeset 12789:24999db620cd

Merge with mpm
author Steve Borho <steve@borho.org>
date Wed, 20 Oct 2010 15:36:42 -0500
parents de793925862e (current diff) e8a8993b625e (diff)
children 6c619c2e8778
files
diffstat 9 files changed, 36 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Tue Oct 19 22:33:52 2010 -0500
+++ b/contrib/check-code.py	Wed Oct 20 15:36:42 2010 -0500
@@ -74,6 +74,7 @@
 uprefix = r"^  \$ "
 uprefixc = r"^  > "
 utestpats = [
+    (r'^(\S|  $ ).*(\S\s+|^\s+)\n', "trailing whitespace on non-output"),
     (uprefix + r'.*\|\s*sed', "use regex test output patterns instead of sed"),
     (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"),
     (uprefix + r'.*\$\?', "explicit exit code checks unnecessary"),
--- a/mercurial/revset.py	Tue Oct 19 22:33:52 2010 -0500
+++ b/mercurial/revset.py	Wed Oct 20 15:36:42 2010 -0500
@@ -193,21 +193,21 @@
 def p1(repo, subset, x):
     ps = set()
     cl = repo.changelog
-    for r in getset(repo, subset, x):
+    for r in getset(repo, range(len(repo)), x):
         ps.add(cl.parentrevs(r)[0])
     return [r for r in subset if r in ps]
 
 def p2(repo, subset, x):
     ps = set()
     cl = repo.changelog
-    for r in getset(repo, subset, x):
+    for r in getset(repo, range(len(repo)), x):
         ps.add(cl.parentrevs(r)[1])
     return [r for r in subset if r in ps]
 
 def parents(repo, subset, x):
     ps = set()
     cl = repo.changelog
-    for r in getset(repo, subset, x):
+    for r in getset(repo, range(len(repo)), x):
         ps.update(cl.parentrevs(r))
     return [r for r in subset if r in ps]
 
@@ -238,7 +238,7 @@
 def children(repo, subset, x):
     cs = set()
     cl = repo.changelog
-    s = set(getset(repo, subset, x))
+    s = set(getset(repo, range(len(repo)), x))
     for r in xrange(0, len(repo)):
         for p in cl.parentrevs(r):
             if p in s:
--- a/tests/test-convert-cvs-branch.t	Tue Oct 19 22:33:52 2010 -0500
+++ b/tests/test-convert-cvs-branch.t	Wed Oct 20 15:36:42 2010 -0500
@@ -42,7 +42,7 @@
   $ cvscall up -r BRANCH > /dev/null
   cvs update: Updating .
 
-Modify file a, then b, then a 
+Modify file a, then b, then a
 
   $ sleep 1
   $ echo "2" > a
--- a/tests/test-convert.t	Tue Oct 19 22:33:52 2010 -0500
+++ b/tests/test-convert.t	Wed Oct 20 15:36:42 2010 -0500
@@ -121,7 +121,7 @@
       to a named branch.
   
       Mercurial Source
-      ----------------
+      ''''''''''''''''
   
       --config convert.hg.ignoreerrors=False    (boolean)
           ignore integrity errors when reading. Use it to fix Mercurial
@@ -135,7 +135,7 @@
           convert start revision and its descendants
   
       CVS Source
-      ----------
+      ''''''''''
   
       CVS source will use a sandbox (i.e. a checked-out copy) from CVS to
       indicate the starting point of what will be converted. Direct access to
@@ -187,7 +187,7 @@
       more details.
   
       Subversion Source
-      -----------------
+      '''''''''''''''''
   
       Subversion source detects classical trunk/branches/tags layouts. By
       default, the supplied "svn://repo/path/" source URL is converted as a
@@ -216,7 +216,7 @@
           specify start Subversion revision.
   
       Perforce Source
-      ---------------
+      '''''''''''''''
   
       The Perforce (P4) importer can be given a p4 depot path or a client
       specification as source. It will convert all files in the source to a flat
@@ -231,7 +231,7 @@
           specify initial Perforce revision.
   
       Mercurial Destination
-      ---------------------
+      '''''''''''''''''''''
   
       --config convert.hg.clonebranches=False   (boolean)
           dispatch source branches in separate clones.
--- a/tests/test-globalopts.t	Tue Oct 19 22:33:52 2010 -0500
+++ b/tests/test-globalopts.t	Wed Oct 20 15:36:42 2010 -0500
@@ -339,6 +339,7 @@
    multirevs    Specifying Multiple Revisions
    revsets      Specifying Revision Sets
    diffs        Diff Formats
+   merge-tools  Merge Tools
    templating   Template Usage
    urls         URL Paths
    extensions   Using additional features
@@ -413,6 +414,7 @@
    multirevs    Specifying Multiple Revisions
    revsets      Specifying Revision Sets
    diffs        Diff Formats
+   merge-tools  Merge Tools
    templating   Template Usage
    urls         URL Paths
    extensions   Using additional features
--- a/tests/test-help.t	Tue Oct 19 22:33:52 2010 -0500
+++ b/tests/test-help.t	Wed Oct 20 15:36:42 2010 -0500
@@ -110,6 +110,7 @@
    multirevs    Specifying Multiple Revisions
    revsets      Specifying Revision Sets
    diffs        Diff Formats
+   merge-tools  Merge Tools
    templating   Template Usage
    urls         URL Paths
    extensions   Using additional features
@@ -180,6 +181,7 @@
    multirevs    Specifying Multiple Revisions
    revsets      Specifying Revision Sets
    diffs        Diff Formats
+   merge-tools  Merge Tools
    templating   Template Usage
    urls         URL Paths
    extensions   Using additional features
@@ -702,6 +704,7 @@
    multirevs    Specifying Multiple Revisions
    revsets      Specifying Revision Sets
    diffs        Diff Formats
+   merge-tools  Merge Tools
    templating   Template Usage
    urls         URL Paths
    extensions   Using additional features
--- a/tests/test-push-warn.t	Tue Oct 19 22:33:52 2010 -0500
+++ b/tests/test-push-warn.t	Wed Oct 20 15:36:42 2010 -0500
@@ -336,7 +336,7 @@
   added 1 changesets with 1 changes to 1 files
 
 
-Checking prepush logic does not allow silently pushing 
+Checking prepush logic does not allow silently pushing
 multiple new heads:
 
   $ cd ..
@@ -480,7 +480,7 @@
   $ hg ci -Ama2
   adding a2
 
-a2 is now the new branch head of A, and a new topological head 
+a2 is now the new branch head of A, and a new topological head
 it replaces a former inner branch head, so it should at most warn about
 A, not B
 
--- a/tests/test-rebase-mq-skip.t	Tue Oct 19 22:33:52 2010 -0500
+++ b/tests/test-rebase-mq-skip.t	Wed Oct 20 15:36:42 2010 -0500
@@ -1,4 +1,4 @@
-This emulates the effects of an hg pull --rebase in which the remote repo 
+This emulates the effects of an hg pull --rebase in which the remote repo
 already has one local mq patch
 
   $ cat >> $HGRCPATH <<EOF
--- a/tests/test-revset.t	Tue Oct 19 22:33:52 2010 -0500
+++ b/tests/test-revset.t	Wed Oct 20 15:36:42 2010 -0500
@@ -339,3 +339,20 @@
   0
   $ log '4::8 - 8'
   4
+
+issue2437
+
+  $ log '3 and p1(5)'
+  3
+  $ log '4 and p2(6)'
+  4
+  $ log '1 and parents(:2)'
+  1
+  $ log '2 and children(1:)'
+  2
+  $ log 'roots(all()) or roots(all())'
+  0
+  $ log 'heads(branch(é)) or heads(branch(é))'
+  9
+  $ log 'ancestors(8) and (heads(branch("-a-b-c-")) or heads(branch(é)))'
+  4