equal
deleted
inserted
replaced
110 # as bumped too, we add the `bumpedfix` flag to the marker. <A', (Ad,)>. |
110 # as bumped too, we add the `bumpedfix` flag to the marker. <A', (Ad,)>. |
111 # This flag mean that the successors express the changes between the public and |
111 # This flag mean that the successors express the changes between the public and |
112 # bumped version and fix the situation, breaking the transitivity of |
112 # bumped version and fix the situation, breaking the transitivity of |
113 # "bumped" here. |
113 # "bumped" here. |
114 bumpedfix = 1 |
114 bumpedfix = 1 |
|
115 usingsha256 = 2 |
115 |
116 |
116 ## Parsing and writing of version "0" |
117 ## Parsing and writing of version "0" |
117 # |
118 # |
118 # The header is followed by the markers. Each marker is made of: |
119 # The header is followed by the markers. Each marker is made of: |
119 # |
120 # |
191 |
192 |
192 yield (pre, sucs, flags, metadata, date, parents) |
193 yield (pre, sucs, flags, metadata, date, parents) |
193 |
194 |
194 def _fm0encodeonemarker(marker): |
195 def _fm0encodeonemarker(marker): |
195 pre, sucs, flags, metadata, date, parents = marker |
196 pre, sucs, flags, metadata, date, parents = marker |
|
197 if flags & usingsha256: |
|
198 raise util.Abort(_('cannot handle sha256 with old obsstore format')) |
196 metadata = dict(metadata) |
199 metadata = dict(metadata) |
197 metadata['date'] = '%d %i' % date |
200 metadata['date'] = '%d %i' % date |
198 if parents is not None: |
201 if parents is not None: |
199 if not parents: |
202 if not parents: |
200 # mark that we explicitly recorded no parents |
203 # mark that we explicitly recorded no parents |