Mercurial > hg
annotate tests/test-addremove.t @ 14073:72c84f24b420
discovery: drop findoutgoing and simplify findcommonincoming's api
This is a long desired cleanup and paves the way for new discovery.
To specify subsets for bundling changes, all code should use the heads
of the desired subset ("heads") and the heads of the common subset
("common") to be excluded from the bundled set. These can be used
revlog.findmissing instead of revlog.nodesbetween.
This fixes an actual bug exposed by the change in test-bundle-r.t
where we try to bundle a changeset while specifying that said changeset
is to be assumed already present in the target. This used to still
bundle the changeset. It no longer does. This is similar to the bugs
fixed by the recent switch to heads/common for incoming/pull.
author | Peter Arrenbrecht <peter.arrenbrecht@gmail.com> |
---|---|
date | Sat, 30 Apr 2011 17:21:37 +0200 |
parents | 8b252e826c68 |
children | e1f05d7a8c7b |
rev | line source |
---|---|
11850
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
1 $ hg init rep |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
2 $ cd rep |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
3 $ mkdir dir |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
4 $ touch foo dir/bar |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
5 $ hg -v addremove |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
6 adding dir/bar |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
7 adding foo |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11850
diff
changeset
|
8 $ hg -v commit -m "add 1" |
11850
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
9 dir/bar |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
10 foo |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11850
diff
changeset
|
11 committed changeset 0:6f7f953567a2 |
11850
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
12 $ cd dir/ |
13962
8b252e826c68
add: introduce a warning message for non-portable filenames (issue2756) (BC)
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
13 $ touch ../foo_2 bar_2 con.xml |
11850
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
14 $ hg -v addremove |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
15 adding dir/bar_2 |
13962
8b252e826c68
add: introduce a warning message for non-portable filenames (issue2756) (BC)
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
16 adding dir/con.xml |
11850
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
17 adding foo_2 |
13962
8b252e826c68
add: introduce a warning message for non-portable filenames (issue2756) (BC)
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
18 warning: filename contains 'con', which is reserved on Windows: 'dir/con.xml' |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11850
diff
changeset
|
19 $ hg -v commit -m "add 2" |
11850
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
20 dir/bar_2 |
13962
8b252e826c68
add: introduce a warning message for non-portable filenames (issue2756) (BC)
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
21 dir/con.xml |
11850
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
22 foo_2 |
13962
8b252e826c68
add: introduce a warning message for non-portable filenames (issue2756) (BC)
Adrian Buehlmann <adrian@cadifra.com>
parents:
12156
diff
changeset
|
23 committed changeset 1:6bb597da00f1 |
2958
ff3ea21a981a
addremove: add -s/--similarity option
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
24 |
11850
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
25 $ cd .. |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
26 $ hg init sim |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
27 $ cd sim |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
28 $ echo a > a |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
29 $ echo a >> a |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
30 $ echo a >> a |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
31 $ echo c > c |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
32 $ hg commit -Ama |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
33 adding a |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
34 adding c |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
35 $ mv a b |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
36 $ rm c |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
37 $ echo d > d |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
38 $ hg addremove -n -s 50 # issue 1696 |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
39 removing a |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
40 adding b |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
41 removing c |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
42 adding d |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
43 recording removal of a as rename to b (100% similar) |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
44 $ hg addremove -s 50 |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
45 removing a |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
46 adding b |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
47 removing c |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
48 adding d |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
49 recording removal of a as rename to b (100% similar) |
54dbf16b401f
tests: unify test-addremove
Martin Geisler <mg@lazybytes.net>
parents:
8990
diff
changeset
|
50 $ hg commit -mb |