comparison tests/test-url-rev @ 5222:cbe6e263357b

parseurl: also return the revision after the "#"; add a test
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Mon, 27 Aug 2007 01:44:35 -0300
parents
children fe55e3d6dc0b
comparison
equal deleted inserted replaced
5221:8ede77c2d008 5222:cbe6e263357b
1 #!/bin/sh
2 # test basic functionality of url#rev syntax
3
4 hg init repo
5 cd repo
6 echo a > a
7 hg ci -qAm 'add a' -d '0 0'
8 hg branch foo
9 echo >> a
10 hg ci -m 'change a' -d '0 0'
11 cd ..
12
13 echo '% clone repo#foo'
14 hg clone 'repo#foo' clone
15 hg --cwd clone heads
16 sed -e 's/default.*#/default = #/' clone/.hg/hgrc
17 echo
18
19 echo '% changing original repo'
20 cd repo
21 echo >> a
22 hg ci -m 'new head of branch foo' -d '0 0'
23 hg up -qC default
24 echo bar > bar
25 hg ci -qAm 'add bar' -d '0 0'
26 hg log
27 echo
28
29 echo '% outgoing'
30 hg -q outgoing '../clone#foo'
31 echo
32
33 echo '% push'
34 hg -q push '../clone#foo'
35 hg --cwd ../clone heads
36 cd ..
37 echo
38
39 echo '% rolling back'
40 cd clone
41 hg rollback
42
43 echo '% incoming'
44 hg -q incoming
45
46 echo '% pull'
47 hg -q pull
48 hg heads
49 echo
50