Mercurial > hg
annotate tests/test-parents.out @ 7177:09ed32b79656
mq: Fix --qrefresh --short to work with --exclude and --include
pmezard expects
hg qref -s -X b
to apply the -X to the list of files in the patch, and thus remove b from the
patch.
That's how it worked before f7fc5f5ecd62. That change seemed sensible, but it
wasn't...
mpm says
(17:22:30) pmezard_: kiilerix1: do you mean that -X should be forbidden with -s ?
(17:22:54) pmezard_: kiilerix1: and --include too
(17:23:03) mpm: No because you should be able to say hg qref -s foo* -X foo-bar
so mpm expects
hg qref -s -X b *
to apply the -X to the list of files in the working directory, and thus don't
include b in the patch
This patch tries to make both usecases work by creating a matchfn which uses
the include/excludes but not the filelist.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 19 Oct 2008 16:31:24 +0200 |
parents | 4b0c9c674707 |
children | 0289f384e1e5 |
rev | line source |
---|---|
4584
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
1 % no working directory |
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
2 adding a |
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
3 adding b |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
4 adding c |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
5 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
6 adding c |
6336
4b0c9c674707
warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5299
diff
changeset
|
7 created new head |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
8 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
4584
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
9 % hg parents |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
10 changeset: 3:02d851b7e549 |
4584
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
11 user: test |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
12 date: Thu Jan 01 00:00:03 1970 +0000 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
13 summary: c |
4584
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
14 |
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
15 % hg parents a |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
16 changeset: 1:d786049f033a |
4584
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
17 user: test |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
18 date: Thu Jan 01 00:00:01 1970 +0000 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
19 summary: a |
4584
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
20 |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
21 % hg parents c, single revision |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
22 changeset: 3:02d851b7e549 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
23 user: test |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
24 date: Thu Jan 01 00:00:03 1970 +0000 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
25 summary: c |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
26 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
27 % hg parents -r 3 c |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
28 abort: 'c' not found in manifest! |
4584
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
29 % hg parents -r 2 |
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
30 changeset: 1:d786049f033a |
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
31 user: test |
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
32 date: Thu Jan 01 00:00:01 1970 +0000 |
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
33 summary: a |
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
34 |
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
35 % hg parents -r 2 a |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
36 changeset: 1:d786049f033a |
4584
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
37 user: test |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
38 date: Thu Jan 01 00:00:01 1970 +0000 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
39 summary: a |
4584
0d26e3d0eeeb
Make parents with a file but not a revision use working directory revision.
Brendan Cully <brendan@kublai.com>
parents:
diff
changeset
|
40 |
4894
be5dc5e3ab2d
hg parents: don't pass an OS-specific path to repo.filectx
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4584
diff
changeset
|
41 % hg parents -r 2 ../a |
be5dc5e3ab2d
hg parents: don't pass an OS-specific path to repo.filectx
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4584
diff
changeset
|
42 abort: ../a not under root |
be5dc5e3ab2d
hg parents: don't pass an OS-specific path to repo.filectx
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4584
diff
changeset
|
43 % cd dir; hg parents -r 2 ../a |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
44 changeset: 1:d786049f033a |
4894
be5dc5e3ab2d
hg parents: don't pass an OS-specific path to repo.filectx
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4584
diff
changeset
|
45 user: test |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
46 date: Thu Jan 01 00:00:01 1970 +0000 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
47 summary: a |
4894
be5dc5e3ab2d
hg parents: don't pass an OS-specific path to repo.filectx
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4584
diff
changeset
|
48 |
be5dc5e3ab2d
hg parents: don't pass an OS-specific path to repo.filectx
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4584
diff
changeset
|
49 % hg parents -r 2 path:a |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
50 changeset: 1:d786049f033a |
4894
be5dc5e3ab2d
hg parents: don't pass an OS-specific path to repo.filectx
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4584
diff
changeset
|
51 user: test |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
52 date: Thu Jan 01 00:00:01 1970 +0000 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
53 summary: a |
4894
be5dc5e3ab2d
hg parents: don't pass an OS-specific path to repo.filectx
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4584
diff
changeset
|
54 |
be5dc5e3ab2d
hg parents: don't pass an OS-specific path to repo.filectx
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4584
diff
changeset
|
55 % hg parents -r 2 glob:a |
be5dc5e3ab2d
hg parents: don't pass an OS-specific path to repo.filectx
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4584
diff
changeset
|
56 abort: can only specify an explicit file name |
5299
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
57 % merge working dir with 2 parents, hg parents c |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
58 merging c |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
59 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
60 (branch merge, don't forget to commit) |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
61 changeset: 3:02d851b7e549 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
62 user: test |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
63 date: Thu Jan 01 00:00:03 1970 +0000 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
64 summary: c |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
65 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
66 changeset: 4:48cee28d4b4e |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
67 tag: tip |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
68 parent: 1:d786049f033a |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
69 user: test |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
70 date: Thu Jan 01 00:00:04 1970 +0000 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
71 summary: c2 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
72 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
73 % merge working dir with 1 parent, hg parents |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
74 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
75 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
76 (branch merge, don't forget to commit) |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
77 changeset: 2:6cfac479f009 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
78 user: test |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
79 date: Thu Jan 01 00:00:02 1970 +0000 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
80 summary: b |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
81 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
82 changeset: 4:48cee28d4b4e |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
83 tag: tip |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
84 parent: 1:d786049f033a |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
85 user: test |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
86 date: Thu Jan 01 00:00:04 1970 +0000 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
87 summary: c2 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
88 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
89 % merge working dir with 1 parent, hg parents c |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
90 changeset: 4:48cee28d4b4e |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
91 tag: tip |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
92 parent: 1:d786049f033a |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
93 user: test |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
94 date: Thu Jan 01 00:00:04 1970 +0000 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
95 summary: c2 |
5a4824f6665c
Test parents behaviour with files.
Patrick Mezard <pmezard@gmail.com>
parents:
4894
diff
changeset
|
96 |