~ubuntu-dev/ubuntu/lucid/quilt/lucid-201002101907

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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
The text used here was taken from:
http://the-tech.mit.edu/Shakespeare/midsummer/full.html

	$ rm -rf example1
	$ mkdir -p example1/patches
	$ cd example1
	$ cat > Oberon.txt
	< Yet mark'd I where the bolt of Cupid fell:
	< It fell upon a little western flower,
	< Before milk-white, now purple with love's wound,
	< And girls call it love-in-idleness.

	$ quilt new flower.diff
	> Patch %{P}flower.diff is now on top

	$ quilt add Oberon.txt
	> File Oberon.txt added to patch %{P}flower.diff

	$ cat >> Oberon.txt
	< The juice of it on sleeping eye-lids laid
	< Will make a man or woman madly dote
	< Upon the next live creature that it sees.

Or ``quilt edit Oberon.txt''

	$ quilt refresh
	> Refreshed patch %{P}flower.diff

	$ cat patches/flower.diff
	> Index: example1/Oberon.txt
	> ===================================================================
	> --- example1.orig/Oberon.txt
	> +++ example1/Oberon.txt
	> @@ -2,3 +2,6 @@
	>  It fell upon a little western flower,
	>  Before milk-white, now purple with love's wound,
	>  And girls call it love-in-idleness.
	> +The juice of it on sleeping eye-lids laid
	> +Will make a man or woman madly dote
	> +Upon the next live creature that it sees.

	$ sed -ne '1,4p' Oberon.txt > Oberon.new
	$ echo "Fetch me that flower; the herb I shew'd thee once:" >> Oberon.new
	$ sed -e '1,4d' Oberon.txt >> Oberon.new
	$ mv Oberon.new Oberon.txt
	$ quilt diff -z
	> Index: example1/Oberon.txt
	> ===================================================================
	> --- example1.orig/Oberon.txt
	> +++ example1/Oberon.txt
	> @@ -2,6 +2,7 @@
	>  It fell upon a little western flower,
	>  Before milk-white, now purple with love's wound,
	>  And girls call it love-in-idleness.
	> +Fetch me that flower; the herb I shew'd thee once:
	>  The juice of it on sleeping eye-lids laid
	>  Will make a man or woman madly dote
	>  Upon the next live creature that it sees.

	$ quilt diff
	> Index: example1/Oberon.txt
	> ===================================================================
	> --- example1.orig/Oberon.txt
	> +++ example1/Oberon.txt
	> @@ -2,3 +2,7 @@
	>  It fell upon a little western flower,
	>  Before milk-white, now purple with love's wound,
	>  And girls call it love-in-idleness.
	> +Fetch me that flower; the herb I shew'd thee once:
	> +The juice of it on sleeping eye-lids laid
	> +Will make a man or woman madly dote
	> +Upon the next live creature that it sees.

	$ quilt refresh
	> Refreshed patch %{P}flower.diff

	$ quilt top
	> %{P}flower.diff

	$ quilt files
	> Oberon.txt

	$ quilt patches Oberon.txt
	> patches/flower.diff
	$ quilt pop -f
	> Removing patch %{P}flower.diff
	> Restoring Oberon.txt
	>
	> No patches applied

	$ sed -e "s/girls/maidens/" Oberon.txt > Oberon.new
	$ mv Oberon.new Oberon.txt
	$ quilt push
	> Applying patch %{P}flower.diff
	>~ patching file `?Oberon.txt'?
	> Hunk #1 FAILED at 2.
	>~ 1 out of 1 hunk FAILED -- rejects in file `?Oberon.txt'?
	> Patch %{P}flower.diff does not apply (enforce with -f)

	$ quilt push -f
	> Applying patch %{P}flower.diff
	>~ patching file `?Oberon.txt'?
	> Hunk #1 FAILED at 2.
	>~ 1 out of 1 hunk FAILED -- saving rejects to (file )?`?Oberon.txt.rej'?
	> Applied patch %{P}flower.diff (forced; needs refresh)

	$ cat >> Oberon.txt
	< Fetch me that flower; the herb I shew'd thee once:
	< The juice of it on sleeping eye-lids laid
	< Will make a man or woman madly dote
	< Upon the next live creature that it sees.
	
	$ quilt refresh
	> Refreshed patch %{P}flower.diff

	$ cat Oberon.txt
	> Yet mark'd I where the bolt of Cupid fell:
	> It fell upon a little western flower,
	> Before milk-white, now purple with love's wound,
	> And maidens call it love-in-idleness.
	> Fetch me that flower; the herb I shew'd thee once:
	> The juice of it on sleeping eye-lids laid
	> Will make a man or woman madly dote
	> Upon the next live creature that it sees.

	$ cat patches/flower.diff
	> Index: example1/Oberon.txt
	> ===================================================================
	> --- example1.orig/Oberon.txt
	> +++ example1/Oberon.txt
	> @@ -2,3 +2,7 @@
	>  It fell upon a little western flower,
	>  Before milk-white, now purple with love's wound,
	>  And maidens call it love-in-idleness.
	> +Fetch me that flower; the herb I shew'd thee once:
	> +The juice of it on sleeping eye-lids laid
	> +Will make a man or woman madly dote
	> +Upon the next live creature that it sees.

	$ cd ..
	$ rm -rf example1