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