Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-url-rev @ 5440:f9b0e4f023c4
findcopies: fix rename bug
We've fiddled with this line several times, and an old bug has
reappeared from it. Let's take a peek at the history.
The original "or" (rev 3674, in 0.9.2 and 0.9.3):
http://www.selenic.com/hg/rev/9103dab96093
Then I changed it to an "and" to fix a bug (rev 4304):
http://www.selenic.com/hg/rev/4787e2b0dd03
Then for reasons now lost in the mists of time, I dropped half (rev 4399):
http://www.selenic.com/hg/rev/93652499bed3
Then we added back the "or" (rev 4416, in 0.9.4):
http://www.selenic.com/hg/rev/bb1800a7d7e1
So it seems it ought to be "and".
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 08 Oct 2007 18:47:22 -0500 |
parents | 20817af258d8 |
children |
rev | line source |
---|---|
5236
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
1 #!/bin/sh |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
2 # test basic functionality of url#rev syntax |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
3 |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
4 hg init repo |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
5 cd repo |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
6 echo a > a |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
7 hg ci -qAm 'add a' -d '0 0' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
8 hg branch foo |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
9 echo >> a |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
10 hg ci -m 'change a' -d '0 0' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
11 cd .. |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
12 |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
13 echo '% clone repo#foo' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
14 hg clone 'repo#foo' clone |
5237
fe55e3d6dc0b
clone: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5236
diff
changeset
|
15 echo '% heads' |
5236
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
16 hg --cwd clone heads |
5237
fe55e3d6dc0b
clone: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5236
diff
changeset
|
17 echo '% parents' |
fe55e3d6dc0b
clone: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5236
diff
changeset
|
18 hg --cwd clone parents |
5236
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
19 sed -e 's/default.*#/default = #/' clone/.hg/hgrc |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
20 echo |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
21 |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
22 echo '% changing original repo' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
23 cd repo |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
24 echo >> a |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
25 hg ci -m 'new head of branch foo' -d '0 0' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
26 hg up -qC default |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
27 echo bar > bar |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
28 hg ci -qAm 'add bar' -d '0 0' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
29 hg log |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
30 echo |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
31 |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
32 echo '% outgoing' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
33 hg -q outgoing '../clone#foo' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
34 echo |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
35 |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
36 echo '% push' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
37 hg -q push '../clone#foo' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
38 hg --cwd ../clone heads |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
39 cd .. |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
40 echo |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
41 |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
42 echo '% rolling back' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
43 cd clone |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
44 hg rollback |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
45 |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
46 echo '% incoming' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
47 hg -q incoming |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
48 |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
49 echo '% pull' |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
50 hg -q pull |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
51 hg heads |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
52 echo |
cbe6e263357b
parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
53 |
5238
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
54 echo '% pull should not have updated' |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
55 hg parents -q |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
56 echo '% going back to the default branch' |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
57 hg up -C 0 |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
58 hg parents |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
59 echo '% no new revs, no update' |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
60 hg pull -qu |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
61 hg parents -q |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
62 echo '% rollback' |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
63 hg rollback |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
64 hg up -C 0 |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
65 hg parents -q |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
66 echo '% pull -u takes us back to branch foo' |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
67 hg pull -qu |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
68 hg parents |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
69 |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
70 echo '% rollback' |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
71 hg rollback |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
72 hg up -C 0 |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
73 echo '% parents' |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
74 hg parents -q |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
75 echo '% heads' |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
76 hg heads -q |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
77 echo '% pull -u -r otherrev url#rev updates to rev' |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
78 hg pull -qur default default |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
79 echo '% parents' |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
80 hg parents |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
81 echo '% heads' |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
82 hg heads |
20817af258d8
pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5237
diff
changeset
|
83 |