comparison tests/test-mq-missingfiles.t @ 16813:6d42c797ca6e stable

patch: keep patching after missing copy source (issue3480) When applying a patch renaming/copying 'a' to 'b' on a revision where 'a' does not exist, the patching process would abort immediately, without processing the remaining hunks and without reporting it. This patch makes the patching no longer abort and possible hunks applied on the copied/renamed file be written in reject files.
author Patrick Mezard <patrick@mezard.eu>
date Fri, 01 Jun 2012 17:37:56 +0200
parents 17cea10c343e
children f1eaf03dd608
comparison
equal deleted inserted replaced
16805:9a99224a6409 16813:6d42c797ca6e
58 Display rejections: 58 Display rejections:
59 59
60 $ cat b.rej 60 $ cat b.rej
61 --- b 61 --- b
62 +++ b 62 +++ b
63 @@ -1,3 +1,5 @@
64 +b
65 +b
66 a
67 a
68 a
69 @@ -8,3 +10,5 @@
70 a
71 a
72 a
73 +c
74 +c
75
76 Test missing renamed file
77
78 $ hg qpop
79 popping changeb
80 patch queue now empty
81 $ hg up -qC 0
82 $ echo a > a
83 $ hg mv b bb
84 $ python ../writelines.py bb 2 'b\n' 10 'a\n' 2 'c\n'
85 $ echo c > c
86 $ hg add a c
87 $ hg qnew changebb
88 $ hg qpop
89 popping changebb
90 patch queue now empty
91 $ hg up -qC 1
92 $ hg qpush
93 applying changebb
94 patching file bb
95 Hunk #1 FAILED at 0
96 Hunk #2 FAILED at 7
97 2 out of 2 hunks FAILED -- saving rejects to file bb.rej
98 b not tracked!
99 patch failed, unable to continue (try -v)
100 patch failed, rejects left in working dir
101 errors during apply, please fix and refresh changebb
102 [2]
103 $ cat a
104 a
105 $ cat c
106 c
107 $ cat bb.rej
108 --- bb
109 +++ bb
63 @@ -1,3 +1,5 @@ 110 @@ -1,3 +1,5 @@
64 +b 111 +b
65 +b 112 +b
66 a 113 a
67 a 114 a