Mercurial > hgsubversion
annotate tests/fixtures/invalid_utf8.sh @ 920:1be4ea4f3c0d
stupid: diff with the good revision when restoring branch
Converting history like:
r1 create trunk
r2 remove trunk
r3 make some unrelated commit
r4 restore trunk from r2
stupid mode would retrieve and apply the diff with r3 instead of the
one with r2. All the code deciding r2 is the actual parent was already
there, only the revision argument was not passed.
This fixes:
- test_delete_restore_trunk in comprehensive/test_stupid_pull.py
- test_delete_restore_trunk_stupid in comprehensive/test_verify_and_startrev.py
Tested on OSX 10.6 with macports svn-1.7.5. I can no longer test with
svn-1.6.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sun, 29 Jul 2012 13:13:56 +0200 |
parents | 312f36a425f0 |
children |
rev | line source |
---|---|
910
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
1 #!/bin/bash |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
2 #-*- coding: utf-8 -*- |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
3 # |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
4 # Generate invalid_utf8.svndump |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
5 # |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
6 |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
7 #check svnadmin version, must be >= 1.7 |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
8 SVNVERSION=$(svnadmin --version | head -n 1 | cut -d \ -f 3) |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
9 if [[ "$SVNVERSION" < '1.7' ]] ; then |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
10 echo "You MUST have svn 1.7 or above to use this script" |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
11 exit 1 |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
12 fi |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
13 |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
14 set -x |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
15 |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
16 TMPDIR=$(mktemp -d) |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
17 WD=$(pwd) |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
18 |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
19 cd $TMPDIR |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
20 |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
21 svnadmin create failrepo |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
22 svn co file://$PWD/failrepo fail |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
23 ( |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
24 cd fail |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
25 touch A |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
26 svn add A |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
27 svn ci -m blabargrod |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
28 ) |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
29 svnadmin --pre-1.6-compatible create invalid_utf8 |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
30 svnadmin dump failrepo | \ |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
31 sed "s/blabargrod/$(echo blåbærgrød | iconv -f utf-8 -t latin1)/g" | \ |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
32 svnadmin load --bypass-prop-validation invalid_utf8 |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
33 |
312f36a425f0
Ignore invalid utf8 in commit messages
David Schleimer <dschleimer@fb.com>
parents:
diff
changeset
|
34 tar cz -C invalid_utf8 -f "$WD"/invalid_utf8.tar.gz . |