blob: f0abea79572c7ce9fec02b7a2537081814aeeac4 (
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
|
#!/bin/bash
set -e
autoimport=
. tests/lib
t-dependencies NO-DGIT GDR
t-tstunt-parsechangelog
t-setup-import gdr-convert-gbp-noarchive
export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1
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 -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
: ----- expect failure -----
wreckage-before
t-expect-fail F:'docs/README' \
t-git-debrebase
wreckage-after
: ----- resolve the conflict -----
# omg
git checkout debrebase/wreckage/merged-patchqueue
QUILT_PATCHES=debian/patches quilt push -a
QUILT_PATCHES=debian/patches quilt refresh
git add debian/patches
git commit -m FIX
git reset --hard
git clean -xdff
t-expect-fail F:todo \
t-git-debrebase record-resolved-merge
git checkout master
#t-git-debrebase
#t-gdr-good laundered
t-ok
|