summaryrefslogtreecommitdiffstats
path: root/test/annotate.test
blob: 556fa85399e525bdfb31159e0d0fa924ad7b5a17 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
	$ mkdir patches
	
	$ cat > foo
	< foo
	< bar
	< baz

	$ quilt new patch
	> Patch patches/patch is now on top

	$ quilt add foo
	> File foo added to patch patches/patch

	$ sed -e 's:b:B:' foo > foo.new
	$ mv foo.new foo
	$ quilt refresh
	> Refreshed patch patches/patch

	$ quilt annotate foo
	>	foo
	> 1	Bar
	> 1	Baz
	>
	> 1	patches/patch

	$ quilt new patch2
	> Patch patches/patch2 is now on top
	
	$ quilt add foo
	> File foo added to patch patches/patch2
	
	$ sed -e 's:Baz:baz:' foo > foo.new
	$ mv foo.new foo
	$ quilt refresh
	> Refreshed patch patches/patch2

	$ quilt annotate foo
	>	foo
	> 1	Bar
	> 2	baz
	>
	> 1	patches/patch
	> 2	patches/patch2

	$ quilt new patch3
	> Patch patches/patch3 is now on top

	$ quilt add foo
	> File foo added to patch patches/patch3

	$ sed -e '/Bar/d' foo > foo.new
	$ mv foo.new foo
	$ quilt refresh
	> Refreshed patch patches/patch3

	$ quilt annotate foo
	>	foo
	> 2	baz
	>
	> 1	patches/patch
	> 2	patches/patch2
	> 3	patches/patch3

	$ quilt annotate -P patch3 foo
	>	foo
	> 2	baz
	>
	> 1	patches/patch
	> 2	patches/patch2
	> 3	patches/patch3

	$ quilt annotate -P patch2 foo
	>	foo
	> 1	Bar
	> 2	baz
	>
	> 1	patches/patch
	> 2	patches/patch2

	$ quilt annotate -P patch foo
	>	foo
	> 1	Bar
	> 1	Baz
	>
	> 1	patches/patch

	$ quilt new patch4
	> Patch patches/patch4 is now on top

	$ cat > jkl
	< abc
	< def

	$ quilt add jkl wrz
	> File jkl added to patch patches/patch4
	> File wrz added to patch patches/patch4

	$ rm -f jkl
	$ cat > wrz
	< one
	< two

	$ quilt refresh
	> Refreshed patch patches/patch4

	$ quilt annotate jkl
	>
	> 1	patches/patch4

	$ quilt annotate wrz
	> 1	one
	> 1	two
	>
	> 1	patches/patch4