Mercurial > hg
comparison mercurial/localrepo.py @ 3578:3b4e00cba57a
Define and use nullrev (revision of nullid) instead of -1.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 29 Oct 2006 10:53:51 +0100 |
parents | 7f7425306925 |
children | 5be434785317 |
comparison
equal
deleted
inserted
replaced
3577:7f7425306925 | 3578:3b4e00cba57a |
---|---|
330 self.changelog.node(lrev) == last): # sanity check | 330 self.changelog.node(lrev) == last): # sanity check |
331 for l in f: | 331 for l in f: |
332 node, label = l.rstrip().split(" ", 1) | 332 node, label = l.rstrip().split(" ", 1) |
333 partial[label] = bin(node) | 333 partial[label] = bin(node) |
334 else: # invalidate the cache | 334 else: # invalidate the cache |
335 last, lrev = nullid, -1 | 335 last, lrev = nullid, nullrev |
336 f.close() | 336 f.close() |
337 except IOError: | 337 except IOError: |
338 last, lrev = nullid, -1 | 338 last, lrev = nullid, nullrev |
339 return partial, last, lrev | 339 return partial, last, lrev |
340 | 340 |
341 def _writebranchcache(self, branches, tip, tiprev): | 341 def _writebranchcache(self, branches, tip, tiprev): |
342 try: | 342 try: |
343 f = self.opener("branches.cache", "w") | 343 f = self.opener("branches.cache", "w") |