blob: 5a3f2432cf21670c4377838251c9bb6e68bd807b (
plain)
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
142
143
144
145
146
147
148
149
150
|
#!/bin/bash
set -e
autoimport=
. tests/lib
t-dependencies NO-DGIT GDR quilt
t-tstunt-parsechangelog
t-tstunt debchange
t-setup-import gdr-convert-gbp-noarchive
t_gdr_xopts+=' --experimental-merge-resolution'
wreckage-before () {
junkref=refs/debrebase/wreckage/junk
git update-ref $junkref v2.1
}
wreckage-after () {
test '' = "$(t-git-get-ref-exact $junkref)"
git for-each-ref refs/debrebase/wreckage | egrep .
}
no-wreckage () {
if git for-each-ref refs/debrebase/wreckage | egrep .; then
fail wreckage
fi
}
: ----- prepare the baseline -----
cd $p
t-gdr-prep-new-upstream 2.1
git tag v2.1 upstream
t-some-changes before
t-git-debrebase quick
: ===== early failure in walk =====
: ----- prepare other -----
git checkout -b other
t-some-changes other '' -other
git branch other-before-new-upstream
t-git-debrebase new-upstream 2.1
t-git-next-date
: ----- prepare master -----
git checkout master
t-git-debrebase new-upstream 2.1
t-git-next-date
git branch master-before-merge
: ----- make the merge -----
git merge --no-edit -s ours other
# we have to do a little dance to make this not a pseudomerge
t-git-next-date
dch -a 'Merge, only conflict was in debian/changelog'
t-dch-r-rune dch
git commit -a --amend --no-edit
wreckage-before
t-expect-fail F:'divergent anchors' \
t-git-debrebase
wreckage-after
: ===== late failure in apply =====
git checkout other
git reset --hard other-before-new-upstream
echo other-upstream-confict >>docs/README
git commit -m 'other-upstream-conflict' docs/README
t-git-debrebase quick
no-wreckage
: ----- make the merge -----
git checkout master
git reset --hard master-before-merge
t-merge-conflicted-stripping-conflict-markers other docs/README
t-git-debrebase stitch
: ----- expect failure -----
wreckage-before
t-expect-fail F:'docs/README' \
t-git-debrebase
wreckage-after
: ===== resolve the conflict =====
# omg
quilt_faff_before () {
git checkout -b fix$1 debrebase/wreckage/merged-patchqueue
QUILT_PATCHES=debian/patches quilt push -a
}
quilt_faff_after () {
QUILT_PATCHES=debian/patches quilt refresh
git add debian/patches
git commit -m FIX
git reset --hard
git clean -xdff
t-git-debrebase record-resolved-merge
git checkout master
}
: ----- badly -----
quilt_faff_before 1
quilt_faff_after
t-expect-fail E:'upstream files are not the same' \
t-git-debrebase
t-git-debrebase scrap
no-wreckage
: ----- well -----
t-expect-fail F:'docs/README' \
t-git-debrebase
wreckage-after
quilt_faff_before 2
git checkout master docs/README
git reset docs/README
quilt_faff_after
t-git-debrebase
t-gdr-good laundered
t-ok
|