Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/localrepo.py @ 2229:0ff326c2b286
changegroup hooks: add source to hook parameters
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Mon, 08 May 2006 16:07:56 -0700 |
parents | c9e264b115e6 |
children | 332950340788 |
comparison
equal
deleted
inserted
replaced
2228:8b106ff5b8a9 | 2229:0ff326c2b286 |
---|---|
1467 return cl.rev(x) | 1467 return cl.rev(x) |
1468 | 1468 |
1469 if not source: | 1469 if not source: |
1470 return 0 | 1470 return 0 |
1471 | 1471 |
1472 self.hook('prechangegroup', throw=True) | 1472 self.hook('prechangegroup', throw=True, source=source) |
1473 | 1473 |
1474 changesets = files = revisions = 0 | 1474 changesets = files = revisions = 0 |
1475 | 1475 |
1476 tr = self.transaction() | 1476 tr = self.transaction() |
1477 | 1477 |
1532 self.ui.status(_("added %d changesets" | 1532 self.ui.status(_("added %d changesets" |
1533 " with %d changes to %d files%s\n") | 1533 " with %d changes to %d files%s\n") |
1534 % (changesets, revisions, files, heads)) | 1534 % (changesets, revisions, files, heads)) |
1535 | 1535 |
1536 self.hook('pretxnchangegroup', throw=True, | 1536 self.hook('pretxnchangegroup', throw=True, |
1537 node=hex(self.changelog.node(cor+1))) | 1537 node=hex(self.changelog.node(cor+1)), source=source) |
1538 | 1538 |
1539 tr.close() | 1539 tr.close() |
1540 | 1540 |
1541 if changesets > 0: | 1541 if changesets > 0: |
1542 self.hook("changegroup", node=hex(self.changelog.node(cor+1))) | 1542 self.hook("changegroup", node=hex(self.changelog.node(cor+1)), |
1543 source=source) | |
1543 | 1544 |
1544 for i in range(cor + 1, cnr + 1): | 1545 for i in range(cor + 1, cnr + 1): |
1545 self.hook("incoming", node=hex(self.changelog.node(i))) | 1546 self.hook("incoming", node=hex(self.changelog.node(i)), |
1547 source=source) | |
1546 | 1548 |
1547 return newheads - oldheads + 1 | 1549 return newheads - oldheads + 1 |
1548 | 1550 |
1549 def update(self, node, allow=False, force=False, choose=None, | 1551 def update(self, node, allow=False, force=False, choose=None, |
1550 moddirstate=True, forcemerge=False, wlock=None, show_stats=True): | 1552 moddirstate=True, forcemerge=False, wlock=None, show_stats=True): |