summaryrefslogtreecommitdiffstats
path: root/test/reorder.test
blob: 9fbb12d32e45426994ff8b0ab3eaf366777e4b2d (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
Regression test: Quilt did reorder files in patches.

	$ mkdir d
	$ cd d
	$ echo one > f
	$ echo one > g
	$ mkdir patches
	$ cat > patches/test.diff
	< --- g.orig
	< +++ g
	< @@ -1 +1 @@
	< -one
	< +two
	< --- f.orig
	< +++ f
	< @@ -1 +1 @@
	< -one
	< +two

	$ cat > patches/series
	< test.diff -p0

	$ quilt push -q
	> Applying patch %{P}test.diff
	> Now at patch %{P}test.diff

	$ quilt pop -q
	> Removing patch %{P}test.diff
	> No patches applied

	$ echo one > h
	$ cat >> patches/test.diff
	< --- h.orig
	< +++ h
	< @@ -1 +1 @@
	< -one
	< +two

	$ quilt push -q
	> Applying patch %{P}test.diff
	> Now at patch %{P}test.diff

	$ quilt files
	> g
	> f
	> h

	$ grep "^+++ " patches/test.diff
	> +++ g
	> +++ f
	> +++ h

	$ quilt refresh
	> Refreshed patch %{P}test.diff
	$ grep "^+++ " patches/test.diff
	> +++ g
	> +++ f
	> +++ h

	$ cd ..
	$ rm -rf d