Show More
@@ -143,10 +143,14 b' GP_PATCH = 1 << 0 # we have to run pat' | |||
|
143 | 143 | GP_FILTER = 1 << 1 # there's some copy/rename operation |
|
144 | 144 | GP_BINARY = 1 << 2 # there's a binary patch |
|
145 | 145 | |
|
146 | def readgitpatch(fp, firstline=None): | |
|
147 | """extract git-style metadata about patches from <patchname>""" | |
|
148 | class gitpatch: | |
|
149 |
|
|
|
146 | class patchmeta: | |
|
147 | """Patched file metadata | |
|
148 | ||
|
149 | 'op' is the performed operation within ADD, DELETE, RENAME, MODIFY | |
|
150 | or COPY. 'path' is patched file path. 'oldpath' is set to the | |
|
151 | origin file when 'op' is either COPY or RENAME, None | |
|
152 | otherwise. 'mode' is set to the new mode of patched file or None. | |
|
153 | """ | |
|
150 | 154 |
|
|
151 | 155 |
|
|
152 | 156 |
|
@@ -155,6 +159,9 b' def readgitpatch(fp, firstline=None):' | |||
|
155 | 159 |
|
|
156 | 160 |
|
|
157 | 161 | |
|
162 | def readgitpatch(fp, firstline=None): | |
|
163 | """extract git-style metadata about patches from <patchname>""" | |
|
164 | ||
|
158 | 165 | def reader(fp, firstline): |
|
159 | 166 | if firstline is not None: |
|
160 | 167 | yield firstline |
@@ -177,7 +184,7 b' def readgitpatch(fp, firstline=None):' | |||
|
177 | 184 | if gp: |
|
178 | 185 | gitpatches.append(gp) |
|
179 | 186 | src, dst = m.group(1, 2) |
|
180 |
gp = |
|
|
187 | gp = patchmeta(dst) | |
|
181 | 188 | gp.lineno = lineno |
|
182 | 189 | elif gp: |
|
183 | 190 | if line.startswith('--- '): |
General Comments 0
You need to be logged in to leave comments.
Login now