8 from node import bin, hex, nullid, nullrev, short |
8 from node import bin, hex, nullid, nullrev, short |
9 from i18n import _ |
9 from i18n import _ |
10 import repo, changegroup |
10 import repo, changegroup |
11 import changelog, dirstate, filelog, manifest, context, weakref |
11 import changelog, dirstate, filelog, manifest, context, weakref |
12 import lock, transaction, stat, errno, ui, store |
12 import lock, transaction, stat, errno, ui, store |
13 import os, revlog, time, util, extensions, hook, inspect |
13 import os, time, util, extensions, hook, inspect, error |
14 import match as match_ |
14 import match as match_ |
15 import merge as merge_ |
15 import merge as merge_ |
16 |
16 |
17 class localrepository(repo.repository): |
17 class localrepository(repo.repository): |
18 capabilities = util.set(('lookup', 'changegroupsubset')) |
18 capabilities = util.set(('lookup', 'changegroupsubset')) |
330 for node in heads: |
330 for node in heads: |
331 c = self[node] |
331 c = self[node] |
332 rev = c.rev() |
332 rev = c.rev() |
333 try: |
333 try: |
334 fnode = c.filenode('.hgtags') |
334 fnode = c.filenode('.hgtags') |
335 except revlog.LookupError: |
335 except error.LookupError: |
336 continue |
336 continue |
337 ret.append((rev, node, fnode)) |
337 ret.append((rev, node, fnode)) |
338 if fnode in last: |
338 if fnode in last: |
339 ret[last[fnode]] = None |
339 ret[last[fnode]] = None |
340 last[fnode] = len(ret) - 1 |
340 last[fnode] = len(ret) - 1 |