Show More
@@ -54,16 +54,8 b' commands.norepo += " qclone"' | |||
|
54 | 54 | normname = util.normpath |
|
55 | 55 | |
|
56 | 56 | class statusentry(object): |
|
57 |
def __init__(self, node, name |
|
|
58 | if not name: | |
|
59 | fields = node.split(':', 1) | |
|
60 | if len(fields) == 2: | |
|
61 | n, name = fields | |
|
62 | self.node, self.name = bin(n), name | |
|
63 | else: | |
|
64 | self.node, self.name = None, None | |
|
65 | else: | |
|
66 | self.node, self.name = node, name | |
|
57 | def __init__(self, node, name): | |
|
58 | self.node, self.name = node, name | |
|
67 | 59 | |
|
68 | 60 | def __str__(self): |
|
69 | 61 | return hex(self.node) + ':' + self.name |
@@ -269,8 +261,11 b' class queue(object):' | |||
|
269 | 261 | @util.propertycache |
|
270 | 262 | def applied(self): |
|
271 | 263 | if os.path.exists(self.join(self.status_path)): |
|
264 | def parse(l): | |
|
265 | n, name = l.split(':', 1) | |
|
266 | return statusentry(bin(n), name) | |
|
272 | 267 | lines = self.opener(self.status_path).read().splitlines() |
|
273 |
return [ |
|
|
268 | return [parse(l) for l in lines] | |
|
274 | 269 | return [] |
|
275 | 270 | |
|
276 | 271 | @util.propertycache |
@@ -1493,12 +1488,12 b' class queue(object):' | |||
|
1493 | 1488 | qpp = [bin(x) for x in l] |
|
1494 | 1489 | elif datastart != None: |
|
1495 | 1490 | l = line.rstrip() |
|
1496 |
|
|
|
1497 | file_ = se.name | |
|
1498 |
|
|
|
1499 |
|
|
|
1500 | else: # XXX file_ is equal to None? | |
|
1501 |
|
|
|
1491 | try: | |
|
1492 | n, name = l.split(':', 1) | |
|
1493 | except ValueError: | |
|
1494 | series.append(l) | |
|
1495 | else: | |
|
1496 | applied.append(statusentry(bin(n), name)) | |
|
1502 | 1497 | if datastart is None: |
|
1503 | 1498 | self.ui.warn(_("No saved patch data found\n")) |
|
1504 | 1499 | return 1 |
General Comments 0
You need to be logged in to leave comments.
Login now