drwxr-xr-x
|
| [up]
diff -r 1774c037fbd2 -r d6b9c3a03268 templates/raw/index.tmpl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/raw/index.tmpl Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,2 @@
+#header#
+#entries%indexentry#
diff -r 1774c037fbd2 -r d6b9c3a03268 templates/raw/manifest.tmpl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/raw/manifest.tmpl Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,3 @@
+{header}
+{dentries%manifestdirentry}{fentries%manifestfileentry}
+{footer}
diff -r 1774c037fbd2 -r d6b9c3a03268 templates/raw/map
--- a/templates/raw/map Mon Jun 04 09:16:53 2007 -0500
+++ b/templates/raw/map Mon Jun 04 22:56:42 2007 +0200
@@ -14,3 +14,8 @@
filediff = filediff.tmpl
fileannotate = fileannotate.tmpl
annotateline = '#author#@#rev#: #line#'
+manifest = manifest.tmpl
+manifestdirentry = 'drwxr-xr-x {basename}\n'
+manifestfileentry = '{permissions|permissions} {size} {basename}\n'
+index = index.tmpl
+indexentry = '#url#\n'
diff -r 1774c037fbd2 -r d6b9c3a03268 templates/search.tmpl
--- a/templates/search.tmpl Mon Jun 04 09:16:53 2007 -0500
+++ b/templates/search.tmpl Mon Jun 04 22:56:42 2007 +0200
@@ -8,6 +8,7 @@
shortlog
tags
manifest
+#archives%archiveentry#
searching for #query|escape#
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/README
--- a/tests/README Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/README Mon Jun 04 22:56:42 2007 +0200
@@ -1,93 +1,7 @@
-A simple testing framework
-
To run the tests, do:
cd tests/
python run-tests.py
-This finds all scripts in the test directory named test-* and executes
-them. The scripts can be either shell scripts or Python. Each test is
-run in a temporary directory that is removed when the test is complete.
-
-A test- succeeds if the script returns success and its output
-matches test-.out. If the new output doesn't match, it is stored in
-test-.err.
-
-There are some tricky points here that you should be aware of when
-writing tests:
-
-- hg commit and hg merge want user interaction
-
- for commit use -m "text"
- for hg merge, set HGMERGE to something noninteractive (like true or merge)
-
-- changeset hashes will change based on user and date which make
- things like hg history output change
-
- use commit -m "test" -u test -d "1000000 0"
-
-- diff and export may show the current time
-
- use -D/--nodates to strip the dates
-
-- You can append your own hgrc settings to the file that the environment
- variable HGRCPATH points to. This file is cleared before running a test.
-
-You also need to be careful that the tests are portable from one platform
-to another. You're probably working on Linux, where the GNU toolchain has
-more (or different) functionality than on MacOS, *BSD, Solaris, AIX, etc.
-While testing on all platforms is the only sure-fire way to make sure that
-you've written portable code, here's a list of problems that have been
-found and fixed in the tests. Another, more comprehensive list may be
-found in the GNU Autoconf manual, online here:
-
- http://www.gnu.org/software/autoconf/manual/html_node/Portable-Shell.html
-
-sh:
-
-The Bourne shell is a very basic shell. /bin/sh on Linux is typically
-bash, which even in Bourne-shell mode has many features that Bourne shells
-on other Unix systems don't have (and even on Linux /bin/sh isn't
-guaranteed to be bash). You'll need to be careful about constructs that
-seem ubiquitous, but are actually not available in the least common
-denominator. While using another shell (ksh, bash explicitly, posix shell,
-etc.) explicitly may seem like another option, these may not exist in a
-portable location, and so are generally probably not a good idea. You may
-find that rewriting the test in python will be easier.
-
-- don't use pushd/popd; save the output of "pwd" and use "cd" in place of
- the pushd, and cd back to the saved pwd instead of popd.
-
-- don't use math expressions like let, (( ... )), or $(( ... )); use "expr"
- instead.
-
-grep:
-
-- don't use the -q option; redirect stdout to /dev/null instead.
-
-- don't use extended regular expressions with grep; use egrep instead, and
- don't escape any regex operators.
-
-sed:
-
-- make sure that the beginning-of-line matcher ("^") is at the very
- beginning of the expression -- it may not be supported inside parens.
-
-echo:
-
-- echo may interpret "\n" and print a newline; use printf instead if you
- want a literal "\n" (backslash + n).
-
-false:
-
-- false is guaranteed only to return a non-zero value; you cannot depend on
- it being 1. On Solaris in particular, /bin/false returns 255. Rewrite
- your test to not depend on a particular return value, or create a
- temporary "false" executable, and call that instead.
-
-diff:
-
-- don't use the -N option. There's no particularly good workaround short
- of writing a reasonably complicated replacement script, but substituting
- gdiff for diff if you can't rewrite the test not to need -N will probably
- do.
+See http://www.selenic.com/mercurial/wiki/index.cgi/WritingTests for
+more information on writing tests.
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/printenv.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/printenv.py Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,44 @@
+# simple script to be used in hooks
+# copy it to the current directory when the test starts:
+#
+# cp "$TESTDIR"/printenv.py .
+#
+# put something like this in the repo .hg/hgrc:
+#
+# [hooks]
+# changegroup = python ../printenv.py [exit] [output]
+#
+# - is a mandatory argument (e.g. "changegroup")
+# - [exit] is the exit code of the hook (default: 0)
+# - [output] is the name of the output file (default: use sys.stdout)
+# the file will be opened in append mode.
+#
+import os
+import sys
+
+exitcode = 0
+out = sys.stdout
+
+name = sys.argv[1]
+if len(sys.argv) > 2:
+ exitcode = int(sys.argv[2])
+ if len(sys.argv) > 3:
+ out = open(sys.argv[3], "ab")
+
+env = [v for v in os.environ if v.startswith("HG_")]
+env.sort()
+
+# edit the variable part of the variable
+url = os.environ.get("HG_URL", "")
+if url.startswith("file:"):
+ os.environ["HG_URL"] = "file:"
+elif url.startswith("remote:http"):
+ os.environ["HG_URL"] = "remote:http"
+
+out.write("%s hook: " % name)
+for v in env:
+ out.write("%s=%s " % (v, os.environ[v]))
+out.write("\n")
+out.close()
+
+sys.exit(exitcode)
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/run-tests.py
--- a/tests/run-tests.py Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/run-tests.py Mon Jun 04 22:56:42 2007 +0200
@@ -19,7 +19,7 @@
import tempfile
import time
-required_tools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed", "merge"]
+required_tools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"]
parser = optparse.OptionParser("%prog [options] [tests]")
parser.add_option("-v", "--verbose", action="store_true",
@@ -340,17 +340,19 @@
os.environ['LANG'] = os.environ['LC_ALL'] = 'C'
os.environ['TZ'] = 'GMT'
-os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"'
-os.environ["HGMERGE"] = sys.executable + ' -c "import sys; sys.exit(0)"'
-os.environ["HGUSER"] = "test"
-os.environ["HGENCODING"] = "ascii"
-os.environ["HGENCODINGMODE"] = "strict"
-
TESTDIR = os.environ["TESTDIR"] = os.getcwd()
HGTMP = os.environ["HGTMP"] = tempfile.mkdtemp("", "hgtests.")
DAEMON_PIDS = os.environ["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids')
HGRCPATH = os.environ["HGRCPATH"] = os.path.join(HGTMP, '.hgrc')
+os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"'
+os.environ["HGMERGE"] = ('python "%s" -L my -L other'
+ % os.path.join(TESTDIR, os.path.pardir, 'contrib',
+ 'simplemerge'))
+os.environ["HGUSER"] = "test"
+os.environ["HGENCODING"] = "ascii"
+os.environ["HGENCODINGMODE"] = "strict"
+
vlog("# Using TESTDIR", TESTDIR)
vlog("# Using HGTMP", HGTMP)
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-abort-checkin
--- a/tests/test-abort-checkin Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-abort-checkin Mon Jun 04 22:56:42 2007 +0200
@@ -1,12 +1,19 @@
#!/bin/sh
+cat > abortcommit.py <> $HGRCPATH
echo "mq=" >> $HGRCPATH
-cat > $HGTMP/false <> $HGRCPATH
hg init foo
cd foo
@@ -15,7 +22,7 @@
# mq may keep a reference to the repository so __del__ will not be called
# and .hg/journal.dirstate will not be deleted:
-HGEDITOR=$HGTMP/false hg ci
-HGEDITOR=$HGTMP/false hg ci
+hg ci -m foo
+hg ci -m foo
exit 0
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-abort-checkin.out
--- a/tests/test-abort-checkin.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-abort-checkin.out Mon Jun 04 22:56:42 2007 +0200
@@ -1,6 +1,8 @@
-abort: edit failed: false exited with status 1
+error: pretxncommit.nocommits hook failed: no commits allowed
+abort: no commits allowed
transaction abort!
rollback completed
-abort: edit failed: false exited with status 1
+error: pretxncommit.nocommits hook failed: no commits allowed
+abort: no commits allowed
transaction abort!
rollback completed
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-acl
--- a/tests/test-acl Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-acl Mon Jun 04 22:56:42 2007 +0200
@@ -26,7 +26,7 @@
echo 'in foo' > foo/file.txt
echo 'in foo/Bar' > foo/Bar/file.txt
echo 'in quux' > quux/file.py
-hg add
+hg add -q
hg ci -m 'add files' -d '1000000 0'
echo >> foo/file.txt
hg ci -m 'change foo/file' -d '1000001 0'
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-acl.out
--- a/tests/test-acl.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-acl.out Mon Jun 04 22:56:42 2007 +0200
@@ -1,6 +1,3 @@
-adding foo/Bar/file.txt
-adding foo/file.txt
-adding quux/file.py
3:911600dab2ae
requesting all changes
adding changesets
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-addremove
--- a/tests/test-addremove Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-addremove Mon Jun 04 22:56:42 2007 +0200
@@ -22,5 +22,5 @@
mv a b
rm c
echo d > d
-hg addremove -s 0.5
+hg addremove -s 50
hg commit -mb
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-addremove-similar
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-addremove-similar Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+hg init rep; cd rep
+
+touch empty-file
+python -c 'for x in range(10000): print x' > large-file
+
+hg addremove
+
+hg commit -m A
+
+rm large-file empty-file
+python -c 'for x in range(10,10000): print x' > another-file
+
+hg addremove -s50
+
+hg commit -m B
+
+echo % comparing two empty files caused ZeroDivisionError in the past
+hg update -C 0
+rm empty-file
+touch another-empty-file
+hg addremove -s50
+
+cd ..
+
+hg init rep2; cd rep2
+
+python -c 'for x in range(10000): print x' > large-file
+python -c 'for x in range(50): print x' > tiny-file
+
+hg addremove
+
+hg commit -m A
+
+python -c 'for x in range(70): print x' > small-file
+rm tiny-file
+rm large-file
+
+hg addremove -s50
+
+hg commit -m B
+
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-addremove-similar.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-addremove-similar.out Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,16 @@
+adding empty-file
+adding large-file
+adding another-file
+removing empty-file
+removing large-file
+recording removal of large-file as rename to another-file (99% similar)
+% comparing two empty files caused ZeroDivisionError in the past
+2 files updated, 0 files merged, 1 files removed, 0 files unresolved
+adding another-empty-file
+removing empty-file
+adding large-file
+adding tiny-file
+adding small-file
+removing large-file
+removing tiny-file
+recording removal of tiny-file as rename to small-file (82% similar)
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-annotate
--- a/tests/test-annotate Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-annotate Mon Jun 04 22:56:42 2007 +0200
@@ -1,5 +1,7 @@
#!/bin/sh
+HGMERGE=true; export HGMERGE
+
echo % init
hg init
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-backout
--- a/tests/test-backout Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-backout Mon Jun 04 22:56:42 2007 +0200
@@ -1,5 +1,7 @@
#!/bin/sh
+HGMERGE=true; export HGMERGE
+
echo '# basic operation'
hg init basic
cd basic
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-backout.out
--- a/tests/test-backout.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-backout.out Mon Jun 04 22:56:42 2007 +0200
@@ -28,7 +28,6 @@
changeset 3:4cbb1e70196a backs out changeset 1:22bca4c721e5
the backout changeset is a new head - do not forget to merge
(use "backout --merge" if you want to auto-merge)
-b: No such file or directory
adding a
adding b
adding c
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-bad-extension
--- a/tests/test-bad-extension Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-bad-extension Mon Jun 04 22:56:42 2007 +0200
@@ -1,9 +1,11 @@
#!/bin/sh
-echo 'syntax error' > badext.py
+echo 'raise Exception("bit bucket overflow")' > badext.py
abspath=`pwd`/badext.py
echo '[extensions]' >> $HGRCPATH
+echo "gpg =" >> $HGRCPATH
+echo "hgext.gpg =" >> $HGRCPATH
echo "badext = $abspath" >> $HGRCPATH
hg -q help help
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-bad-extension.out
--- a/tests/test-bad-extension.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-bad-extension.out Mon Jun 04 22:56:42 2007 +0200
@@ -1,4 +1,5 @@
-*** failed to import extension badext: invalid syntax (badext.py, line 1)
+*** failed to import extension badext: bit bucket overflow
+extension 'hgext.gpg' overrides commands: sigs sigcheck sign
hg help [COMMAND]
show help for a command, extension, or list of commands
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-branch
--- a/tests/test-branch Mon Jun 04 09:16:53 2007 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#!/bin/sh
-#
-# test for branch handling
-#
-# XXX: need more tests
-
-hg init
-echo a > a
-echo b > b
-hg ci -A -m 0 -d "1000000 0"
-echo aa > a
-echo bb > b
-hg ci -m 1 -d "1000000 0"
-hg tag -l foo
-hg update 0
-hg parents -b
-
-# test update
-hg update -b foo
-hg parents
-
-# test merge
-hg update 0
-echo c > c
-hg ci -A -m 0.0 -d "1000000 0"
-hg merge -b foo
-hg parents -b
-
-# re-test with more branches
-hg update -C 0
-echo d > d
-hg ci -A -m 0.0 -d "1000000 0"
-hg merge -b foo
-hg parents -b
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-branch.out
--- a/tests/test-branch.out Mon Jun 04 09:16:53 2007 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-adding a
-adding b
-2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-the --branches option is deprecated, please use 'hg branches' instead
-changeset: 0:b544c4ac4389
-user: test
-date: Mon Jan 12 13:46:40 1970 +0000
-summary: 0
-
-the --branch option is deprecated, please use 'hg branch' instead
-Using head f4ac749470f2 for branch foo
-2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-changeset: 1:f4ac749470f2
-tag: foo
-tag: tip
-user: test
-date: Mon Jan 12 13:46:40 1970 +0000
-summary: 1
-
-2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-adding c
-the --branch option is deprecated, please use 'hg branch' instead
-Using head f4ac749470f2 for branch foo
-2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
-the --branches option is deprecated, please use 'hg branches' instead
-changeset: 2:1505d56ee00e
-tag: tip
-parent: 0:b544c4ac4389
-user: test
-date: Mon Jan 12 13:46:40 1970 +0000
-summary: 0.0
-
-changeset: 1:f4ac749470f2
-tag: foo
-branch: foo
-user: test
-date: Mon Jan 12 13:46:40 1970 +0000
-summary: 1
-
-2 files updated, 0 files merged, 1 files removed, 0 files unresolved
-adding d
-the --branch option is deprecated, please use 'hg branch' instead
-Using head f4ac749470f2 for branch foo
-2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
-the --branches option is deprecated, please use 'hg branches' instead
-changeset: 3:53b72df12ae5
-tag: tip
-parent: 0:b544c4ac4389
-user: test
-date: Mon Jan 12 13:46:40 1970 +0000
-summary: 0.0
-
-changeset: 1:f4ac749470f2
-tag: foo
-branch: foo
-user: test
-date: Mon Jan 12 13:46:40 1970 +0000
-summary: 1
-
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-bundle
--- a/tests/test-bundle Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-bundle Mon Jun 04 22:56:42 2007 +0200
@@ -1,5 +1,7 @@
#!/bin/sh
+cp "$TESTDIR"/printenv.py .
+
hg init test
cd test
echo 0 > afile
@@ -43,7 +45,7 @@
cd empty
hg -R bundle://../full.hg log
echo '[hooks]' >> .hg/hgrc
-echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
+echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
#doesn't work (yet ?)
#hg -R bundle://../full.hg verify
hg pull bundle://../full.hg
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-bundle.out
--- a/tests/test-bundle.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-bundle.out Mon Jun 04 22:56:42 2007 +0200
@@ -87,7 +87,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: 0.0
-changegroup: u=bundle:../full.hg
+changegroup hook: HG_NODE=5649c9d34dd87d0ecb5fd39672128376e83b22e1 HG_SOURCE=pull HG_URL=bundle:../full.hg
pulling from bundle://../full.hg
requesting all changes
adding changesets
@@ -150,6 +150,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: 0.0
+comparing with bundle://../full.hg
searching for changes
changeset: 4:5f4f3ceb285e
parent: 0:5649c9d34dd8
@@ -179,6 +180,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: 0.3m
+comparing with ../partial2
searching for changes
changeset: 4:5f4f3ceb285e
parent: 0:5649c9d34dd8
@@ -211,6 +213,7 @@
abort: No such file or directory: ../does-not-exist.hg
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
searching for changes
+comparing with ../bundle.hg
searching for changes
changeset: 2:ed1b79f46b9a
tag: tip
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-commit
--- a/tests/test-commit Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-commit Mon Jun 04 22:56:42 2007 +0200
@@ -71,4 +71,21 @@
hg log -v
cd ..
+echo % dot and subdir commit test
+hg init test3
+cd test3
+mkdir foo
+echo foo content > foo/plain-file
+hg add foo/plain-file
+hg ci -d '1000000 0' -u test -m commit-foo-subdir foo
+echo modified foo content > foo/plain-file
+hg ci -d '2000000 0' -u test -m commit-foo-dot .
+echo % full log
+hg log -v
+echo % subdir log
+cd foo
+hg log .
+cd ..
+cd ..
+
exit 0
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-commit.out
--- a/tests/test-commit.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-commit.out Mon Jun 04 22:56:42 2007 +0200
@@ -21,8 +21,7 @@
dir/file
does-not-exist: No such file or directory
abort: file .../test/does-not-exist not found!
-baz: unsupported file type (type is symbolic link)
-abort: can't commit .../test/baz: unsupported file type!
+abort: file .../test/baz not tracked!
abort: file .../test/quux not tracked!
dir/file
% partial subdir commit test
@@ -65,3 +64,34 @@
commit-subdir-1
+% dot and subdir commit test
+% full log
+changeset: 1:d9180e04fa8a
+tag: tip
+user: test
+date: Sat Jan 24 03:33:20 1970 +0000
+files: foo/plain-file
+description:
+commit-foo-dot
+
+
+changeset: 0:80b572aaf098
+user: test
+date: Mon Jan 12 13:46:40 1970 +0000
+files: foo/plain-file
+description:
+commit-foo-subdir
+
+
+% subdir log
+changeset: 1:d9180e04fa8a
+tag: tip
+user: test
+date: Sat Jan 24 03:33:20 1970 +0000
+summary: commit-foo-dot
+
+changeset: 0:80b572aaf098
+user: test
+date: Mon Jan 12 13:46:40 1970 +0000
+summary: commit-foo-subdir
+
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-conflict
--- a/tests/test-conflict Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-conflict Mon Jun 04 22:56:42 2007 +0200
@@ -9,8 +9,7 @@
hg co 0
echo "something else" > a
hg commit -m branch2 -d "1000000 0"
-HGMERGE=merge; export HGMERGE
hg merge 1
hg id
-egrep -v ">>>|<<<" a
+cat a
hg status
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-conflict.out
--- a/tests/test-conflict.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-conflict.out Mon Jun 04 22:56:42 2007 +0200
@@ -1,5 +1,5 @@
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-merge: warning: conflicts during merge
+warning: conflicts during merge.
merging a
merging a failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
@@ -7,7 +7,9 @@
hg update -C 2
hg merge 1
e7fe8eb3e180+0d24b7662d3e+ tip
+<<<<<<< my
something else
=======
something
+>>>>>>> other
M a
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-context.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-context.py Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,20 @@
+import os
+from mercurial import hg, ui, commands
+
+u = ui.ui()
+
+repo = hg.repository(u, 'test1', create=1)
+os.chdir('test1')
+repo = hg.repository(u, '.') # FIXME: can't lock repo without doing this
+
+# create 'foo' with fixed time stamp
+f = file('foo', 'w')
+f.write('foo\n')
+f.close()
+os.utime('foo', (1000, 1000))
+
+# add+commit 'foo'
+repo.add(['foo'])
+repo.commit(text='commit1', date="0 0")
+
+print "workingfilectx.date =", repo.workingctx().filectx('foo').date()
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-context.py.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-context.py.out Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,1 @@
+workingfilectx.date = (1000, 0)
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-copy2
--- a/tests/test-copy2 Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-copy2 Mon Jun 04 22:56:42 2007 +0200
@@ -38,4 +38,10 @@
echo "# should show no copies"
hg debugstate|grep '^copy'
+echo "# copy --after on an added file"
+cp bar baz
+hg add baz
+hg cp -A bar baz
+hg st -C
+
exit 0
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-copy2.out
--- a/tests/test-copy2.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-copy2.out Mon Jun 04 22:56:42 2007 +0200
@@ -20,3 +20,6 @@
1 5 7 1 2 dd12c926cf16 2ed2a3912a0b 000000000000
bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17
# should show no copies
+# copy --after on an added file
+A baz
+ bar
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-empty-group.out
--- a/tests/test-empty-group.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-empty-group.out Mon Jun 04 22:56:42 2007 +0200
@@ -21,6 +21,7 @@
adding file changes
added 4 changesets with 3 changes to 3 files
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+comparing with b
searching for changes
changeset: 4:fdb3c546e859
tag: tip
@@ -30,6 +31,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: m2
+comparing with c
searching for changes
changeset: 3:f40f830c0024
parent: 2:de997049e034
@@ -38,6 +40,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: m1
+comparing with c
searching for changes
changeset: 3:f40f830c0024
tag: tip
@@ -47,6 +50,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: m1
+comparing with b
searching for changes
changeset: 3:fdb3c546e859
tag: tip
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-filebranch
--- a/tests/test-filebranch Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-filebranch Mon Jun 04 22:56:42 2007 +0200
@@ -3,11 +3,11 @@
# This test makes sure that we don't mark a file as merged with its ancestor
# when we do a merge.
-cat <<'EOF' > merge
-#!/bin/sh
-echo merging for `basename $1`
+cat < merge
+import sys, os
+print "merging for", os.path.basename(sys.argv[1])
EOF
-chmod +x merge
+HGMERGE="python ../merge"; export HGMERGE
echo creating base
hg init a
@@ -41,7 +41,7 @@
echo merging
hg pull ../a
-env HGMERGE=../merge hg merge -v
+hg merge -v
echo 2m > foo
echo 2b > baz
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-git-export
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-git-import.out
--- a/tests/test-git-import.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-git-import.out Mon Jun 04 22:56:42 2007 +0200
@@ -31,7 +31,6 @@
a
% rename and modify
applying patch from stdin
-copy2: No such file or directory
a
a
b
@@ -40,7 +39,6 @@
% one file renamed multiple times
applying patch from stdin
9 rename2 rename3 rename3-2 / rename3 (rename2)rename3-2 (rename2)
-rename2: No such file or directory
rename3
rename3-2
a
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-globalopts
--- a/tests/test-globalopts Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-globalopts Mon Jun 04 22:56:42 2007 +0200
@@ -17,7 +17,7 @@
hg clone a c
cd c
hg pull -f ../b
-HGMERGE=merge hg merge
+hg merge
cd ..
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-glog
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-glog Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,140 @@
+#!/bin/sh
+
+# @ (34) head
+# |
+# | o (33) head
+# | |
+# o | (32) expand
+# |\ \
+# | o \ (31) expand
+# | |\ \
+# | | o \ (30) expand
+# | | |\ \
+# | | | o | (29) regular commit
+# | | | | |
+# | | o | | (28) merge zero known
+# | | |\ \ \
+# o | | | | | (27) collapse
+# |/ / / / /
+# | | o---+ (26) merge one known; far right
+# | | | | |
+# +---o | | (25) merge one known; far left
+# | | | | |
+# | | o | | (24) merge one known; immediate right
+# | | |\| |
+# | | o | | (23) merge one known; immediate left
+# | |/| | |
+# +---o---+ (22) merge two known; one far left, one far right
+# | | / /
+# o | | | (21) expand
+# |\ \ \ \
+# | o---+-+ (20) merge two known; two far right
+# | / / /
+# o | | | (19) expand
+# |\ \ \ \
+# +---+---o (18) merge two known; two far left
+# | | | |
+# | o | | (17) expand
+# | |\ \ \
+# | | o---+ (16) merge two known; one immediate right, one near right
+# | | |/ /
+# o | | | (15) expand
+# |\ \ \ \
+# | o-----+ (14) merge two known; one immediate right, one far right
+# | |/ / /
+# o | | | (13) expand
+# |\ \ \ \
+# +---o | | (12) merge two known; one immediate right, one far left
+# | | |/ /
+# | o | | (11) expand
+# | |\ \ \
+# | | o---+ (10) merge two known; one immediate left, one near right
+# | |/ / /
+# o | | | (9) expand
+# |\ \ \ \
+# | o-----+ (8) merge two known; one immediate left, one far right
+# |/ / / /
+# o | | | (7) expand
+# |\ \ \ \
+# +---o | | (6) merge two known; one immediate left, one far left
+# | |/ / /
+# | o | | (5) expand
+# | |\ \ \
+# | | o | | (4) merge two known; one immediate left, one immediate right
+# | |/|/ /
+# | o / / (3) collapse
+# |/ / /
+# o / / (2) collapse
+# |/ /
+# o / (1) collapse
+# |/
+# o (0) root
+
+set -e
+
+commit()
+{
+ rev=$1
+ msg=$2
+ shift 2
+ if [ "$#" -gt 0 ]; then
+ hg debugsetparents "$@"
+ fi
+ echo $rev > $rev
+ hg add $rev
+ hg ci -d "$rev 0" -m "($rev) $msg"
+}
+
+echo "[extensions]" >> $HGRCPATH
+echo "graphlog=" >> $HGRCPATH
+
+echo % init
+hg init repo
+
+cd repo
+
+echo % empty repo
+hg glog
+
+echo % building tree
+commit 0 "root"
+commit 1 "collapse" 0
+commit 2 "collapse" 1
+commit 3 "collapse" 2
+commit 4 "merge two known; one immediate left, one immediate right" 1 3
+commit 5 "expand" 3 4
+commit 6 "merge two known; one immediate left, one far left" 2 5
+commit 7 "expand" 2 5
+commit 8 "merge two known; one immediate left, one far right" 0 7
+commit 9 "expand" 7 8
+commit 10 "merge two known; one immediate left, one near right" 0 6
+commit 11 "expand" 6 10
+commit 12 "merge two known; one immediate right, one far left" 1 9
+commit 13 "expand" 9 11
+commit 14 "merge two known; one immediate right, one far right" 0 12
+commit 15 "expand" 13 14
+commit 16 "merge two known; one immediate right, one near right" 0 1
+commit 17 "expand" 12 16
+commit 18 "merge two known; two far left" 1 15
+commit 19 "expand" 15 17
+commit 20 "merge two known; two far right" 0 18
+commit 21 "expand" 19 20
+commit 22 "merge two known; one far left, one far right" 18 21
+commit 23 "merge one known; immediate left" 1 22
+commit 24 "merge one known; immediate right" 0 23
+commit 25 "merge one known; far left" 21 24
+commit 26 "merge one known; far right" 18 25
+commit 27 "collapse" 21
+commit 28 "merge zero known" 1 26
+commit 29 "regular commit" 0
+commit 30 "expand" 28 29
+commit 31 "expand" 21 30
+commit 32 "expand" 27 31
+commit 33 "head" 18
+commit 34 "head" 32
+
+echo % glog -q
+hg glog -q
+
+echo % glog
+hg glog
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-glog.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-glog.out Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,309 @@
+% init
+% empty repo
+% building tree
+% glog -q
+@ 34:0eed7cd895e0
+|
+| o 33:2e9d1b521374
+| |
+o | 32:77f7d8438a3c
+|\ \
+| o \ 31:82ee55204a79
+| |\ \
+| | o \ 30:777dfc428649
+| | |\ \
+| | | o | 29:f8e7fee63353
+| | | | |
+| | o | | 28:4b6e9bd48cf9
+| | |\ \ \
+o | | | | | 27:e9e08174cd30
+|/ / / / /
+| | o---+ 26:720dc079a855
+| | | | |
++---o | | 25:9d4ed048d013
+| | | | |
+| | o | | 24:4a68967db00d
+| | |\| |
+| | o | | 23:bc31393cabdf
+| |/| | |
++---o---+ 22:a37f2ea6ebc6
+| | / /
+o | | | 21:e758e8f4ace9
+|\ \ \ \
+| o---+-+ 20:aeccadad74b4
+| / / /
+o | | | 19:138069b5dad7
+|\ \ \ \
++---+---o 18:5a8c9a29ef81
+| | | |
+| o | | 17:43e52b935494
+| |\ \ \
+| | o---+ 16:449a2f9562a4
+| | |/ /
+o | | | 15:c0b4283d4c1d
+|\ \ \ \
+| o-----+ 14:9d533950abf0
+| |/ / /
+o | | | 13:c39d0a2b8165
+|\ \ \ \
++---o | | 12:74dc7aea4494
+| | |/ /
+| o | | 11:c3c395dd8b98
+| |\ \ \
+| | o---+ 10:8094c50149ef
+| |/ / /
+o | | | 9:79ab1812f961
+|\ \ \ \
+| o-----+ 8:d7aa38594334
+|/ / / /
+o | | | 7:699392d1259e
+|\ \ \ \
++---o | | 6:0ca7c061cf45
+| |/ / /
+| o | | 5:3589c3c477ab
+| |\ \ \
+| | o | | 4:e2cad8233c77
+| |/|/ /
+| o / / 3:02173ffbf857
+|/ / /
+o / / 2:e8ea2256f9ec
+|/ /
+o / 1:3cae7826a707
+|/
+o 0:7aa22e58e8c1
+
+% glog
+@ changeset: 34:0eed7cd895e0
+| tag: tip
+| parent: 32:77f7d8438a3c
+| user: test
+| date: Thu Jan 01 00:00:34 1970 +0000
+| summary: (34) head
+|
+| o changeset: 33:2e9d1b521374
+| | parent: 18:5a8c9a29ef81
+| | user: test
+| | date: Thu Jan 01 00:00:33 1970 +0000
+| | summary: (33) head
+| |
+o | changeset: 32:77f7d8438a3c
+|\ \ parent: 27:e9e08174cd30
+| | | parent: 31:82ee55204a79
+| | | user: test
+| | | date: Thu Jan 01 00:00:32 1970 +0000
+| | | summary: (32) expand
+| | |
+| o | changeset: 31:82ee55204a79
+| |\ \ parent: 21:e758e8f4ace9
+| | | | parent: 30:777dfc428649
+| | | | user: test
+| | | | date: Thu Jan 01 00:00:31 1970 +0000
+| | | | summary: (31) expand
+| | | |
+| | o | changeset: 30:777dfc428649
+| | |\ \ parent: 28:4b6e9bd48cf9
+| | | | | parent: 29:f8e7fee63353
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:30 1970 +0000
+| | | | | summary: (30) expand
+| | | | |
+| | | o | changeset: 29:f8e7fee63353
+| | | | | parent: 0:7aa22e58e8c1
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:29 1970 +0000
+| | | | | summary: (29) regular commit
+| | | | |
+| | o | | changeset: 28:4b6e9bd48cf9
+| | |\ \ \ parent: 1:3cae7826a707
+| | | | | | parent: 26:720dc079a855
+| | | | | | user: test
+| | | | | | date: Thu Jan 01 00:00:28 1970 +0000
+| | | | | | summary: (28) merge zero known
+| | | | | |
+o | | | | | changeset: 27:e9e08174cd30
+|/ / / / / parent: 21:e758e8f4ace9
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:27 1970 +0000
+| | | | | summary: (27) collapse
+| | | | |
+| | o---+ changeset: 26:720dc079a855
+| | | | | parent: 18:5a8c9a29ef81
+| | | | | parent: 25:9d4ed048d013
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:26 1970 +0000
+| | | | | summary: (26) merge one known; far right
+| | | | |
++---o | | changeset: 25:9d4ed048d013
+| | | | | parent: 21:e758e8f4ace9
+| | | | | parent: 24:4a68967db00d
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:25 1970 +0000
+| | | | | summary: (25) merge one known; far left
+| | | | |
+| | o | | changeset: 24:4a68967db00d
+| | |\| | parent: 0:7aa22e58e8c1
+| | | | | parent: 23:bc31393cabdf
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:24 1970 +0000
+| | | | | summary: (24) merge one known; immediate right
+| | | | |
+| | o | | changeset: 23:bc31393cabdf
+| |/| | | parent: 1:3cae7826a707
+| | | | | parent: 22:a37f2ea6ebc6
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:23 1970 +0000
+| | | | | summary: (23) merge one known; immediate left
+| | | | |
++---o---+ changeset: 22:a37f2ea6ebc6
+| | | | parent: 18:5a8c9a29ef81
+| | / / parent: 21:e758e8f4ace9
+| | | | user: test
+| | | | date: Thu Jan 01 00:00:22 1970 +0000
+| | | | summary: (22) merge two known; one far left, one far right
+| | | |
+o | | | changeset: 21:e758e8f4ace9
+|\ \ \ \ parent: 19:138069b5dad7
+| | | | | parent: 20:aeccadad74b4
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:21 1970 +0000
+| | | | | summary: (21) expand
+| | | | |
+| o---+-+ changeset: 20:aeccadad74b4
+| | | | parent: 0:7aa22e58e8c1
+| / / / parent: 18:5a8c9a29ef81
+| | | | user: test
+| | | | date: Thu Jan 01 00:00:20 1970 +0000
+| | | | summary: (20) merge two known; two far right
+| | | |
+o | | | changeset: 19:138069b5dad7
+|\ \ \ \ parent: 15:c0b4283d4c1d
+| | | | | parent: 17:43e52b935494
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:19 1970 +0000
+| | | | | summary: (19) expand
+| | | | |
++---+---o changeset: 18:5a8c9a29ef81
+| | | | parent: 1:3cae7826a707
+| | | | parent: 15:c0b4283d4c1d
+| | | | user: test
+| | | | date: Thu Jan 01 00:00:18 1970 +0000
+| | | | summary: (18) merge two known; two far left
+| | | |
+| o | | changeset: 17:43e52b935494
+| |\ \ \ parent: 12:74dc7aea4494
+| | | | | parent: 16:449a2f9562a4
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:17 1970 +0000
+| | | | | summary: (17) expand
+| | | | |
+| | o---+ changeset: 16:449a2f9562a4
+| | | | | parent: 0:7aa22e58e8c1
+| | |/ / parent: 1:3cae7826a707
+| | | | user: test
+| | | | date: Thu Jan 01 00:00:16 1970 +0000
+| | | | summary: (16) merge two known; one immediate right, one near right
+| | | |
+o | | | changeset: 15:c0b4283d4c1d
+|\ \ \ \ parent: 13:c39d0a2b8165
+| | | | | parent: 14:9d533950abf0
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:15 1970 +0000
+| | | | | summary: (15) expand
+| | | | |
+| o-----+ changeset: 14:9d533950abf0
+| | | | | parent: 0:7aa22e58e8c1
+| |/ / / parent: 12:74dc7aea4494
+| | | | user: test
+| | | | date: Thu Jan 01 00:00:14 1970 +0000
+| | | | summary: (14) merge two known; one immediate right, one far right
+| | | |
+o | | | changeset: 13:c39d0a2b8165
+|\ \ \ \ parent: 9:79ab1812f961
+| | | | | parent: 11:c3c395dd8b98
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:13 1970 +0000
+| | | | | summary: (13) expand
+| | | | |
++---o | | changeset: 12:74dc7aea4494
+| | |/ / parent: 1:3cae7826a707
+| | | | parent: 9:79ab1812f961
+| | | | user: test
+| | | | date: Thu Jan 01 00:00:12 1970 +0000
+| | | | summary: (12) merge two known; one immediate right, one far left
+| | | |
+| o | | changeset: 11:c3c395dd8b98
+| |\ \ \ parent: 6:0ca7c061cf45
+| | | | | parent: 10:8094c50149ef
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:11 1970 +0000
+| | | | | summary: (11) expand
+| | | | |
+| | o---+ changeset: 10:8094c50149ef
+| | | | | parent: 0:7aa22e58e8c1
+| |/ / / parent: 6:0ca7c061cf45
+| | | | user: test
+| | | | date: Thu Jan 01 00:00:10 1970 +0000
+| | | | summary: (10) merge two known; one immediate left, one near right
+| | | |
+o | | | changeset: 9:79ab1812f961
+|\ \ \ \ parent: 7:699392d1259e
+| | | | | parent: 8:d7aa38594334
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:09 1970 +0000
+| | | | | summary: (9) expand
+| | | | |
+| o-----+ changeset: 8:d7aa38594334
+| | | | | parent: 0:7aa22e58e8c1
+|/ / / / parent: 7:699392d1259e
+| | | | user: test
+| | | | date: Thu Jan 01 00:00:08 1970 +0000
+| | | | summary: (8) merge two known; one immediate left, one far right
+| | | |
+o | | | changeset: 7:699392d1259e
+|\ \ \ \ parent: 2:e8ea2256f9ec
+| | | | | parent: 5:3589c3c477ab
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:07 1970 +0000
+| | | | | summary: (7) expand
+| | | | |
++---o | | changeset: 6:0ca7c061cf45
+| |/ / / parent: 2:e8ea2256f9ec
+| | | | parent: 5:3589c3c477ab
+| | | | user: test
+| | | | date: Thu Jan 01 00:00:06 1970 +0000
+| | | | summary: (6) merge two known; one immediate left, one far left
+| | | |
+| o | | changeset: 5:3589c3c477ab
+| |\ \ \ parent: 3:02173ffbf857
+| | | | | parent: 4:e2cad8233c77
+| | | | | user: test
+| | | | | date: Thu Jan 01 00:00:05 1970 +0000
+| | | | | summary: (5) expand
+| | | | |
+| | o | | changeset: 4:e2cad8233c77
+| |/|/ / parent: 1:3cae7826a707
+| | | | parent: 3:02173ffbf857
+| | | | user: test
+| | | | date: Thu Jan 01 00:00:04 1970 +0000
+| | | | summary: (4) merge two known; one immediate left, one immediate right
+| | | |
+| o | | changeset: 3:02173ffbf857
+|/ / / user: test
+| | | date: Thu Jan 01 00:00:03 1970 +0000
+| | | summary: (3) collapse
+| | |
+o | | changeset: 2:e8ea2256f9ec
+|/ / user: test
+| | date: Thu Jan 01 00:00:02 1970 +0000
+| | summary: (2) collapse
+| |
+o | changeset: 1:3cae7826a707
+|/ user: test
+| date: Thu Jan 01 00:00:01 1970 +0000
+| summary: (1) collapse
+|
+o changeset: 0:7aa22e58e8c1
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: (0) root
+
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-grep
--- a/tests/test-grep Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-grep Mon Jun 04 22:56:42 2007 +0200
@@ -17,8 +17,11 @@
head -n 3 port > port1
mv port1 port
hg commit -m 4 -u spam -d '4 0'
+echo % simple
hg grep port port
+echo % all
hg grep --all -nu port port
+echo % other
hg grep import port
hg cp port port2
@@ -28,3 +31,22 @@
echo deport >> port2
hg commit -m 5 -u eggs -d '6 0'
hg grep -f --all -nu port port2
+
+cd ..
+hg init t2
+cd t2
+hg grep foobar foo
+hg grep foobar
+echo blue >> color
+echo black >> color
+hg add color
+hg ci -m 0 -d '0 0'
+echo orange >> color
+hg ci -m 1 -d '0 0'
+echo black > color
+hg ci -m 2 -d '0 0'
+echo orange >> color
+echo blue >> color
+hg ci -m 3 -d '0 0'
+hg grep orange
+hg grep --all orange
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-grep.out
--- a/tests/test-grep.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-grep.out Mon Jun 04 22:56:42 2007 +0200
@@ -1,6 +1,8 @@
+% simple
port:4:export
port:4:vaportight
port:4:import/export
+% all
port:4:4:-:spam:import/export
port:3:4:+:eggs:import/export
port:2:1:-:spam:import
@@ -10,6 +12,7 @@
port:2:3:+:spam:import/export
port:1:2:+:eggs:export
port:0:1:+:spam:import
+% other
port:4:import/export
% follow
port:0:import
@@ -23,3 +26,7 @@
port:2:3:+:spam:import/export
port:1:2:+:eggs:export
port:0:1:+:spam:import
+color:3:orange
+color:3:+:orange
+color:2:-:orange
+color:1:+:orange
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-hgweb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-hgweb Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+hg init test
+cd test
+mkdir da
+echo foo > da/foo
+echo foo > foo
+hg ci -Ambase -d '0 0'
+hg serve -p 20060 -d --pid-file=hg.pid
+echo % manifest
+("$TESTDIR/get-with-headers.py" localhost:20060 '/file/tip/?style=raw')
+("$TESTDIR/get-with-headers.py" localhost:20060 '/file/tip/da?style=raw')
+kill `cat hg.pid`
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-hgweb.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-hgweb.out Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,16 @@
+adding da/foo
+adding foo
+% manifest
+200 Script output follows
+
+
+drwxr-xr-x da
+-rw-r--r-- 4 foo
+
+
+200 Script output follows
+
+
+-rw-r--r-- 4 foo
+
+
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-hook
--- a/tests/test-hook Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-hook Mon Jun 04 22:56:42 2007 +0200
@@ -1,13 +1,16 @@
#!/bin/sh
+cp "$TESTDIR"/printenv.py .
+
# commit hooks can see env vars
hg init a
cd a
echo "[hooks]" > .hg/hgrc
-echo 'commit = echo commit hook: n=$HG_NODE p1=$HG_PARENT1 p2=$HG_PARENT2' >> .hg/hgrc
-echo 'commit.b = echo commit hook b' >> .hg/hgrc
-echo 'precommit = echo precommit hook: p1=$HG_PARENT1 p2=$HG_PARENT2' >> .hg/hgrc
-echo 'pretxncommit = echo pretxncommit hook: n=$HG_NODE p1=$HG_PARENT1 p2=$HG_PARENT2; hg -q tip' >> .hg/hgrc
+echo 'commit = unset HG_LOCAL HG_TAG; python ../printenv.py commit' >> .hg/hgrc
+echo 'commit.b = unset HG_LOCAL HG_TAG; python ../printenv.py commit.b' >> .hg/hgrc
+echo 'precommit = unset HG_LOCAL HG_NODE HG_TAG; python ../printenv.py precommit' >> .hg/hgrc
+echo 'pretxncommit = unset HG_LOCAL HG_TAG; python ../printenv.py pretxncommit' >> .hg/hgrc
+echo 'pretxncommit.tip = hg -q tip' >> .hg/hgrc
echo a > a
hg add a
hg commit -m a -d "1000000 0"
@@ -17,9 +20,9 @@
# changegroup hooks can see env vars
echo '[hooks]' > .hg/hgrc
-echo 'prechangegroup = echo prechangegroup hook: u=`echo $HG_URL | sed s,file:.*,file:,`' >> .hg/hgrc
-echo 'changegroup = echo changegroup hook: n=$HG_NODE u=`echo $HG_URL | sed s,file:.*,file:,`' >> .hg/hgrc
-echo 'incoming = echo incoming hook: n=$HG_NODE u=`echo $HG_URL | sed s,file:.*,file:,`' >> .hg/hgrc
+echo 'prechangegroup = python ../printenv.py prechangegroup' >> .hg/hgrc
+echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
+echo 'incoming = python ../printenv.py incoming' >> .hg/hgrc
# pretxncommit and commit hooks can see both parents of merge
cd ../a
@@ -37,19 +40,20 @@
# tag hooks can see env vars
cd ../a
-echo 'pretag = echo pretag hook: t=$HG_TAG n=$HG_NODE l=$HG_LOCAL' >> .hg/hgrc
-echo 'tag = echo tag hook: t=$HG_TAG n=$HG_NODE l=$HG_LOCAL' >> .hg/hgrc
+echo 'pretag = python ../printenv.py pretag' >> .hg/hgrc
+echo 'tag = unset HG_PARENT1 HG_PARENT2; python ../printenv.py tag' >> .hg/hgrc
hg tag -d '3 0' a
hg tag -l la
# pretag hook can forbid tagging
-echo 'pretag.forbid = echo pretag.forbid hook; exit 1' >> .hg/hgrc
+echo 'pretag.forbid = python ../printenv.py pretag.forbid 1' >> .hg/hgrc
hg tag -d '4 0' fa
hg tag -l fla
# pretxncommit hook can see changeset, can roll back txn, changeset
# no more there after
-echo 'pretxncommit.forbid = echo pretxncommit.forbid hook: tip=`hg -q tip`; exit 1' >> .hg/hgrc
+echo 'pretxncommit.forbid0 = hg tip -q' >> .hg/hgrc
+echo 'pretxncommit.forbid1 = python ../printenv.py pretxncommit.forbid 1' >> .hg/hgrc
echo z > z
hg add z
hg -q tip
@@ -57,42 +61,43 @@
hg -q tip
# precommit hook can prevent commit
-echo 'precommit.forbid = echo precommit.forbid hook; exit 1' >> .hg/hgrc
+echo 'precommit.forbid = python ../printenv.py precommit.forbid 1' >> .hg/hgrc
hg commit -m 'fail' -d '4 0'
hg -q tip
# preupdate hook can prevent update
-echo 'preupdate = echo preupdate hook: p1=$HG_PARENT1 p2=$HG_PARENT2' >> .hg/hgrc
+echo 'preupdate = python ../printenv.py preupdate' >> .hg/hgrc
hg update 1
# update hook
-echo 'update = echo update hook: p1=$HG_PARENT1 p2=$HG_PARENT2 err=$HG_ERROR' >> .hg/hgrc
+echo 'update = python ../printenv.py update' >> .hg/hgrc
hg update
# prechangegroup hook can prevent incoming changes
cd ../b
hg -q tip
echo '[hooks]' > .hg/hgrc
-echo 'prechangegroup.forbid = echo prechangegroup.forbid hook; exit 1' >> .hg/hgrc
+echo 'prechangegroup.forbid = python ../printenv.py prechangegroup.forbid 1' >> .hg/hgrc
hg pull ../a
# pretxnchangegroup hook can see incoming changes, can roll back txn,
# incoming changes no longer there after
echo '[hooks]' > .hg/hgrc
-echo 'pretxnchangegroup.forbid = echo pretxnchangegroup.forbid hook: tip=`hg -q tip`; exit 1' >> .hg/hgrc
+echo 'pretxnchangegroup.forbid0 = hg tip -q' >> .hg/hgrc
+echo 'pretxnchangegroup.forbid1 = python ../printenv.py pretxnchangegroup.forbid 1' >> .hg/hgrc
hg pull ../a
hg -q tip
# outgoing hooks can see env vars
rm .hg/hgrc
echo '[hooks]' > ../a/.hg/hgrc
-echo 'preoutgoing = echo preoutgoing hook: s=$HG_SOURCE' >> ../a/.hg/hgrc
-echo 'outgoing = echo outgoing hook: n=$HG_NODE s=$HG_SOURCE' >> ../a/.hg/hgrc
+echo 'preoutgoing = python ../printenv.py preoutgoing' >> ../a/.hg/hgrc
+echo 'outgoing = python ../printenv.py outgoing' >> ../a/.hg/hgrc
hg pull ../a
hg rollback
# preoutgoing hook can prevent outgoing changes
-echo 'preoutgoing.forbid = echo preoutgoing.forbid hook; exit 1' >> ../a/.hg/hgrc
+echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> ../a/.hg/hgrc
hg pull ../a
cat > hooktests.py <> a
hg --traceback commit -A -m a 2>&1 | grep '^Traceback'
+cd ..
+hg init c
+cd c
+
+cat > hookext.py <> .hg/hgrc
+echo 'hookext = hookext.py' >> .hg/hgrc
+
+touch foo
+hg add foo
+hg ci -m 'add foo'
+echo >> foo
+hg ci --debug -m 'change foo' | sed -e 's/ at .*>/>/'
+
+hg showconfig hooks | sed -e 's/ at .*>/>/'
+
exit 0
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-hook.out
--- a/tests/test-hook.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-hook.out Mon Jun 04 22:56:42 2007 +0200
@@ -1,32 +1,32 @@
-precommit hook: p1=0000000000000000000000000000000000000000 p2=
-pretxncommit hook: n=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b p1=0000000000000000000000000000000000000000 p2=
+precommit hook: HG_PARENT1=0000000000000000000000000000000000000000 HG_PARENT2=
+pretxncommit hook: HG_NODE=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT1=0000000000000000000000000000000000000000 HG_PARENT2=
0:29b62aeb769f
-commit hook: n=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b p1=0000000000000000000000000000000000000000 p2=
-commit hook b
+commit hook: HG_NODE=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT1=0000000000000000000000000000000000000000 HG_PARENT2=
+commit.b hook: HG_NODE=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT1=0000000000000000000000000000000000000000 HG_PARENT2=
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-precommit hook: p1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b p2=
-pretxncommit hook: n=b702efe9688826e3a91283852b328b84dbf37bc2 p1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b p2=
+precommit hook: HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2=
+pretxncommit hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2=
1:b702efe96888
-commit hook: n=b702efe9688826e3a91283852b328b84dbf37bc2 p1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b p2=
-commit hook b
+commit hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2=
+commit.b hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2=
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-precommit hook: p1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b p2=
-pretxncommit hook: n=1324a5531bac09b329c3845d35ae6a7526874edb p1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b p2=
+precommit hook: HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2=
+pretxncommit hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2=
2:1324a5531bac
-commit hook: n=1324a5531bac09b329c3845d35ae6a7526874edb p1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b p2=
-commit hook b
+commit hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2=
+commit.b hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2=
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
-precommit hook: p1=1324a5531bac09b329c3845d35ae6a7526874edb p2=b702efe9688826e3a91283852b328b84dbf37bc2
-pretxncommit hook: n=4c52fb2e402287dd5dc052090682536c8406c321 p1=1324a5531bac09b329c3845d35ae6a7526874edb p2=b702efe9688826e3a91283852b328b84dbf37bc2
+precommit hook: HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2
+pretxncommit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2
3:4c52fb2e4022
-commit hook: n=4c52fb2e402287dd5dc052090682536c8406c321 p1=1324a5531bac09b329c3845d35ae6a7526874edb p2=b702efe9688826e3a91283852b328b84dbf37bc2
-commit hook b
-prechangegroup hook: u=file:
-changegroup hook: n=b702efe9688826e3a91283852b328b84dbf37bc2 u=file:
-incoming hook: n=b702efe9688826e3a91283852b328b84dbf37bc2 u=file:
-incoming hook: n=1324a5531bac09b329c3845d35ae6a7526874edb u=file:
-incoming hook: n=4c52fb2e402287dd5dc052090682536c8406c321 u=file:
+commit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2
+commit.b hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2
+prechangegroup hook: HG_SOURCE=pull HG_URL=file:
+changegroup hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_SOURCE=pull HG_URL=file:
+incoming hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_SOURCE=pull HG_URL=file:
+incoming hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_SOURCE=pull HG_URL=file:
+incoming hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_SOURCE=pull HG_URL=file:
pulling from ../a
searching for changes
adding changesets
@@ -34,57 +34,58 @@
adding file changes
added 3 changesets with 2 changes to 2 files
(run 'hg update' to get a working copy)
-pretag hook: t=a n=4c52fb2e402287dd5dc052090682536c8406c321 l=0
-precommit hook: p1=4c52fb2e402287dd5dc052090682536c8406c321 p2=
-pretxncommit hook: n=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 p1=4c52fb2e402287dd5dc052090682536c8406c321 p2=
+pretag hook: HG_LOCAL=0 HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_TAG=a
+precommit hook: HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT2=
+pretxncommit hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT2=
4:8ea2ef7ad3e8
-commit hook: n=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 p1=4c52fb2e402287dd5dc052090682536c8406c321 p2=
-commit hook b
-tag hook: t=a n=4c52fb2e402287dd5dc052090682536c8406c321 l=0
-pretag hook: t=la n=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 l=1
-tag hook: t=la n=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 l=1
-pretag hook: t=fa n=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 l=0
-pretag.forbid hook
+commit hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT2=
+commit.b hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT2=
+tag hook: HG_LOCAL=0 HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_TAG=a
+pretag hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=la
+tag hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=la
+pretag hook: HG_LOCAL=0 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fa
+pretag.forbid hook: HG_LOCAL=0 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fa
abort: pretag.forbid hook exited with status 1
-pretag hook: t=fla n=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 l=1
-pretag.forbid hook
+pretag hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fla
+pretag.forbid hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fla
abort: pretag.forbid hook exited with status 1
4:8ea2ef7ad3e8
-precommit hook: p1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 p2=
-pretxncommit hook: n=fad284daf8c032148abaffcd745dafeceefceb61 p1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 p2=
+precommit hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT2=
+pretxncommit hook: HG_NODE=fad284daf8c032148abaffcd745dafeceefceb61 HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT2=
5:fad284daf8c0
-pretxncommit.forbid hook: tip=5:fad284daf8c0
-abort: pretxncommit.forbid hook exited with status 1
+pretxncommit.forbid hook: HG_NODE=fad284daf8c032148abaffcd745dafeceefceb61 HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT2=
+abort: pretxncommit.forbid1 hook exited with status 1
transaction abort!
rollback completed
4:8ea2ef7ad3e8
-precommit hook: p1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 p2=
-precommit.forbid hook
+precommit hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT2=
+precommit.forbid hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT2=
abort: precommit.forbid hook exited with status 1
4:8ea2ef7ad3e8
-preupdate hook: p1=b702efe96888 p2=
+preupdate hook: HG_PARENT1=b702efe96888 HG_PARENT2=
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-preupdate hook: p1=8ea2ef7ad3e8 p2=
-update hook: p1=8ea2ef7ad3e8 p2= err=0
+preupdate hook: HG_PARENT1=8ea2ef7ad3e8 HG_PARENT2=
+update hook: HG_ERROR=0 HG_PARENT1=8ea2ef7ad3e8 HG_PARENT2=
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
3:4c52fb2e4022
-prechangegroup.forbid hook
+prechangegroup.forbid hook: HG_SOURCE=pull HG_URL=file:
pulling from ../a
searching for changes
abort: prechangegroup.forbid hook exited with status 1
-pretxnchangegroup.forbid hook: tip=4:8ea2ef7ad3e8
+4:8ea2ef7ad3e8
+pretxnchangegroup.forbid hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_SOURCE=pull HG_URL=file:
pulling from ../a
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
-abort: pretxnchangegroup.forbid hook exited with status 1
+abort: pretxnchangegroup.forbid1 hook exited with status 1
transaction abort!
rollback completed
3:4c52fb2e4022
-preoutgoing hook: s=pull
-outgoing hook: n=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 s=pull
+preoutgoing hook: HG_SOURCE=pull
+outgoing hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_SOURCE=pull
pulling from ../a
searching for changes
adding changesets
@@ -93,8 +94,8 @@
added 1 changesets with 1 changes to 1 files
(run 'hg update' to get a working copy)
rolling back last transaction
-preoutgoing hook: s=pull
-preoutgoing.forbid hook
+preoutgoing hook: HG_SOURCE=pull
+preoutgoing.forbid hook: HG_SOURCE=pull
pulling from ../a
searching for changes
abort: preoutgoing.forbid hook exited with status 1
@@ -138,3 +139,8 @@
(run 'hg update' to get a working copy)
# make sure --traceback works
Traceback (most recent call last):
+Automatically installed hook
+foo
+calling hook commit.auto:
+Automatically installed hook
+hooks.commit.auto=
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-http
--- a/tests/test-http Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-http Mon Jun 04 22:56:42 2007 +0200
@@ -1,5 +1,7 @@
#!/bin/sh
+cp "$TESTDIR"/printenv.py .
+
hg init test
cd test
echo foo>foo
@@ -31,6 +33,6 @@
echo % pull
cd copy-pull
echo '[hooks]' >> .hg/hgrc
-echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
+echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
hg pull
cd ..
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-http.out
--- a/tests/test-http.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-http.out Mon Jun 04 22:56:42 2007 +0200
@@ -31,7 +31,7 @@
1 files, 1 changesets, 1 total revisions
adding bar
% pull
-changegroup: u=http://localhost:20059/
+changegroup hook: HG_NODE=cfbd11a1fa315300a080c3de8fe36b0fc5820acf HG_SOURCE=pull HG_URL=http://localhost:20059/
pulling from http://localhost:20059/
searching for changes
adding changesets
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-hup.out
--- a/tests/test-hup.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-hup.out Mon Jun 04 22:56:42 2007 +0200
@@ -4,4 +4,4 @@
killed!
transaction abort!
rollback completed
-.hg/00changelog.i .hg/journal.dirstate .hg/requires .hg/store .hg/store/00changelog.i
+.hg/00changelog.i .hg/journal.dirstate .hg/requires .hg/store .hg/store/00changelog.i .hg/store/00changelog.i.a
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-impexp-branch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-impexp-branch Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+cat >findbranch.py <rev
+hg add rev
+hg commit -m "No branch."
+hg branch abranch
+echo "Rev 2" >rev
+hg commit -m "With branch."
+if hg export 0 | python ../findbranch.py; then
+ echo "Export of default branch revision has Branch header" 1>&2
+ exit 1
+fi
+if hg export 1 | python ../findbranch.py; then
+ : # Do nothing
+else
+ echo "Export of branch revision is missing Branch header" 1>&2
+ exit 1
+fi
+# Make sure import still works with branch information in patches.
+cd ..
+hg init b
+cd b
+hg -R ../a export 0 | hg import -
+hg -R ../a export 1 | hg import -
+cd ..
+rm -rf b
+hg init b
+cd b
+hg -R ../a export 0 | hg import --exact -
+hg -R ../a export 1 | hg import --exact -
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-impexp-branch.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-impexp-branch.out Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,4 @@
+applying patch from stdin
+applying patch from stdin
+applying patch from stdin
+applying patch from stdin
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-incoming-outgoing.out
--- a/tests/test-incoming-outgoing.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-incoming-outgoing.out Mon Jun 04 22:56:42 2007 +0200
@@ -4,6 +4,7 @@
crosschecking files in changesets and manifests
checking files
1 files, 9 changesets, 9 total revisions
+comparing with http://localhost:20059/
changeset: 0:9cb21d99fe27
user: test
date: Mon Jan 12 13:46:40 1970 +0000
@@ -50,6 +51,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: 8
+comparing with http://localhost:20059/
changeset: 0:9cb21d99fe27
user: test
date: Mon Jan 12 13:46:40 1970 +0000
@@ -76,6 +78,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: 4
+comparing with test
changeset: 0:9cb21d99fe27
user: test
date: Mon Jan 12 13:46:40 1970 +0000
@@ -122,6 +125,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: 8
+comparing with test
changeset: 0:9cb21d99fe27
user: test
date: Mon Jan 12 13:46:40 1970 +0000
@@ -147,6 +151,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: 4
+comparing with http://localhost:20059/
changeset: 0:9cb21d99fe27
user: test
date: Mon Jan 12 13:46:40 1970 +0000
@@ -193,6 +198,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: 8
+comparing with test
changeset: 0:9cb21d99fe27
user: test
date: Mon Jan 12 13:46:40 1970 +0000
@@ -267,6 +273,7 @@
crosschecking files in changesets and manifests
checking files
1 files, 14 changesets, 14 total revisions
+comparing with test
searching for changes
changeset: 9:3741c3ad1096
user: test
@@ -294,6 +301,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: 13
+comparing with http://localhost:20059/
searching for changes
changeset: 9:3741c3ad1096
user: test
@@ -321,6 +329,7 @@
date: Mon Jan 12 13:46:40 1970 +0000
summary: 13
+comparing with http://localhost:20059/
searching for changes
changeset: 9:3741c3ad1096
user: test
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-init
--- a/tests/test-init Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-init Mon Jun 04 22:56:42 2007 +0200
@@ -2,47 +2,68 @@
# This test tries to exercise the ssh functionality with a dummy script
-cat <<'EOF' > dummyssh
-#!/bin/sh
-# this attempts to deal with relative pathnames
-cd `dirname $0`
+cat < dummyssh
+import sys
+import os
-# check for proper args
-if [ $1 != "user@dummy" ] ; then
- exit -1
-fi
+os.chdir(os.path.dirname(sys.argv[0]))
+if sys.argv[1] != "user@dummy":
+ sys.exit(-1)
+
+if not os.path.exists("dummyssh"):
+ sys.exit(-1)
-# check that we're in the right directory
-if [ ! -x dummyssh ] ; then
- exit -1
-fi
+log = open("dummylog", "ab")
+log.write("Got arguments")
+for i, arg in enumerate(sys.argv[1:]):
+ log.write(" %d:%s" % (i+1, arg))
+log.write("\n")
+log.close()
+r = os.system(sys.argv[2])
+sys.exit(bool(r))
+EOF
-echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog
-$2
-EOF
-chmod +x dummyssh
+checknewrepo()
+{
+ name=$1
+
+ if [ -d $name/.hg/store ]; then
+ echo store created
+ fi
+
+ if [ -f $name/.hg/00changelog.i ]; then
+ echo 00changelog.i created
+ fi
+
+ cat $name/.hg/requires
+}
echo "# creating 'local'"
hg init local
+checknewrepo local
echo this > local/foo
hg ci --cwd local -A -m "init" -d "1000000 0"
+echo "# creating repo with old format"
+hg --config format.usestore=false init old
+checknewrepo old
+
echo "#test failure"
hg init local
echo "# init+push to remote2"
-hg init -e ./dummyssh ssh://user@dummy/remote2
+hg init -e "python ./dummyssh" ssh://user@dummy/remote2
hg incoming -R remote2 local
-hg push -R local -e ./dummyssh ssh://user@dummy/remote2
+hg push -R local -e "python ./dummyssh" ssh://user@dummy/remote2
echo "# clone to remote1"
-hg clone -e ./dummyssh local ssh://user@dummy/remote1
+hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1
echo "# init to existing repo"
-hg init -e ./dummyssh ssh://user@dummy/remote1
+hg init -e "python ./dummyssh" ssh://user@dummy/remote1
echo "# clone to existing repo"
-hg clone -e ./dummyssh local ssh://user@dummy/remote1
+hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1
echo "# output of dummyssh"
cat dummylog
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-init.out
--- a/tests/test-init.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-init.out Mon Jun 04 22:56:42 2007 +0200
@@ -1,8 +1,15 @@
# creating 'local'
+store created
+00changelog.i created
+revlogv1
+store
adding foo
+# creating repo with old format
+revlogv1
#test failure
abort: repository local already exists!
# init+push to remote2
+comparing with local
changeset: 0:c4e059d443be
tag: tip
user: test
@@ -28,13 +35,13 @@
abort: repository remote1 already exists!
abort: could not create remote repo!
# output of dummyssh
-Got arguments 1:user@dummy 2:hg init remote2 3: 4: 5:
-Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio 3: 4: 5:
-Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio 3: 4: 5:
-Got arguments 1:user@dummy 2:hg init remote1 3: 4: 5:
-Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio 3: 4: 5:
-Got arguments 1:user@dummy 2:hg init remote1 3: 4: 5:
-Got arguments 1:user@dummy 2:hg init remote1 3: 4: 5:
+Got arguments 1:user@dummy 2:hg init remote2
+Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
+Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
+Got arguments 1:user@dummy 2:hg init remote1
+Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio
+Got arguments 1:user@dummy 2:hg init remote1
+Got arguments 1:user@dummy 2:hg init remote1
# comparing repositories
0:c4e059d443be
0:c4e059d443be
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-install
--- a/tests/test-install Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-install Mon Jun 04 22:56:42 2007 +0200
@@ -1,3 +1,3 @@
#!/bin/sh
-HGMERGE=merge hg debuginstall
+hg debuginstall
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-issue352
--- a/tests/test-issue352 Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-issue352 Mon Jun 04 22:56:42 2007 +0200
@@ -1,21 +1,22 @@
-#!/bin/bash
+#!/bin/sh
# http://www.selenic.com/mercurial/bts/issue352
hg init foo
cd foo
-A=`echo -e -n 'he\rllo'`
+A=`printf 'he\rllo'`
-echo foo > "hell
-o"
echo foo > "$A"
hg add
hg ci -A -m m
rm "$A"
-ls
+
+echo foo > "hell
+o"
hg add
-# BUG ? we don't walk on filenames with '\n' (regexp related) ?
-hg debugwalk
hg ci -A -m m
+echo foo > "$A"
+hg debugwalk
+
exit 0
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-issue352.out
--- a/tests/test-issue352.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-issue352.out Mon Jun 04 22:56:42 2007 +0200
@@ -2,6 +2,13 @@
abort: '\n' and '\r' disallowed in filenames
adding he
llo
abort: '\n' and '\r' disallowed in filenames
-hell
+adding hell
+o
+abort: '\n' and '\r' disallowed in filenames
+adding hell
o
-nothing changed
+abort: '\n' and '\r' disallowed in filenames
+f he
llo he
llo
+f hell
+o hell
+o
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-locate
--- a/tests/test-locate Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-locate Mon Jun 04 22:56:42 2007 +0200
@@ -1,5 +1,14 @@
#!/bin/sh
-#
+
+hglocate()
+{
+ echo "hg locate $@"
+ hg locate "$@"
+ ret=$?
+ echo
+ return $ret
+}
+
mkdir t
cd t
hg init
@@ -8,24 +17,40 @@
echo 0 > t.h
mkdir t
echo 0 > t/x
+echo 0 > t/b
+echo 0 > t/e.h
+mkdir dir.h
+echo 0 > dir.h/foo
hg ci -A -m m -d "1000000 0"
touch nottracked
-hg locate a
-hg locate NONEXISTENT
-hg locate
+hglocate a && echo locate succeeded || echo locate failed
+hglocate NONEXISTENT && echo locate succeeded || echo locate failed
+hglocate
hg rm a
hg ci -m m -d "1000000 0"
-hg locate a
-hg locate NONEXISTENT
-hg locate
-hg locate -r 0 a
-hg locate -r 0 NONEXISTENT
-hg locate -r 0
+hglocate a
+hglocate NONEXISTENT
+hglocate relpath:NONEXISTENT
+hglocate
+hglocate -r 0 a
+hglocate -r 0 NONEXISTENT
+hglocate -r 0 relpath:NONEXISTENT
+hglocate -r 0
echo % -I/-X with relative path should work
cd t
-hg locate
-hg locate -I ../t
+hglocate
+hglocate -I ../t
# test issue294
cd ..
rm -r t
-hg locate t
+hglocate 't/**'
+mkdir otherdir
+cd otherdir
+hglocate b
+hglocate '*.h'
+hglocate path:t/x
+hglocate 're:.*\.h$'
+hglocate -r 0 b
+hglocate -r 0 '*.h'
+hglocate -r 0 path:t/x
+hglocate -r 0 're:.*\.h$'
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-locate.out
--- a/tests/test-locate.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-locate.out Mon Jun 04 22:56:42 2007 +0200
@@ -1,27 +1,102 @@
adding a
adding b
+adding dir.h/foo
adding t.h
+adding t/b
+adding t/e.h
adding t/x
+hg locate a
a
-NONEXISTENT: No such file or directory
+
+locate succeeded
+hg locate NONEXISTENT
+
+locate failed
+hg locate
+a
+b
+dir.h/foo
+t.h
+t/b
+t/e.h
+t/x
+
+hg locate a
+
+hg locate NONEXISTENT
+
+hg locate relpath:NONEXISTENT
+
+hg locate
+b
+dir.h/foo
+t.h
+t/b
+t/e.h
+t/x
+
+hg locate -r 0 a
+a
+
+hg locate -r 0 NONEXISTENT
+
+hg locate -r 0 relpath:NONEXISTENT
+
+hg locate -r 0
a
b
+dir.h/foo
t.h
+t/b
+t/e.h
t/x
-a: No such file or directory
-NONEXISTENT: No such file or directory
+
+% -I/-X with relative path should work
+hg locate
b
+dir.h/foo
t.h
+t/b
+t/e.h
+t/x
+
+hg locate -I ../t
+t/b
+t/e.h
+t/x
+
+hg locate t/**
+t/b
+t/e.h
t/x
-a
-NONEXISTENT: No such file in rev ce18e5bc5cd3
-a
-t/x
-b
-t.h
-% -I/-X with relative path should work
-b
-t.h
-t/x
-t/x
-t/x
+
+hg locate b
+../b
+../t/b
+
+hg locate *.h
+../t.h
+../t/e.h
+
+hg locate path:t/x
+../t/x
+
+hg locate re:.*\.h$
+../t.h
+../t/e.h
+
+hg locate -r 0 b
+../b
+../t/b
+
+hg locate -r 0 *.h
+../t.h
+../t/e.h
+
+hg locate -r 0 path:t/x
+../t/x
+
+hg locate -r 0 re:.*\.h$
+../t.h
+../t/e.h
+
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-merge-commit
--- a/tests/test-merge-commit Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-merge-commit Mon Jun 04 22:56:42 2007 +0200
@@ -1,9 +1,6 @@
#!/bin/sh
# check that renames are correctly saved by a commit after a merge
-HGMERGE=merge
-export HGMERGE
-
# test with the merge on 3 having the rename on the local parent
hg init a
cd a
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-merge-local
--- a/tests/test-merge-local Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-merge-local Mon Jun 04 22:56:42 2007 +0200
@@ -38,13 +38,13 @@
hg st
echo "# local merge with conflicts"
-HGMERGE=merge hg co
+hg co
hg co 0
hg diff --nodates | grep "^[+-][^<>]"
hg st
echo "# local merge without conflicts"
hg revert zzz2_merge_bad
-HGMERGE=merge hg co
+hg co
hg diff --nodates | grep "^[+-][^<>]"
hg st
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-merge-local.out
--- a/tests/test-merge-local.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-merge-local.out Mon Jun 04 22:56:42 2007 +0200
@@ -36,7 +36,7 @@
M zzz1_merge_ok
M zzz2_merge_bad
# local merge with conflicts
-merge: warning: conflicts during merge
+warning: conflicts during merge.
merging zzz1_merge_ok
merging zzz2_merge_bad
merging zzz2_merge_bad failed!
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-merge-revert
--- a/tests/test-merge-revert Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-merge-revert Mon Jun 04 22:56:42 2007 +0200
@@ -25,7 +25,7 @@
hg id
hg update -C 0
echo "changed file1" >> file1
-HGMERGE=merge hg update
+hg update
hg diff
hg status
hg id
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-merge-revert2
--- a/tests/test-merge-revert2 Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-merge-revert2 Mon Jun 04 22:56:42 2007 +0200
@@ -26,8 +26,8 @@
hg id
hg update -C 0
echo "changed file1 different" >> file1
-HGMERGE=merge hg update
-hg diff --nodates | sed -e "s/\(<<<<<<<\) .*/\1/" -e "s/\(>>>>>>>\) .*/\1/"
+hg update
+hg diff --nodates
hg status
hg id
hg revert --no-backup --all
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-merge-revert2.out
--- a/tests/test-merge-revert2.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-merge-revert2.out Mon Jun 04 22:56:42 2007 +0200
@@ -9,7 +9,7 @@
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f248da0d4c3e tip
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-merge: warning: conflicts during merge
+warning: conflicts during merge.
merging file1
merging file1 failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
@@ -23,11 +23,11 @@
@@ -1,3 +1,7 @@ added file1
added file1
another line of text
-+<<<<<<<
++<<<<<<< my
+changed file1 different
+=======
changed file1
-+>>>>>>>
++>>>>>>> other
M file1
f248da0d4c3e+ tip
reverting file1
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-merge1
--- a/tests/test-merge1 Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-merge1 Mon Jun 04 22:56:42 2007 +0200
@@ -1,10 +1,10 @@
#!/bin/sh
-cat <<'EOF' > merge
-#!/bin/sh
-echo merging for `basename $1`
+cat < merge
+import sys, os
+print "merging for", os.path.basename(sys.argv[1])
EOF
-chmod +x merge
+HGMERGE="python ../merge"; export HGMERGE
mkdir t
cd t
@@ -22,7 +22,7 @@
hg commit -m "commit #2" -d "1000000 0"
echo This is file b1 > b
echo %% no merges expected
-env HGMERGE=../merge hg merge 1
+hg merge 1
hg diff --nodates
hg status
cd ..; rm -r t
@@ -43,9 +43,9 @@
hg commit -m "commit #2" -d "1000000 0"
echo This is file b2 > b
echo %% merge should fail
-env HGMERGE=../merge hg merge 1
+hg merge 1
echo %% merge of b expected
-env HGMERGE=../merge hg merge -f 1
+hg merge -f 1
hg diff --nodates
hg status
cd ..; rm -r t
@@ -72,9 +72,9 @@
echo This is file b22 > b
echo %% merge fails
-env HGMERGE=../merge hg merge 2
+hg merge 2
echo %% merge expected!
-env HGMERGE=../merge hg merge -f 2
+hg merge -f 2
hg diff --nodates
hg status
cd ..; rm -r t
@@ -96,8 +96,8 @@
hg commit -m "commit #3" -d "1000000 0"
echo This is file b33 > b
echo %% merge of b should fail
-env HGMERGE=../merge hg merge 2
+hg merge 2
echo %% merge of b expected
-env HGMERGE=../merge hg merge -f 2
+hg merge -f 2
hg diff --nodates
hg status
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-merge6
--- a/tests/test-merge6 Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-merge6 Mon Jun 04 22:56:42 2007 +0200
@@ -1,11 +1,10 @@
#!/bin/sh
-cat <<'EOF' > merge
-#!/bin/sh
-echo merging for `basename $1`
+cat < merge
+import sys, os
+print "merging for", os.path.basename(sys.argv[1])
EOF
-chmod +x merge
-HGMERGE=./merge; export HGMERGE
+HGMERGE="python ../merge"; export HGMERGE
mkdir A1
cd A1
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-merge7
--- a/tests/test-merge7 Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-merge7 Mon Jun 04 22:56:42 2007 +0200
@@ -35,7 +35,7 @@
# now pull and merge from test-a
hg pull ../test-a
-HGMERGE=merge hg merge
+hg merge
# resolve conflict
cat >test.txt <<"EOF"
one
@@ -57,9 +57,9 @@
# pull and merge from test-a again
cd ../test-b
hg pull ../test-a
-HGMERGE=merge hg merge --debug
+hg merge --debug
-cat test.txt | sed "s% .*%%"
+cat test.txt
hg debugindex .hg/store/data/test.txt.i
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-merge7.out
--- a/tests/test-merge7.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-merge7.out Mon Jun 04 22:56:42 2007 +0200
@@ -6,7 +6,7 @@
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)
-merge: warning: conflicts during merge
+warning: conflicts during merge.
merging test.txt
merging test.txt failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
@@ -20,7 +20,7 @@
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)
-merge: warning: conflicts during merge
+warning: conflicts during merge.
resolving manifests
overwrite None partial False
ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360
@@ -33,11 +33,11 @@
hg update -C 3
hg merge 4
one
-<<<<<<<
+<<<<<<< my
two-point-five
=======
two-point-one
->>>>>>>
+>>>>>>> other
three
rev offset length base linkrev nodeid p1 p2
0 0 7 0 0 01365c4cca56 000000000000 000000000000
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-mq
--- a/tests/test-mq Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-mq Mon Jun 04 22:56:42 2007 +0200
@@ -40,6 +40,40 @@
hg -R c qnew test.patch
hg -R c/.hg/patches st
+echo '% qinit; qinit -c'
+hg init d
+cd d
+hg qinit
+hg qinit -c
+# qinit -c should create both files if they don't exist
+echo ' .hgignore:'
+cat .hg/patches/.hgignore
+echo ' series:'
+cat .hg/patches/series
+hg qinit -c 2>&1 | sed -e 's/repository.*already/repository already/'
+cd ..
+
+echo '% qinit; ; qinit -c'
+hg init e
+cd e
+hg qnew A
+echo foo > foo
+hg add foo
+hg qrefresh
+hg qnew B
+echo >> foo
+hg qrefresh
+echo status >> .hg/patches/.hgignore
+echo bleh >> .hg/patches/.hgignore
+hg qinit -c
+hg -R .hg/patches status
+# qinit -c shouldn't touch these files if they already exist
+echo ' .hgignore:'
+cat .hg/patches/.hgignore
+echo ' series:'
+cat .hg/patches/series
+cd ..
+
cd a
echo % qnew -m
@@ -147,6 +181,46 @@
hg qpop -a
hg push ../../k
+echo % qpush/qpop error codes
+errorcode()
+{
+ hg "$@" && echo " $@ succeeds" || echo " $@ fails"
+}
+
+# we want to start with some patches applied
+hg qpush -a
+echo " % pops all patches and succeeds"
+errorcode qpop -a
+echo " % does nothing and succeeds"
+errorcode qpop -a
+echo " % fails - nothing else to pop"
+errorcode qpop
+echo " % pushes a patch and succeeds"
+errorcode qpush
+echo " % pops a patch and succeeds"
+errorcode qpop
+echo " % pushes up to test1b.patch and succeeds"
+errorcode qpush test1b.patch
+echo " % does nothing and succeeds"
+errorcode qpush test1b.patch
+echo " % does nothing and succeeds"
+errorcode qpop test1b.patch
+echo " % fails - can't push to this patch"
+errorcode qpush test.patch
+echo " % fails - can't pop to this patch"
+errorcode qpop test2.patch
+echo " % pops up to test.patch and succeeds"
+errorcode qpop test.patch
+echo " % pushes all patches and succeeds"
+errorcode qpush -a
+echo " % does nothing and succeeds"
+errorcode qpush -a
+echo " % fails - nothing else to push"
+errorcode qpush
+echo " % does nothing and succeeds"
+errorcode qpush test2.patch
+
+
echo % strip
cd ../../b
echo x>x
@@ -188,6 +262,9 @@
hg qpush -a
hg st
+echo % mq tags
+hg log --template '{rev} {tags}\n' -r qparent:qtip
+
cat >>$HGRCPATH <&1 | rewrite_path
hg manifest
+
+# ensure status is correct after merge
+hg qpop -a
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-mq-merge.out
--- a/tests/test-mq-merge.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-mq-merge.out Mon Jun 04 22:56:42 2007 +0200
@@ -9,3 +9,4 @@
applying rm_a
Now at: rm_a
b
+Patch queue now empty
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-mq-qgoto
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-mq-qgoto Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+echo "[extensions]" >> $HGRCPATH
+echo "mq=" >> $HGRCPATH
+
+hg init a
+cd a
+echo a > a
+hg ci -Ama
+
+hg qnew a.patch
+echo a >> a
+hg qrefresh
+
+hg qnew b.patch
+echo b > b
+hg add b
+hg qrefresh
+
+hg qnew c.patch
+echo c > c
+hg add c
+hg qrefresh
+
+hg qgoto a.patch
+hg qgoto c.patch
+hg qgoto b.patch
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-mq-qgoto.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-mq-qgoto.out Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,6 @@
+adding a
+Now at: a.patch
+applying b.patch
+applying c.patch
+Now at: c.patch
+Now at: b.patch
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-mq.out
--- a/tests/test-mq.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-mq.out Mon Jun 04 22:56:42 2007 +0200
@@ -30,6 +30,7 @@
qdelete remove patches from queue
qdiff diff of the current patch
qfold fold the named patches into the current patch
+ qgoto push or pop patches until named patch is at top of stack
qguard set or print guards for a patch
qheader Print the header of the topmost or specified patch
qimport import a patch
@@ -62,6 +63,26 @@
A .hgignore
A series
A test.patch
+% qinit; qinit -c
+ .hgignore:
+syntax: glob
+status
+guards
+ series:
+abort: repository already exists!
+% qinit; ; qinit -c
+adding .hg/patches/A
+adding .hg/patches/B
+A .hgignore
+A A
+A B
+A series
+ .hgignore:
+status
+bleh
+ series:
+A
+B
% qnew -m
foo bar
% qrefresh
@@ -149,6 +170,61 @@
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
+% qpush/qpop error codes
+applying test.patch
+applying test1b.patch
+applying test2.patch
+Now at: test2.patch
+ % pops all patches and succeeds
+Patch queue now empty
+ qpop -a succeeds
+ % does nothing and succeeds
+no patches applied
+ qpop -a succeeds
+ % fails - nothing else to pop
+no patches applied
+ qpop fails
+ % pushes a patch and succeeds
+applying test.patch
+Now at: test.patch
+ qpush succeeds
+ % pops a patch and succeeds
+Patch queue now empty
+ qpop succeeds
+ % pushes up to test1b.patch and succeeds
+applying test.patch
+applying test1b.patch
+Now at: test1b.patch
+ qpush test1b.patch succeeds
+ % does nothing and succeeds
+qpush: test1b.patch is already at the top
+ qpush test1b.patch succeeds
+ % does nothing and succeeds
+qpop: test1b.patch is already at the top
+ qpop test1b.patch succeeds
+ % fails - can't push to this patch
+abort: cannot push to a previous patch: test.patch
+ qpush test.patch fails
+ % fails - can't pop to this patch
+abort: patch test2.patch is not applied
+ qpop test2.patch fails
+ % pops up to test.patch and succeeds
+Now at: test.patch
+ qpop test.patch succeeds
+ % pushes all patches and succeeds
+applying test1b.patch
+applying test2.patch
+Now at: test2.patch
+ qpush -a succeeds
+ % does nothing and succeeds
+all patches are currently applied
+ qpush -a succeeds
+ % fails - nothing else to push
+patch series already fully applied
+ qpush fails
+ % does nothing and succeeds
+all patches are currently applied
+ qpush test2.patch succeeds
% strip
adding x
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -192,6 +268,10 @@
Errors during apply, please fix and refresh bar
? foo
? foo.rej
+% mq tags
+0 qparent
+1 qbase foo
+2 qtip bar tip
new file
diff --git a/new b/new
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-newbranch
--- a/tests/test-newbranch Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-newbranch Mon Jun 04 22:56:42 2007 +0200
@@ -12,7 +12,9 @@
hg ci -m "add branch name" -d "1000000 0"
hg branch bar
hg ci -m "change branch name" -d "1000000 0"
+echo % branch shadowing
hg branch default
+hg branch -f default
hg ci -m "clear branch name" -d "1000000 0"
hg co foo
@@ -49,4 +51,15 @@
hg branch foobar
hg up
+echo % fastforward merge
+hg branch ff
+echo ff > ff
+hg ci -Am'fast forward' -d '1000000 0'
+hg up foo
+hg merge ff
+hg branch
+hg commit -m'Merge ff into foo' -d '1000000 0'
+hg parents
+hg manifest
+
exit 0
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-newbranch.out
--- a/tests/test-newbranch.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-newbranch.out Mon Jun 04 22:56:42 2007 +0200
@@ -1,4 +1,6 @@
foo
+% branch shadowing
+abort: a branch of the same name already exists (use --force to override)
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
foo
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -82,3 +84,18 @@
bf1bc2f45e83
4909a3732169 (foo) tip
abort: branch foobar not found
+% fastforward merge
+adding ff
+0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+(branch merge, don't forget to commit)
+foo
+changeset: 6:9cc105113eeb
+branch: foo
+tag: tip
+user: test
+date: Mon Jan 12 13:46:40 1970 +0000
+summary: Merge ff into foo
+
+a
+ff
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-patchbomb.out
--- a/tests/test-patchbomb.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-patchbomb.out Mon Jun 04 22:56:42 2007 +0200
@@ -1,11 +1,12 @@
adding a
hg email: option --date not recognized
-hg email [OPTION]... [REV]...
+hg email [OPTION]... [DEST]...
+
+send changesets by email
-send changesets as a series of patch emails
-
- The series starts with a "[PATCH 0 of N]" introduction, which
- describes the series as a whole.
+ By default, diffs are sent in the format generated by hg export,
+ one per message. The series starts with a "[PATCH 0 of N]"
+ introduction, which describes the series as a whole.
Each patch email has a Subject line of "[PATCH M of N] ...", using
the first line of the changeset description as the subject text.
@@ -14,29 +15,65 @@
program is installed, the result of running diffstat on the patch.
Finally, the patch itself, as generated by "hg export".
+ With --outgoing, emails will be generated for patches not
+ found in the destination repository (or only those which are
+ ancestors of the specified revisions if any are provided)
+
+ With --bundle, changesets are selected as for --outgoing,
+ but a single email containing a binary Mercurial bundle as an
+ attachment will be sent.
+
+ Examples:
+
+ hg email -r 3000 # send patch 3000 only
+ hg email -r 3000 -r 3001 # send patches 3000 and 3001
+ hg email -r 3000:3005 # send patches 3000 through 3005
+ hg email 3000 # send patch 3000 (deprecated)
+
+ hg email -o # send all patches not in default
+ hg email -o DEST # send all patches not in DEST
+ hg email -o -r 3000 # send all ancestors of 3000 not in default
+ hg email -o -r 3000 DEST # send all ancestors of 3000 not in DEST
+
+ hg email -b # send bundle of all patches not in default
+ hg email -b DEST # send bundle of all patches not in DEST
+ hg email -b -r 3000 # bundle of all ancestors of 3000 not in default
+ hg email -b -r 3000 DEST # bundle of all ancestors of 3000 not in DEST
+
+ Before using this command, you will need to enable email in your hgrc.
+ See the [email] section in hgrc(5) for details.
+
options:
- -a --attach send patches as inline attachments
- --bcc email addresses of blind copy recipients
- -c --cc email addresses of copy recipients
- -d --diffstat add diffstat output to messages
- -g --git use git extended diff format
- -f --from email address of sender
- --plain omit hg patch header
- -n --test print messages that would be sent
- -m --mbox write messages to mbox file instead of sending them
- -s --subject subject of first message (intro or single patch)
- -t --to email addresses of recipients
+ -a --attach send patches as inline attachments
+ --bcc email addresses of blind copy recipients
+ -c --cc email addresses of copy recipients
+ -d --diffstat add diffstat output to messages
+ -g --git use git extended diff format
+ -f --from email address of sender
+ --plain omit hg patch header
+ -n --test print messages that would be sent
+ -m --mbox write messages to mbox file instead of sending them
+ -o --outgoing send changes not found in the target repository
+ -b --bundle send changes not in target as a binary bundle
+ -r --rev a revision to send
+ -s --subject subject of first message (intro or single patch)
+ -t --to email addresses of recipients
+ --force run even when remote repository is unrelated (with -b)
+ --base a base changeset to specify instead of a destination (with -b)
+ -e --ssh specify ssh command to use
+ --remotecmd specify hg command to run on the remote side
use "hg -v help email" to show global options
adding b
hg email: option --date not recognized
-hg email [OPTION]... [REV]...
+hg email [OPTION]... [DEST]...
+
+send changesets by email
-send changesets as a series of patch emails
-
- The series starts with a "[PATCH 0 of N]" introduction, which
- describes the series as a whole.
+ By default, diffs are sent in the format generated by hg export,
+ one per message. The series starts with a "[PATCH 0 of N]"
+ introduction, which describes the series as a whole.
Each patch email has a Subject line of "[PATCH M of N] ...", using
the first line of the changeset description as the subject text.
@@ -45,18 +82,53 @@
program is installed, the result of running diffstat on the patch.
Finally, the patch itself, as generated by "hg export".
+ With --outgoing, emails will be generated for patches not
+ found in the destination repository (or only those which are
+ ancestors of the specified revisions if any are provided)
+
+ With --bundle, changesets are selected as for --outgoing,
+ but a single email containing a binary Mercurial bundle as an
+ attachment will be sent.
+
+ Examples:
+
+ hg email -r 3000 # send patch 3000 only
+ hg email -r 3000 -r 3001 # send patches 3000 and 3001
+ hg email -r 3000:3005 # send patches 3000 through 3005
+ hg email 3000 # send patch 3000 (deprecated)
+
+ hg email -o # send all patches not in default
+ hg email -o DEST # send all patches not in DEST
+ hg email -o -r 3000 # send all ancestors of 3000 not in default
+ hg email -o -r 3000 DEST # send all ancestors of 3000 not in DEST
+
+ hg email -b # send bundle of all patches not in default
+ hg email -b DEST # send bundle of all patches not in DEST
+ hg email -b -r 3000 # bundle of all ancestors of 3000 not in default
+ hg email -b -r 3000 DEST # bundle of all ancestors of 3000 not in DEST
+
+ Before using this command, you will need to enable email in your hgrc.
+ See the [email] section in hgrc(5) for details.
+
options:
- -a --attach send patches as inline attachments
- --bcc email addresses of blind copy recipients
- -c --cc email addresses of copy recipients
- -d --diffstat add diffstat output to messages
- -g --git use git extended diff format
- -f --from email address of sender
- --plain omit hg patch header
- -n --test print messages that would be sent
- -m --mbox write messages to mbox file instead of sending them
- -s --subject subject of first message (intro or single patch)
- -t --to email addresses of recipients
+ -a --attach send patches as inline attachments
+ --bcc email addresses of blind copy recipients
+ -c --cc email addresses of copy recipients
+ -d --diffstat add diffstat output to messages
+ -g --git use git extended diff format
+ -f --from email address of sender
+ --plain omit hg patch header
+ -n --test print messages that would be sent
+ -m --mbox write messages to mbox file instead of sending them
+ -o --outgoing send changes not found in the target repository
+ -b --bundle send changes not in target as a binary bundle
+ -r --rev a revision to send
+ -s --subject subject of first message (intro or single patch)
+ -t --to email addresses of recipients
+ --force run even when remote repository is unrelated (with -b)
+ --base a base changeset to specify instead of a destination (with -b)
+ -e --ssh specify ssh command to use
+ --remotecmd specify hg command to run on the remote side
use "hg -v help email" to show global options
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-purge
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-purge Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,130 @@
+#!/bin/sh
+
+cat <> $HGRCPATH
+[extensions]
+hgext.purge=
+EOF
+
+echo % init
+hg init t
+cd t
+
+echo % setup
+echo r1 > r1
+hg ci -qAmr1 -d'0 0'
+mkdir directory
+echo r2 > directory/r2
+hg ci -qAmr2 -d'1 0'
+echo 'ignored' > .hgignore
+hg ci -qAmr3 -d'2 0'
+
+echo % delete an empty directory
+mkdir empty_dir
+hg purge -p
+hg purge -v
+ls
+
+echo % delete an untracked directory
+mkdir untracked_dir
+touch untracked_dir/untracked_file1
+touch untracked_dir/untracked_file2
+hg purge -p
+hg purge -v
+ls
+
+echo % delete an untracked file
+touch untracked_file
+hg purge -p
+hg purge -v
+ls
+
+echo % delete an untracked file in a tracked directory
+touch directory/untracked_file
+hg purge -p
+hg purge -v
+ls
+
+echo % delete nested directories
+mkdir -p untracked_directory/nested_directory
+hg purge -p
+hg purge -v
+ls
+
+echo % delete nested directories from a subdir
+mkdir -p untracked_directory/nested_directory
+cd directory
+hg purge -p
+hg purge -v
+cd ..
+ls
+
+echo % delete only part of the tree
+mkdir -p untracked_directory/nested_directory
+touch directory/untracked_file
+cd directory
+hg purge -p ../untracked_directory
+hg purge -v ../untracked_directory
+cd ..
+ls
+ls directory/untracked_file
+rm directory/untracked_file
+
+echo % delete ignored files
+touch ignored
+hg purge -p
+hg purge -v
+ls
+
+echo % abort with missing files until we support name mangling filesystems
+touch untracked_file
+rm r1
+# hide error messages to avoid changing the output when the text changes
+hg purge -p 2> /dev/null
+if [ $? -ne 0 ]; then
+ echo "refused to run"
+fi
+if [ -f untracked_file ]; then
+ echo "untracked_file still around"
+fi
+hg purge -p --force
+hg purge -v 2> /dev/null
+if [ $? -ne 0 ]; then
+ echo "refused to run"
+fi
+if [ -f untracked_file ]; then
+ echo "untracked_file still around"
+fi
+hg purge -v --force
+hg revert --all --quiet
+ls
+
+echo % skip excluded files
+touch excluded_file
+hg purge -p -X excluded_file
+hg purge -v -X excluded_file
+ls
+rm excluded_file
+
+echo % skip files in excluded dirs
+mkdir excluded_dir
+touch excluded_dir/file
+hg purge -p -X excluded_dir
+hg purge -v -X excluded_dir
+ls
+ls excluded_dir
+rm -R excluded_dir
+
+echo % skip excluded empty dirs
+mkdir excluded_dir
+hg purge -p -X excluded_dir
+hg purge -v -X excluded_dir
+ls
+rmdir excluded_dir
+
+echo % skip patterns
+mkdir .svn
+touch .svn/foo
+mkdir directory/.svn
+touch directory/.svn/foo
+hg purge -p -X .svn -X '*/.svn'
+hg purge -p -X re:.*.svn
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-purge.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-purge.out Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,72 @@
+% init
+% setup
+% delete an empty directory
+empty_dir
+Removing directory empty_dir
+directory
+r1
+% delete an untracked directory
+untracked_dir/untracked_file1
+untracked_dir/untracked_file2
+Removing file untracked_dir/untracked_file1
+Removing file untracked_dir/untracked_file2
+Removing directory untracked_dir
+directory
+r1
+% delete an untracked file
+untracked_file
+Removing file untracked_file
+directory
+r1
+% delete an untracked file in a tracked directory
+directory/untracked_file
+Removing file directory/untracked_file
+directory
+r1
+% delete nested directories
+untracked_directory/nested_directory
+Removing directory untracked_directory/nested_directory
+Removing directory untracked_directory
+directory
+r1
+% delete nested directories from a subdir
+untracked_directory/nested_directory
+Removing directory untracked_directory/nested_directory
+Removing directory untracked_directory
+directory
+r1
+% delete only part of the tree
+untracked_directory/nested_directory
+Removing directory untracked_directory/nested_directory
+Removing directory untracked_directory
+directory
+r1
+directory/untracked_file
+% delete ignored files
+ignored
+Removing file ignored
+directory
+r1
+% abort with missing files until we support name mangling filesystems
+refused to run
+untracked_file still around
+untracked_file
+refused to run
+untracked_file still around
+Removing file untracked_file
+directory
+r1
+% skip excluded files
+directory
+excluded_file
+r1
+% skip files in excluded dirs
+directory
+excluded_dir
+r1
+file
+% skip excluded empty dirs
+directory
+excluded_dir
+r1
+% skip patterns
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-push-http
--- a/tests/test-push-http Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-push-http Mon Jun 04 22:56:42 2007 +0200
@@ -1,15 +1,17 @@
#!/bin/sh
+cp "$TESTDIR"/printenv.py .
+
hg init test
cd test
echo a > a
-hg ci -Ama
+hg ci -Ama -d '0 0'
cd ..
hg clone test test2
cd test2
echo a >> a
-hg ci -mb
+hg ci -mb -d '0 0'
cd ../test
@@ -37,14 +39,14 @@
echo % expect success
echo 'allow_push = *' >> .hg/hgrc
echo '[hooks]' >> .hg/hgrc
-echo 'changegroup = echo changegroup: u=$HG_URL >> $HGTMP/urls' >> .hg/hgrc
+echo 'changegroup = python ../printenv.py changegroup 0 ../urls' >> .hg/hgrc
hg serve -p 20059 -d --pid-file=hg.pid
cat hg.pid >> $DAEMON_PIDS
hg --cwd ../test2 push http://localhost:20059/
kill `cat hg.pid`
hg rollback
-sed 's/\(remote:http.*\):.*/\1/' $HGTMP/urls
+cat ../urls
echo % expect authorization error: all users denied
echo '[web]' > .hg/hgrc
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-push-http.out
--- a/tests/test-push-http.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-push-http.out Mon Jun 04 22:56:42 2007 +0200
@@ -20,7 +20,7 @@
adding file changes
added 1 changesets with 1 changes to 1 files
rolling back last transaction
-changegroup: u=remote:http
+changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http
% expect authorization error: all users denied
pushing to http://localhost:20059/
searching for changes
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-remove
--- a/tests/test-remove Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-remove Mon Jun 04 22:56:42 2007 +0200
@@ -23,10 +23,23 @@
hg rm a
hg rm -f a
echo b > b
+mkdir c
+echo d > c/d
hg ci -A -m 3 -d "1000001 0"
echo c >> b
hg rm b
hg rm -f b
+hg rm -A c/d
+hg st
+cat c/d
+hg revert c
+hg rm -A
+hg st
+hg rm -A c
+hg st
+rm c/d
+hg rm -A
+hg st
cd ..
hg clone a b
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-remove.out
--- a/tests/test-remove.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-remove.out Mon Jun 04 22:56:42 2007 +0200
@@ -52,5 +52,15 @@
not removing a: file has been marked for add (use -f to force removal)
adding a
adding b
+adding c/d
not removing b: file is modified (use -f to force removal)
-2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+R b
+R c/d
+d
+undeleting c/d
+R b
+R b
+removing c/d
+R b
+R c/d
+3 files updated, 0 files merged, 0 files removed, 0 files unresolved
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-rename-merge2
--- a/tests/test-rename-merge2 Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-rename-merge2 Mon Jun 04 22:56:42 2007 +0200
@@ -3,11 +3,13 @@
mkdir -p t
cd t
-cat <<'EOF' > merge
-#!/bin/sh
-echo merge $1 $2 $3 > $1
+cat < merge
+import sys, os
+f = open(sys.argv[1], "wb")
+f.write("merge %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3]))
+f.close()
EOF
-chmod +x merge
+HGMERGE="python ../merge"; export HGMERGE
# perform a test merge with possible renaming
#
@@ -49,7 +51,7 @@
echo "--------------"
echo "test L:$1 R:$2 W:$3 - $4"
echo "--------------"
- env HGMERGE=../merge hg merge -y --debug --traceback
+ hg merge -y --debug --traceback
echo "--------------"
hg status -camC -X rev
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-revert
--- a/tests/test-revert Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-revert Mon Jun 04 22:56:42 2007 +0200
@@ -92,4 +92,6 @@
echo foo > newdir/newfile
hg add newdir/newfile
hg revert b newdir
+echo foobar > b/b
+hg revert .
true
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-revert.out
--- a/tests/test-revert.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-revert.out Mon Jun 04 22:56:42 2007 +0200
@@ -62,3 +62,4 @@
adding b/b
reverting b/b
forgetting newdir/newfile
+reverting b/b
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-simplemerge-cmd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-simplemerge-cmd Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+cp "$TESTDIR"/../contrib/simplemerge .
+
+echo base > base
+
+echo local > local
+cat base >> local
+cp local orig
+
+cat base > other
+echo other >> other
+
+echo '% changing local directly'
+python simplemerge local base other && echo "merge succeeded"
+cat local
+cp orig local
+
+echo '% printing to stdout'
+python simplemerge -p local base other
+echo ' local:'
+cat local
+
+echo '% conflicts'
+cp base conflict-local
+cp other conflict-other
+echo not other >> conflict-local
+echo end >> conflict-local
+echo end >> conflict-other
+python simplemerge -p conflict-local base conflict-other || echo "merge failed"
+
+echo '% --no-minimal'
+python simplemerge -p --no-minimal conflict-local base conflict-other
+
+echo '% 1 label'
+python simplemerge -p -L foo conflict-local base conflict-other
+
+echo '% 2 labels'
+python simplemerge -p -L foo -L bar conflict-local base conflict-other
+
+echo '% too many labels'
+python simplemerge -p -L foo -L bar -L baz conflict-local base conflict-other
+
+echo '% binary file'
+python -c "f = file('binary-local', 'w'); f.write('\x00'); f.close()"
+cat orig >> binary-local
+python simplemerge -p binary-local base other
+
+echo '% binary file --text'
+python simplemerge -a -p binary-local base other
+
+echo '% help'
+python simplemerge --help
+
+echo '% wrong number of arguments'
+python simplemerge
+
+echo '% bad option'
+python simplemerge --foo -p local base other
+
+exit 0
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-simplemerge-cmd.out
Binary file tests/test-simplemerge-cmd.out has changed
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-simplemerge.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-simplemerge.py Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,409 @@
+# Copyright (C) 2004, 2005 Canonical Ltd
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+import os
+import unittest
+from unittest import TestCase
+import imp
+import shutil
+from mercurial import util
+
+# copy simplemerge to the cwd to avoid creating a .pyc file in the source tree
+shutil.copyfile(os.path.join(os.environ['TESTDIR'], os.path.pardir,
+ 'contrib', 'simplemerge'),
+ 'simplemerge.py')
+simplemerge = imp.load_source('simplemerge', 'simplemerge.py')
+Merge3 = simplemerge.Merge3
+CantReprocessAndShowBase = simplemerge.CantReprocessAndShowBase
+
+def split_lines(t):
+ from cStringIO import StringIO
+ return StringIO(t).readlines()
+
+############################################################
+# test case data from the gnu diffutils manual
+# common base
+TZU = split_lines(""" The Nameless is the origin of Heaven and Earth;
+ The named is the mother of all things.
+
+ Therefore let there always be non-being,
+ so we may see their subtlety,
+ And let there always be being,
+ so we may see their outcome.
+ The two are the same,
+ But after they are produced,
+ they have different names.
+ They both may be called deep and profound.
+ Deeper and more profound,
+ The door of all subtleties!
+""")
+
+LAO = split_lines(""" The Way that can be told of is not the eternal Way;
+ The name that can be named is not the eternal name.
+ The Nameless is the origin of Heaven and Earth;
+ The Named is the mother of all things.
+ Therefore let there always be non-being,
+ so we may see their subtlety,
+ And let there always be being,
+ so we may see their outcome.
+ The two are the same,
+ But after they are produced,
+ they have different names.
+""")
+
+
+TAO = split_lines(""" The Way that can be told of is not the eternal Way;
+ The name that can be named is not the eternal name.
+ The Nameless is the origin of Heaven and Earth;
+ The named is the mother of all things.
+
+ Therefore let there always be non-being,
+ so we may see their subtlety,
+ And let there always be being,
+ so we may see their result.
+ The two are the same,
+ But after they are produced,
+ they have different names.
+
+ -- The Way of Lao-Tzu, tr. Wing-tsit Chan
+
+""")
+
+MERGED_RESULT = split_lines(""" The Way that can be told of is not the eternal Way;
+ The name that can be named is not the eternal name.
+ The Nameless is the origin of Heaven and Earth;
+ The Named is the mother of all things.
+ Therefore let there always be non-being,
+ so we may see their subtlety,
+ And let there always be being,
+ so we may see their result.
+ The two are the same,
+ But after they are produced,
+ they have different names.
+<<<<<<< LAO
+=======
+
+ -- The Way of Lao-Tzu, tr. Wing-tsit Chan
+
+>>>>>>> TAO
+""")
+
+class TestMerge3(TestCase):
+ def log(self, msg):
+ pass
+
+ def test_no_changes(self):
+ """No conflicts because nothing changed"""
+ m3 = Merge3(['aaa', 'bbb'],
+ ['aaa', 'bbb'],
+ ['aaa', 'bbb'])
+
+ self.assertEquals(m3.find_unconflicted(),
+ [(0, 2)])
+
+ self.assertEquals(list(m3.find_sync_regions()),
+ [(0, 2,
+ 0, 2,
+ 0, 2),
+ (2,2, 2,2, 2,2)])
+
+ self.assertEquals(list(m3.merge_regions()),
+ [('unchanged', 0, 2)])
+
+ self.assertEquals(list(m3.merge_groups()),
+ [('unchanged', ['aaa', 'bbb'])])
+
+ def test_front_insert(self):
+ m3 = Merge3(['zz'],
+ ['aaa', 'bbb', 'zz'],
+ ['zz'])
+
+ # todo: should use a sentinal at end as from get_matching_blocks
+ # to match without zz
+ self.assertEquals(list(m3.find_sync_regions()),
+ [(0,1, 2,3, 0,1),
+ (1,1, 3,3, 1,1),])
+
+ self.assertEquals(list(m3.merge_regions()),
+ [('a', 0, 2),
+ ('unchanged', 0, 1)])
+
+ self.assertEquals(list(m3.merge_groups()),
+ [('a', ['aaa', 'bbb']),
+ ('unchanged', ['zz'])])
+
+ def test_null_insert(self):
+ m3 = Merge3([],
+ ['aaa', 'bbb'],
+ [])
+ # todo: should use a sentinal at end as from get_matching_blocks
+ # to match without zz
+ self.assertEquals(list(m3.find_sync_regions()),
+ [(0,0, 2,2, 0,0)])
+
+ self.assertEquals(list(m3.merge_regions()),
+ [('a', 0, 2)])
+
+ self.assertEquals(list(m3.merge_lines()),
+ ['aaa', 'bbb'])
+
+ def test_no_conflicts(self):
+ """No conflicts because only one side changed"""
+ m3 = Merge3(['aaa', 'bbb'],
+ ['aaa', '111', 'bbb'],
+ ['aaa', 'bbb'])
+
+ self.assertEquals(m3.find_unconflicted(),
+ [(0, 1), (1, 2)])
+
+ self.assertEquals(list(m3.find_sync_regions()),
+ [(0,1, 0,1, 0,1),
+ (1,2, 2,3, 1,2),
+ (2,2, 3,3, 2,2),])
+
+ self.assertEquals(list(m3.merge_regions()),
+ [('unchanged', 0, 1),
+ ('a', 1, 2),
+ ('unchanged', 1, 2),])
+
+ def test_append_a(self):
+ m3 = Merge3(['aaa\n', 'bbb\n'],
+ ['aaa\n', 'bbb\n', '222\n'],
+ ['aaa\n', 'bbb\n'])
+
+ self.assertEquals(''.join(m3.merge_lines()),
+ 'aaa\nbbb\n222\n')
+
+ def test_append_b(self):
+ m3 = Merge3(['aaa\n', 'bbb\n'],
+ ['aaa\n', 'bbb\n'],
+ ['aaa\n', 'bbb\n', '222\n'])
+
+ self.assertEquals(''.join(m3.merge_lines()),
+ 'aaa\nbbb\n222\n')
+
+ def test_append_agreement(self):
+ m3 = Merge3(['aaa\n', 'bbb\n'],
+ ['aaa\n', 'bbb\n', '222\n'],
+ ['aaa\n', 'bbb\n', '222\n'])
+
+ self.assertEquals(''.join(m3.merge_lines()),
+ 'aaa\nbbb\n222\n')
+
+ def test_append_clash(self):
+ m3 = Merge3(['aaa\n', 'bbb\n'],
+ ['aaa\n', 'bbb\n', '222\n'],
+ ['aaa\n', 'bbb\n', '333\n'])
+
+ ml = m3.merge_lines(name_a='a',
+ name_b='b',
+ start_marker='<<',
+ mid_marker='--',
+ end_marker='>>')
+ self.assertEquals(''.join(ml),
+'''\
+aaa
+bbb
+<< a
+222
+--
+333
+>> b
+''')
+
+ def test_insert_agreement(self):
+ m3 = Merge3(['aaa\n', 'bbb\n'],
+ ['aaa\n', '222\n', 'bbb\n'],
+ ['aaa\n', '222\n', 'bbb\n'])
+
+ ml = m3.merge_lines(name_a='a',
+ name_b='b',
+ start_marker='<<',
+ mid_marker='--',
+ end_marker='>>')
+ self.assertEquals(''.join(ml), 'aaa\n222\nbbb\n')
+
+
+ def test_insert_clash(self):
+ """Both try to insert lines in the same place."""
+ m3 = Merge3(['aaa\n', 'bbb\n'],
+ ['aaa\n', '111\n', 'bbb\n'],
+ ['aaa\n', '222\n', 'bbb\n'])
+
+ self.assertEquals(m3.find_unconflicted(),
+ [(0, 1), (1, 2)])
+
+ self.assertEquals(list(m3.find_sync_regions()),
+ [(0,1, 0,1, 0,1),
+ (1,2, 2,3, 2,3),
+ (2,2, 3,3, 3,3),])
+
+ self.assertEquals(list(m3.merge_regions()),
+ [('unchanged', 0,1),
+ ('conflict', 1,1, 1,2, 1,2),
+ ('unchanged', 1,2)])
+
+ self.assertEquals(list(m3.merge_groups()),
+ [('unchanged', ['aaa\n']),
+ ('conflict', [], ['111\n'], ['222\n']),
+ ('unchanged', ['bbb\n']),
+ ])
+
+ ml = m3.merge_lines(name_a='a',
+ name_b='b',
+ start_marker='<<',
+ mid_marker='--',
+ end_marker='>>')
+ self.assertEquals(''.join(ml),
+'''aaa
+<< a
+111
+--
+222
+>> b
+bbb
+''')
+
+ def test_replace_clash(self):
+ """Both try to insert lines in the same place."""
+ m3 = Merge3(['aaa', '000', 'bbb'],
+ ['aaa', '111', 'bbb'],
+ ['aaa', '222', 'bbb'])
+
+ self.assertEquals(m3.find_unconflicted(),
+ [(0, 1), (2, 3)])
+
+ self.assertEquals(list(m3.find_sync_regions()),
+ [(0,1, 0,1, 0,1),
+ (2,3, 2,3, 2,3),
+ (3,3, 3,3, 3,3),])
+
+ def test_replace_multi(self):
+ """Replacement with regions of different size."""
+ m3 = Merge3(['aaa', '000', '000', 'bbb'],
+ ['aaa', '111', '111', '111', 'bbb'],
+ ['aaa', '222', '222', '222', '222', 'bbb'])
+
+ self.assertEquals(m3.find_unconflicted(),
+ [(0, 1), (3, 4)])
+
+
+ self.assertEquals(list(m3.find_sync_regions()),
+ [(0,1, 0,1, 0,1),
+ (3,4, 4,5, 5,6),
+ (4,4, 5,5, 6,6),])
+
+ def test_merge_poem(self):
+ """Test case from diff3 manual"""
+ m3 = Merge3(TZU, LAO, TAO)
+ ml = list(m3.merge_lines('LAO', 'TAO'))
+ self.log('merge result:')
+ self.log(''.join(ml))
+ self.assertEquals(ml, MERGED_RESULT)
+
+ def test_minimal_conflicts_common(self):
+ """Reprocessing"""
+ base_text = ("a\n" * 20).splitlines(True)
+ this_text = ("a\n"*10+"b\n" * 10).splitlines(True)
+ other_text = ("a\n"*10+"c\n"+"b\n" * 8 + "c\n").splitlines(True)
+ m3 = Merge3(base_text, other_text, this_text)
+ m_lines = m3.merge_lines('OTHER', 'THIS', reprocess=True)
+ merged_text = "".join(list(m_lines))
+ optimal_text = ("a\n" * 10 + "<<<<<<< OTHER\nc\n=======\n"
+ + ">>>>>>> THIS\n"
+ + 8* "b\n" + "<<<<<<< OTHER\nc\n=======\n"
+ + 2* "b\n" + ">>>>>>> THIS\n")
+ self.assertEquals(optimal_text, merged_text)
+
+ def test_minimal_conflicts_unique(self):
+ def add_newline(s):
+ """Add a newline to each entry in the string"""
+ return [(x+'\n') for x in s]
+
+ base_text = add_newline("abcdefghijklm")
+ this_text = add_newline("abcdefghijklmNOPQRSTUVWXYZ")
+ other_text = add_newline("abcdefghijklm1OPQRSTUVWXY2")
+ m3 = Merge3(base_text, other_text, this_text)
+ m_lines = m3.merge_lines('OTHER', 'THIS', reprocess=True)
+ merged_text = "".join(list(m_lines))
+ optimal_text = ''.join(add_newline("abcdefghijklm")
+ + ["<<<<<<< OTHER\n1\n=======\nN\n>>>>>>> THIS\n"]
+ + add_newline('OPQRSTUVWXY')
+ + ["<<<<<<< OTHER\n2\n=======\nZ\n>>>>>>> THIS\n"]
+ )
+ self.assertEquals(optimal_text, merged_text)
+
+ def test_minimal_conflicts_nonunique(self):
+ def add_newline(s):
+ """Add a newline to each entry in the string"""
+ return [(x+'\n') for x in s]
+
+ base_text = add_newline("abacddefgghij")
+ this_text = add_newline("abacddefgghijkalmontfprz")
+ other_text = add_newline("abacddefgghijknlmontfprd")
+ m3 = Merge3(base_text, other_text, this_text)
+ m_lines = m3.merge_lines('OTHER', 'THIS', reprocess=True)
+ merged_text = "".join(list(m_lines))
+ optimal_text = ''.join(add_newline("abacddefgghijk")
+ + ["<<<<<<< OTHER\nn\n=======\na\n>>>>>>> THIS\n"]
+ + add_newline('lmontfpr')
+ + ["<<<<<<< OTHER\nd\n=======\nz\n>>>>>>> THIS\n"]
+ )
+ self.assertEquals(optimal_text, merged_text)
+
+ def test_reprocess_and_base(self):
+ """Reprocessing and showing base breaks correctly"""
+ base_text = ("a\n" * 20).splitlines(True)
+ this_text = ("a\n"*10+"b\n" * 10).splitlines(True)
+ other_text = ("a\n"*10+"c\n"+"b\n" * 8 + "c\n").splitlines(True)
+ m3 = Merge3(base_text, other_text, this_text)
+ m_lines = m3.merge_lines('OTHER', 'THIS', reprocess=True,
+ base_marker='|||||||')
+ self.assertRaises(CantReprocessAndShowBase, list, m_lines)
+
+ def test_binary(self):
+ self.assertRaises(util.Abort, Merge3, ['\x00'], ['a'], ['b'])
+
+ def test_dos_text(self):
+ base_text = 'a\r\n'
+ this_text = 'b\r\n'
+ other_text = 'c\r\n'
+ m3 = Merge3(base_text.splitlines(True), other_text.splitlines(True),
+ this_text.splitlines(True))
+ m_lines = m3.merge_lines('OTHER', 'THIS')
+ self.assertEqual('<<<<<<< OTHER\r\nc\r\n=======\r\nb\r\n'
+ '>>>>>>> THIS\r\n'.splitlines(True), list(m_lines))
+
+ def test_mac_text(self):
+ base_text = 'a\r'
+ this_text = 'b\r'
+ other_text = 'c\r'
+ m3 = Merge3(base_text.splitlines(True), other_text.splitlines(True),
+ this_text.splitlines(True))
+ m_lines = m3.merge_lines('OTHER', 'THIS')
+ self.assertEqual('<<<<<<< OTHER\rc\r=======\rb\r'
+ '>>>>>>> THIS\r'.splitlines(True), list(m_lines))
+
+if __name__ == '__main__':
+ # hide the timer
+ import time
+ orig = time.time
+ try:
+ time.time = lambda: 0
+ unittest.main()
+ finally:
+ time.time = orig
+
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-simplemerge.py.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-simplemerge.py.out Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,5 @@
+....................
+----------------------------------------------------------------------
+Ran 20 tests in 0.000s
+
+OK
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-ssh
--- a/tests/test-ssh Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-ssh Mon Jun 04 22:56:42 2007 +0200
@@ -1,28 +1,31 @@
#!/bin/sh
+cp "$TESTDIR"/printenv.py .
+
# This test tries to exercise the ssh functionality with a dummy script
-cat <<'EOF' > dummyssh
-#!/bin/sh
-# this attempts to deal with relative pathnames
-cd `dirname $0`
+cat < dummyssh
+import sys
+import os
-# check for proper args
-if [ $1 != "user@dummy" ] ; then
- exit -1
-fi
+os.chdir(os.path.dirname(sys.argv[0]))
+if sys.argv[1] != "user@dummy":
+ sys.exit(-1)
+
+if not os.path.exists("dummyssh"):
+ sys.exit(-1)
-# check that we're in the right directory
-if [ ! -x dummyssh ] ; then
- exit -1
-fi
+os.environ["SSH_CLIENT"] = "127.0.0.1 1 2"
-SSH_CLIENT='127.0.0.1 1 2'
-export SSH_CLIENT
-echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog
-$2
+log = open("dummylog", "ab")
+log.write("Got arguments")
+for i, arg in enumerate(sys.argv[1:]):
+ log.write(" %d:%s" % (i+1, arg))
+log.write("\n")
+log.close()
+r = os.system(sys.argv[2])
+sys.exit(bool(r))
EOF
-chmod +x dummyssh
echo "# creating 'remote'"
hg init remote
@@ -33,33 +36,33 @@
echo '[server]' > .hg/hgrc
echo 'uncompressed = True' >> .hg/hgrc
echo '[hooks]' >> .hg/hgrc
-echo 'changegroup = echo changegroup in remote: u=$HG_URL >> ../dummylog' >> .hg/hgrc
+echo 'changegroup = python ../printenv.py changegroup-in-remote 0 ../dummylog' >> .hg/hgrc
cd ..
echo "# repo not found error"
-hg clone -e ./dummyssh ssh://user@dummy/nonexistent local
+hg clone -e "python ./dummyssh" ssh://user@dummy/nonexistent local
echo "# clone remote via stream"
-hg clone -e ./dummyssh --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \
+hg clone -e "python ./dummyssh" --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \
sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/'
cd local-stream
hg verify
cd ..
echo "# clone remote via pull"
-hg clone -e ./dummyssh ssh://user@dummy/remote local
+hg clone -e "python ./dummyssh" ssh://user@dummy/remote local
echo "# verify"
cd local
hg verify
echo '[hooks]' >> .hg/hgrc
-echo 'changegroup = echo changegroup in local: u=$HG_URL >> ../dummylog' >> .hg/hgrc
+echo 'changegroup = python ../printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc
echo "# empty default pull"
hg paths
-hg pull -e ../dummyssh
+hg pull -e "python ../dummyssh"
echo "# local change"
echo bleah > foo
@@ -68,13 +71,13 @@
echo "# updating rc"
echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
echo "[ui]" >> .hg/hgrc
-echo "ssh = ../dummyssh" >> .hg/hgrc
+echo "ssh = python ../dummyssh" >> .hg/hgrc
echo "# find outgoing"
hg out ssh://user@dummy/remote
echo "# find incoming on the remote side"
-hg incoming -R ../remote -e ../dummyssh ssh://user@dummy/local
+hg incoming -R ../remote -e "python ../dummyssh" ssh://user@dummy/local
echo "# push"
hg push
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-ssh-clone-r
--- a/tests/test-ssh-clone-r Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-ssh-clone-r Mon Jun 04 22:56:42 2007 +0200
@@ -2,27 +2,28 @@
# This test tries to exercise the ssh functionality with a dummy script
-cat <<'EOF' > dummyssh
-#!/bin/sh
-# this attempts to deal with relative pathnames
-cd `dirname $0`
+cat < dummyssh
+import sys
+import os
-# check for proper args
-if [ $1 != "user@dummy" ] ; then
- exit -1
-fi
+os.chdir(os.path.dirname(sys.argv[0]))
+if sys.argv[1] != "user@dummy":
+ sys.exit(-1)
+
+if not os.path.exists("dummyssh"):
+ sys.exit(-1)
-# check that we're in the right directory
-if [ ! -x dummyssh ] ; then
- exit -1
-fi
+os.environ["SSH_CLIENT"] = "127.0.0.1 1 2"
-SSH_CLIENT='127.0.0.1 1 2'
-export SSH_CLIENT
-echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog
-$2
+log = open("dummylog", "ab")
+log.write("Got arguments")
+for i, arg in enumerate(sys.argv[1:]):
+ log.write(" %d:%s" % (i+1, arg))
+log.write("\n")
+log.close()
+r = os.system(sys.argv[2])
+sys.exit(bool(r))
EOF
-chmod +x dummyssh
hg init remote
cd remote
@@ -76,7 +77,7 @@
echo "# clone remote via stream"
for i in 0 1 2 3 4 5 6 7 8; do
- hg clone -e ./dummyssh --uncompressed -r "$i" ssh://user@dummy/remote test-"$i" 2>&1
+ hg clone -e "python ./dummyssh" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i" 2>&1
if cd test-"$i"; then
hg verify
cd ..
@@ -87,13 +88,13 @@
hg verify
cd ..
cd test-1
-hg pull -e ../dummyssh -r 4 ssh://user@dummy/remote 2>&1
+hg pull -e "python ../dummyssh" -r 4 ssh://user@dummy/remote 2>&1
hg verify
-hg pull -e ../dummyssh ssh://user@dummy/remote 2>&1
+hg pull -e "python ../dummyssh" ssh://user@dummy/remote 2>&1
cd ..
cd test-2
-hg pull -e ../dummyssh -r 5 ssh://user@dummy/remote 2>&1
+hg pull -e "python ../dummyssh" -r 5 ssh://user@dummy/remote 2>&1
hg verify
-hg pull -e ../dummyssh ssh://user@dummy/remote 2>&1
+hg pull -e "python ../dummyssh" ssh://user@dummy/remote 2>&1
hg verify
cd ..
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-ssh.out
--- a/tests/test-ssh.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-ssh.out Mon Jun 04 22:56:42 2007 +0200
@@ -33,6 +33,7 @@
# local change
# updating rc
# find outgoing
+comparing with ssh://user@dummy/remote
searching for changes
changeset: 1:572896fe480d
tag: tip
@@ -41,6 +42,7 @@
summary: add
# find incoming on the remote side
+comparing with ssh://user@dummy/local
searching for changes
changeset: 1:572896fe480d
tag: tip
@@ -76,13 +78,13 @@
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
-Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio 3: 4: 5:
-Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
-Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
-Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
-Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
-Got arguments 1:user@dummy 2:hg -R local serve --stdio 3: 4: 5:
-Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
-changegroup in remote: u=remote:ssh:127.0.0.1
-Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
-changegroup in remote: u=remote:ssh:127.0.0.1
+Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
+Got arguments 1:user@dummy 2:hg -R remote serve --stdio
+Got arguments 1:user@dummy 2:hg -R remote serve --stdio
+Got arguments 1:user@dummy 2:hg -R remote serve --stdio
+Got arguments 1:user@dummy 2:hg -R remote serve --stdio
+Got arguments 1:user@dummy 2:hg -R local serve --stdio
+Got arguments 1:user@dummy 2:hg -R remote serve --stdio
+changegroup-in-remote hook: HG_NODE=572896fe480d7581849806ee402175c49cb20037 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
+Got arguments 1:user@dummy 2:hg -R remote serve --stdio
+changegroup-in-remote hook: HG_NODE=ac7448082955a0b2ff5cb4512c1e061c779bbc79 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-static-http
--- a/tests/test-static-http Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-static-http Mon Jun 04 22:56:42 2007 +0200
@@ -1,5 +1,7 @@
#!/bin/sh
+cp "$TESTDIR"/printenv.py .
+
http_proxy= hg clone static-http://localhost:20059/ copy
echo $?
test -d copy || echo copy: No such file or directory
@@ -44,7 +46,7 @@
cd ../local
echo '[hooks]' >> .hg/hgrc
-echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
+echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
http_proxy= hg pull
kill $!
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-static-http.out
--- a/tests/test-static-http.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-static-http.out Mon Jun 04 22:56:42 2007 +0200
@@ -20,7 +20,7 @@
1 files, 1 changesets, 1 total revisions
foo
adding quux
-changegroup: u=static-http://localhost:20059/remote
+changegroup hook: HG_NODE=34401e0e9971e9720b613d9089ffa9a6eefb3d2d HG_SOURCE=pull HG_URL=static-http://localhost:20059/remote
pulling from static-http://localhost:20059/remote
searching for changes
adding changesets
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-symlink-basic
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-symlink-basic Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+cat >> readlink.py <', os.readlink(f)
+EOF
+
+hg init a
+cd a
+ln -s nothing dangling
+hg add dangling
+hg commit -m 'add symlink' -d '0 0'
+
+hg tip -v
+hg manifest --debug
+echo '% rev 0:'
+python ../readlink.py dangling
+
+rm dangling
+ln -s void dangling
+hg commit -m 'change symlink'
+echo '% rev 1:'
+python ../readlink.py dangling
+
+echo '% modifying link'
+rm dangling
+ln -s empty dangling
+python ../readlink.py dangling
+
+echo '% reverting to rev 0:'
+hg revert -r 0 -a
+python ../readlink.py dangling
+
+echo '% backups:'
+python ../readlink.py *.orig
+
+rm *.orig
+hg up -C
+echo '% copies'
+hg cp -v dangling dangling2
+hg st -Cmard
+python ../readlink.py dangling dangling2
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-symlink-basic.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-symlink-basic.out Mon Jun 04 22:56:42 2007 +0200
@@ -0,0 +1,28 @@
+changeset: 0:cabd88b706fc
+tag: tip
+user: test
+date: Thu Jan 01 00:00:00 1970 +0000
+files: dangling
+description:
+add symlink
+
+
+2564acbe54bbbedfbf608479340b359f04597f80 644 dangling
+% rev 0:
+dangling -> nothing
+% rev 1:
+dangling -> void
+% modifying link
+dangling -> empty
+% reverting to rev 0:
+reverting dangling
+dangling -> nothing
+% backups:
+dangling.orig -> empty
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+% copies
+copying dangling to dangling2
+A dangling2
+ dangling
+dangling -> void
+dangling2 -> void
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-symlinks
--- a/tests/test-symlinks Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-symlinks Mon Jun 04 22:56:42 2007 +0200
@@ -55,3 +55,18 @@
ln -s x/f ../z
# this should fail
hg status ../z && { echo hg mistakenly exited with status 0; exit 1; } || :
+
+cd .. ; rm -r test
+hg init test; cd test;
+
+echo '# try cloning symlink in a subdir'
+echo '1. commit a symlink'
+mkdir -p a/b/c
+cd a/b/c
+ln -s /path/to/symlink/source demo
+cd ../../..
+hg stat
+hg commit -A -m 'add symlink in a/b/c subdir'
+echo '2. clone it'
+cd ..
+hg clone test testclone
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-symlinks.out
--- a/tests/test-symlinks.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-symlinks.out Mon Jun 04 22:56:42 2007 +0200
@@ -1,11 +1,12 @@
+adding bar
adding foo
adding bomb
adding a.c
adding dir/a.o
adding dir/b.o
+M dir/b.o
! a.c
! dir/a.o
-! dir/b.o
? .hgignore
a.c: unsupported file type (type is fifo)
! a.c
@@ -13,3 +14,9 @@
A f
# try symlink outside repo to file inside
abort: ../z not under root
+# try cloning symlink in a subdir
+1. commit a symlink
+? a/b/c/demo
+adding a/b/c/demo
+2. clone it
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-transplant
--- a/tests/test-transplant Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-transplant Mon Jun 04 22:56:42 2007 +0200
@@ -22,28 +22,25 @@
hg log --template '{rev} {parents} {desc}\n'
-cd ..
-hg clone t rebase
-cd rebase
+hg clone . ../rebase
+cd ../rebase
hg up -C 1
echo '% rebase b onto r1'
hg transplant -a -b tip
hg log --template '{rev} {parents} {desc}\n'
-cd ..
-hg clone t prune
-cd prune
+hg clone ../t ../prune
+cd ../prune
hg up -C 1
echo '% rebase b onto r1, skipping b2'
hg transplant -a -b tip -p 3
hg log --template '{rev} {parents} {desc}\n'
-cd ..
echo '% remote transplant'
-hg clone -r 1 t remote
-cd remote
+hg clone -r 1 ../t ../remote
+cd ../remote
hg transplant --log -s ../t 2 4
hg log --template '{rev} {parents} {desc}\n'
@@ -54,11 +51,19 @@
echo '% skip local changes transplanted to the source'
echo b4 > b4
hg ci -Amb4 -d '3 0'
-cd ..
-hg clone t pullback
-cd pullback
+hg clone ../t ../pullback
+cd ../pullback
hg transplant -s ../remote -a -b tip
+echo '% remote transplant with pull'
+hg -R ../t serve -p 20062 -d --pid-file=../t.pid
+cat ../t.pid >> $DAEMON_PIDS
+
+hg clone -r 0 ../t ../rp
+cd ../rp
+hg transplant -s http://localhost:20062/ 2 4
+hg log --template '{rev} {parents} {desc}\n'
+
echo '% transplant --continue'
hg init ../tc
cd ../tc
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-transplant.out
--- a/tests/test-transplant.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-transplant.out Mon Jun 04 22:56:42 2007 +0200
@@ -75,6 +75,24 @@
searching for changes
applying 4333daefcb15
4333daefcb15 transplanted to 5f42c04e07cc
+% remote transplant with pull
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 1 changes to 1 files
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+searching for changes
+searching for changes
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 1 changes to 1 files
+applying a53251cdf717
+a53251cdf717 transplanted to 8d9279348abb
+2 b3
+1 b1
+0 r1
% transplant --continue
adding foo
adding toremove
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-ui-config
--- a/tests/test-ui-config Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-ui-config Mon Jun 04 22:56:42 2007 +0200
@@ -1,5 +1,6 @@
#!/usr/bin/env python
+import ConfigParser
from mercurial import ui, util, commands
testui = ui.ui()
@@ -70,3 +71,21 @@
except util.Abort, inst:
print inst
print "---"
+
+cp = util.configparser()
+cp.add_section('foo')
+cp.set('foo', 'bar', 'baz')
+try:
+ # should fail - keys are case-sensitive
+ cp.get('foo', 'Bar')
+except ConfigParser.NoOptionError, inst:
+ print inst
+
+def function():
+ pass
+
+cp.add_section('hook')
+# values that aren't strings should work
+cp.set('hook', 'commit', function)
+f = cp.get('hook', 'commit')
+print "f %s= function" % (f == function and '=' or '!')
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-ui-config.out
--- a/tests/test-ui-config.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-ui-config.out Mon Jun 04 22:56:42 2007 +0200
@@ -43,3 +43,5 @@
Error in configuration section [interpolation] parameter 'value5':
'%' must be followed by '%' or '(', found: '%bad2'
---
+No option 'Bar' in section: 'foo'
+f == function
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-up-local-change
--- a/tests/test-up-local-change Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-up-local-change Mon Jun 04 22:56:42 2007 +0200
@@ -1,5 +1,7 @@
#!/bin/sh
+HGMERGE=true; export HGMERGE
+
set -e
mkdir r1
cd r1
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-walk
--- a/tests/test-walk Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-walk Mon Jun 04 22:56:42 2007 +0200
@@ -1,5 +1,19 @@
#!/bin/sh
+debugwalk()
+{
+ echo "hg debugwalk $@"
+ hg debugwalk "$@"
+ echo
+}
+
+chdir()
+{
+ echo "cd $@"
+ cd "$@"
+ echo
+}
+
mkdir t
cd t
hg init
@@ -18,50 +32,69 @@
echo glob:glob > glob:glob
hg addremove
hg commit -m "commit #0" -d "1000000 0"
-hg debugwalk
-cd mammals
-hg debugwalk .
-hg debugwalk Procyonidae
-cd Procyonidae
-hg debugwalk .
-hg debugwalk ..
-cd ..
-hg debugwalk ../beans
-hg debugwalk .
-hg debugwalk .hg
-hg debugwalk ../.hg
-cd ..
-hg debugwalk -Ibeans
-hg debugwalk 'glob:mammals/../beans/b*'
-hg debugwalk '-X*/Procyonidae' mammals
-hg debugwalk path:mammals
-hg debugwalk ..
-hg debugwalk beans/../..
-hg debugwalk .hg
-hg debugwalk beans/../.hg
-hg debugwalk beans/../.hg/data
-hg debugwalk beans/.hg
+debugwalk
+debugwalk -I.
+chdir mammals
+debugwalk
+debugwalk -X ../beans
+debugwalk -I '*k'
+debugwalk -I 'glob:*k'
+debugwalk -I 'relglob:*k'
+debugwalk -I 'relglob:*k' .
+debugwalk -I 're:.*k$'
+debugwalk -I 'relre:.*k$'
+debugwalk -I 'path:beans'
+debugwalk -I 'relpath:../beans'
+debugwalk .
+debugwalk -I.
+debugwalk Procyonidae
+chdir Procyonidae
+debugwalk .
+debugwalk ..
+chdir ..
+debugwalk ../beans
+debugwalk .
+debugwalk .hg
+debugwalk ../.hg
+chdir ..
+debugwalk -Ibeans
+debugwalk 'glob:mammals/../beans/b*'
+debugwalk '-X*/Procyonidae' mammals
+debugwalk path:mammals
+debugwalk ..
+debugwalk beans/../..
+debugwalk .hg
+debugwalk beans/../.hg
+debugwalk beans/../.hg/data
+debugwalk beans/.hg
# Don't know how to test absolute paths without always getting a false
# error.
-#hg debugwalk `pwd`/beans
-#hg debugwalk `pwd`/..
-hg debugwalk glob:\*
-hg debugwalk 're:.*[kb]$'
-hg debugwalk path:beans/black
-hg debugwalk beans 'glob:beans/*'
-hg debugwalk 'glob:j*'
-hg debugwalk NOEXIST
+#debugwalk `pwd`/beans
+#debugwalk `pwd`/..
+debugwalk glob:\*
+debugwalk 'glob:**e'
+debugwalk 're:.*[kb]$'
+debugwalk path:beans/black
+debugwalk path:beans//black
+debugwalk relglob:Procyonidae
+debugwalk 'relglob:Procyonidae/**'
+debugwalk 'relglob:Procyonidae/**' fennel
+debugwalk beans 'glob:beans/*'
+debugwalk 'glob:mamm**'
+debugwalk 'glob:mamm**' fennel
+debugwalk 'glob:j*'
+debugwalk NOEXIST
mkfifo fifo
-hg debugwalk fifo
+debugwalk fifo
rm fenugreek
-hg debugwalk fenugreek
+debugwalk fenugreek
hg rm fenugreek
-hg debugwalk fenugreek
+debugwalk fenugreek
touch new
-hg debugwalk new
-cd ..
-hg -R t debugwalk t/mammals/skunk
+debugwalk new
+chdir ..
+debugwalk -R t t/mammals/skunk
mkdir t2
-cd t2
-hg -R ../t debugwalk ../t/mammals/skunk
-hg --cwd ../t debugwalk mammals/skunk
+chdir t2
+debugwalk -R ../t ../t/mammals/skunk
+debugwalk --cwd ../t mammals/skunk
diff -r 1774c037fbd2 -r d6b9c3a03268 tests/test-walk.out
--- a/tests/test-walk.out Mon Jun 04 09:16:53 2007 -0500
+++ b/tests/test-walk.out Mon Jun 04 22:56:42 2007 +0200
@@ -12,6 +12,23 @@
adding mammals/Procyonidae/coatimundi
adding mammals/Procyonidae/raccoon
adding mammals/skunk
+hg debugwalk
+f beans/black beans/black
+f beans/borlotti beans/borlotti
+f beans/kidney beans/kidney
+f beans/navy beans/navy
+f beans/pinto beans/pinto
+f beans/turtle beans/turtle
+f fennel fennel
+f fenugreek fenugreek
+f fiddlehead fiddlehead
+f glob:glob glob:glob
+f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
+f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
+f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
+f mammals/skunk mammals/skunk
+
+hg debugwalk -I.
f beans/black beans/black
f beans/borlotti beans/borlotti
f beans/kidney beans/kidney
@@ -26,75 +43,255 @@
f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
f mammals/skunk mammals/skunk
+
+cd mammals
+
+hg debugwalk
+f beans/black ../beans/black
+f beans/borlotti ../beans/borlotti
+f beans/kidney ../beans/kidney
+f beans/navy ../beans/navy
+f beans/pinto ../beans/pinto
+f beans/turtle ../beans/turtle
+f fennel ../fennel
+f fenugreek ../fenugreek
+f fiddlehead ../fiddlehead
+f glob:glob ../glob:glob
f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
f mammals/Procyonidae/raccoon Procyonidae/raccoon
f mammals/skunk skunk
+
+hg debugwalk -X ../beans
+f fennel ../fennel
+f fenugreek ../fenugreek
+f fiddlehead ../fiddlehead
+f glob:glob ../glob:glob
f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
f mammals/Procyonidae/raccoon Procyonidae/raccoon
-f mammals/Procyonidae/cacomistle cacomistle
-f mammals/Procyonidae/coatimundi coatimundi
-f mammals/Procyonidae/raccoon raccoon
-f mammals/Procyonidae/cacomistle cacomistle
-f mammals/Procyonidae/coatimundi coatimundi
-f mammals/Procyonidae/raccoon raccoon
-f mammals/skunk ../skunk
+f mammals/skunk skunk
+
+hg debugwalk -I *k
+f mammals/skunk skunk
+
+hg debugwalk -I glob:*k
+f mammals/skunk skunk
+
+hg debugwalk -I relglob:*k
+f beans/black ../beans/black
+f fenugreek ../fenugreek
+f mammals/skunk skunk
+
+hg debugwalk -I relglob:*k .
+f mammals/skunk skunk
+
+hg debugwalk -I re:.*k$
+f beans/black ../beans/black
+f fenugreek ../fenugreek
+f mammals/skunk skunk
+
+hg debugwalk -I relre:.*k$
+f beans/black ../beans/black
+f fenugreek ../fenugreek
+f mammals/skunk skunk
+
+hg debugwalk -I path:beans
f beans/black ../beans/black
f beans/borlotti ../beans/borlotti
f beans/kidney ../beans/kidney
f beans/navy ../beans/navy
f beans/pinto ../beans/pinto
f beans/turtle ../beans/turtle
+
+hg debugwalk -I relpath:../beans
+f beans/black ../beans/black
+f beans/borlotti ../beans/borlotti
+f beans/kidney ../beans/kidney
+f beans/navy ../beans/navy
+f beans/pinto ../beans/pinto
+f beans/turtle ../beans/turtle
+
+hg debugwalk .
+f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
+f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
+f mammals/Procyonidae/raccoon Procyonidae/raccoon
+f mammals/skunk skunk
+
+hg debugwalk -I.
f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
f mammals/Procyonidae/raccoon Procyonidae/raccoon
f mammals/skunk skunk
+
+hg debugwalk Procyonidae
+f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
+f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
+f mammals/Procyonidae/raccoon Procyonidae/raccoon
+
+cd Procyonidae
+
+hg debugwalk .
+f mammals/Procyonidae/cacomistle cacomistle
+f mammals/Procyonidae/coatimundi coatimundi
+f mammals/Procyonidae/raccoon raccoon
+
+hg debugwalk ..
+f mammals/Procyonidae/cacomistle cacomistle
+f mammals/Procyonidae/coatimundi coatimundi
+f mammals/Procyonidae/raccoon raccoon
+f mammals/skunk ../skunk
+
+cd ..
+
+hg debugwalk ../beans
+f beans/black ../beans/black
+f beans/borlotti ../beans/borlotti
+f beans/kidney ../beans/kidney
+f beans/navy ../beans/navy
+f beans/pinto ../beans/pinto
+f beans/turtle ../beans/turtle
+
+hg debugwalk .
+f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
+f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
+f mammals/Procyonidae/raccoon Procyonidae/raccoon
+f mammals/skunk skunk
+
+hg debugwalk .hg
.hg: No such file or directory
+
+hg debugwalk ../.hg
abort: path contains illegal component: .hg
+
+cd ..
+
+hg debugwalk -Ibeans
f beans/black beans/black
f beans/borlotti beans/borlotti
f beans/kidney beans/kidney
f beans/navy beans/navy
f beans/pinto beans/pinto
f beans/turtle beans/turtle
+
+hg debugwalk glob:mammals/../beans/b*
f beans/black beans/black
f beans/borlotti beans/borlotti
+
+hg debugwalk -X*/Procyonidae mammals
f mammals/skunk mammals/skunk
+
+hg debugwalk path:mammals
f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
f mammals/skunk mammals/skunk
+
+hg debugwalk ..
abort: .. not under root
+
+hg debugwalk beans/../..
abort: beans/../.. not under root
+
+hg debugwalk .hg
abort: path contains illegal component: .hg
+
+hg debugwalk beans/../.hg
abort: path contains illegal component: .hg
+
+hg debugwalk beans/../.hg/data
abort: path contains illegal component: .hg/data
+
+hg debugwalk beans/.hg
beans/.hg: No such file or directory
+
+hg debugwalk glob:*
f fennel fennel
f fenugreek fenugreek
f fiddlehead fiddlehead
f glob:glob glob:glob
+
+hg debugwalk glob:**e
+f beans/turtle beans/turtle
+f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
+
+hg debugwalk re:.*[kb]$
f beans/black beans/black
f fenugreek fenugreek
f glob:glob glob:glob
f mammals/skunk mammals/skunk
-f beans/black beans/black
+
+hg debugwalk path:beans/black
+f beans/black beans/black exact
+
+hg debugwalk path:beans//black
+f beans/black beans/black exact
+
+hg debugwalk relglob:Procyonidae
+
+hg debugwalk relglob:Procyonidae/**
+f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
+f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
+f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
+
+hg debugwalk relglob:Procyonidae/** fennel
+f fennel fennel exact
+f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
+f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
+f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
+
+hg debugwalk beans glob:beans/*
f beans/black beans/black
f beans/borlotti beans/borlotti
f beans/kidney beans/kidney
f beans/navy beans/navy
f beans/pinto beans/pinto
f beans/turtle beans/turtle
+
+hg debugwalk glob:mamm**
+f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
+f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
+f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
+f mammals/skunk mammals/skunk
+
+hg debugwalk glob:mamm** fennel
+f fennel fennel exact
+f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
+f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
+f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
+f mammals/skunk mammals/skunk
+
+hg debugwalk glob:j*
+
+hg debugwalk NOEXIST
NOEXIST: No such file or directory
+
+hg debugwalk fifo
fifo: unsupported file type (type is fifo)
-m fenugreek fenugreek exact
+
+hg debugwalk fenugreek
m fenugreek fenugreek exact
+
+hg debugwalk fenugreek
+m fenugreek fenugreek exact
+
+hg debugwalk new
f new new exact
+
+cd ..
+
+hg debugwalk -R t t/mammals/skunk
f mammals/skunk t/mammals/skunk exact
+
+cd t2
+
+hg debugwalk -R ../t ../t/mammals/skunk
f mammals/skunk ../t/mammals/skunk exact
+
+hg debugwalk --cwd ../t mammals/skunk
f mammals/skunk mammals/skunk exact
+
|