##// END OF EJS Templates
fix bad assumption about uniqueness of file versions...
mpm@selenic.com -
r224:ccbcc4d7 default
parent child Browse files
Show More
@@ -417,7 +417,6 b' elif cmd == "verify":'
417 417
418 418 manifestchangeset[changes[0]] = n
419 419 for f in changes[3]:
420 revisions += 1
421 420 filelinkrevs.setdefault(f, []).append(i)
422 421
423 422 ui.status("checking manifests\n")
@@ -468,6 +467,7 b' elif cmd == "verify":'
468 467 fl = repo.file(f)
469 468 nodes = { hg.nullid: 1 }
470 469 for i in range(fl.count()):
470 revisions += 1
471 471 n = fl.node(i)
472 472
473 473 if n not in filenodes[f]:
@@ -505,10 +505,6 b' elif cmd == "verify":'
505 505 nodes[n] = 1
506 506
507 507 # cross-check
508 for flr in filelinkrevs[f]:
509 ui.warn("changeset rev %d not in %s\n" % (flr, f))
510 errors += 1
511
512 508 for node in filenodes[f]:
513 509 ui.warn("node %s in manifests not in %s\n" % (hg.hex(n), f))
514 510 errors += 1
@@ -814,7 +814,7 b' class localrepository:'
814 814 # pull off the changeset group
815 815 self.ui.status("adding changesets\n")
816 816 co = self.changelog.tip()
817 cn = self.changelog.addgroup(getgroup(), csmap, tr)
817 cn = self.changelog.addgroup(getgroup(), csmap, tr, 1) # unique
818 818 changesets = self.changelog.rev(cn) - self.changelog.rev(co)
819 819
820 820 # pull off the manifest group
@@ -433,7 +433,7 b' class revlog:'
433 433
434 434 yield struct.pack(">l", 0)
435 435
436 def addgroup(self, revs, linkmapper, transaction):
436 def addgroup(self, revs, linkmapper, transaction, unique = 0):
437 437 # given a set of deltas, add them to the revision log. the
438 438 # first delta is against its parent, which should be in our
439 439 # log, the rest are against the previous delta.
@@ -463,7 +463,10 b' class revlog:'
463 463 node, p1, p2, cs = struct.unpack("20s20s20s20s", chunk[:80])
464 464 link = linkmapper(cs)
465 465 if node in self.nodemap:
466 # this can happen if two branches make the same change
467 if unique:
466 468 raise "already have %s" % hex(node[:4])
469 continue
467 470 delta = chunk[80:]
468 471
469 472 if not chain:
General Comments 0
You need to be logged in to leave comments. Login now