tests/test-push-validation
author Mads Kiilerich <mads@kiilerich.com>
Tue, 29 Jun 2010 12:12:34 +0200
branchstable
changeset 11488 f786fc4b8764
parent 10469 b26c4a89a143
permissions -rwxr-xr-x
log: follow filenames through renames (issue647) In commands.log a displayer was initialized from cmdutil.show_changeset() with the initial matchfn (which designates the specified files which only is correct in the highest revision in the range). prep() is handed the correct list of files, but displayer.show() didn't use that list but keept using the original matchfn. The matchfn argument to cmdutil.show_changeset() wasn't specified in other places and is only used in .show(), so now we give the matchfn as an optional parameter to .show(). We do however still have to detect --patch and --stat from opts in show_changeset() and let it imply a matchall, but that can now be overruled with the new .show() matchfn parameter.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10418
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     1
#!/bin/sh
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     2
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     3
hg init test
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     4
cd test
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     5
cat > .hg/hgrc <<EOF
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     6
[server]
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     7
validate=1
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     8
EOF
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     9
echo alpha > alpha
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    10
echo beta > beta
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    11
hg addr
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    12
hg ci -m 1
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    13
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    14
cd ..
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    15
hg clone test test-clone
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    16
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    17
cd test-clone
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    18
cp .hg/store/data/beta.i tmp
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    19
echo blah >> beta
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    20
hg ci -m '2 (corrupt)'
5fc090ba08a6 localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    21
mv tmp .hg/store/data/beta.i
10469
b26c4a89a143 Fix test-push-validation under Windows
Patrick Mezard <pmezard@gmail.com>
parents: 10418
diff changeset
    22
hg push 2>&1 | "$TESTDIR/filtertmp.py"