author | Paul Crowley <paul@lshift.net> |
Tue, 01 Dec 2009 15:31:03 +0000 | |
changeset 266 | 7cc208cbf2be |
child 268 | 24145a4eb6fc |
permissions | -rwxr-xr-x |
266
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
1 |
#!/bin/sh |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
2 |
|
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
3 |
set -e |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
4 |
|
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
5 |
cd |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
6 |
|
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
7 |
cat > .ssh/config <<__END__ |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
8 |
Host chroothg |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
9 |
Hostname localhost |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
10 |
User hg |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
11 |
Port 2222 |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
12 |
__END__ |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
13 |
|
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
14 |
hg clone ssh://chroothg/hgadmin |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
15 |
cd hgadmin |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
16 |
mkdir -p keys/users |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
17 |
cp /home/test2/.ssh/id_rsa.pub keys/users/test2 |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
18 |
hg add keys/users/test2 |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
19 |
hg commit -u test1 -m "Added user test2" |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
20 |
hg push |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
21 |
cd .. |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
22 |
mkdir realrepo |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
23 |
cd realrepo |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
24 |
hg init . |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
25 |
echo "This is a file" > content |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
26 |
hg add content |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
27 |
hg commit -u test1 -m "Add a file to the repo" |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
28 |
hg clone . ssh://chroothg/real/project |
7cc208cbf2be
Runs a real live test of mercurial-server from beginning to end
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
29 |