mercurial/localrepo.py
changeset 1732 d3e6da334b85
parent 1727 019e6a47a53e
parent 1730 0f1d2c75db5e
child 1736 50de0887bbcd
equal deleted inserted replaced
1727:019e6a47a53e 1732:d3e6da334b85
  1343         def revmap(x):
  1343         def revmap(x):
  1344             return self.changelog.rev(x)
  1344             return self.changelog.rev(x)
  1345 
  1345 
  1346         if not source:
  1346         if not source:
  1347             return
  1347             return
       
  1348 
       
  1349         self.hook('prechangegroup', throw=True)
       
  1350 
  1348         changesets = files = revisions = 0
  1351         changesets = files = revisions = 0
  1349 
  1352 
  1350         tr = self.transaction()
  1353         tr = self.transaction()
  1351 
  1354 
  1352         oldheads = len(self.changelog.heads())
  1355         oldheads = len(self.changelog.heads())
  1384             heads = _(" (+%d heads)") % (newheads - oldheads)
  1387             heads = _(" (+%d heads)") % (newheads - oldheads)
  1385 
  1388 
  1386         self.ui.status(_("added %d changesets"
  1389         self.ui.status(_("added %d changesets"
  1387                          " with %d changes to %d files%s\n")
  1390                          " with %d changes to %d files%s\n")
  1388                          % (changesets, revisions, files, heads))
  1391                          % (changesets, revisions, files, heads))
       
  1392 
       
  1393         self.hook('pretxnchangegroup', throw=True,
       
  1394                   node=hex(self.changelog.node(cor+1)))
  1389 
  1395 
  1390         tr.close()
  1396         tr.close()
  1391 
  1397 
  1392         if changesets > 0:
  1398         if changesets > 0:
  1393             self.hook("changegroup", node=hex(self.changelog.node(cor+1)))
  1399             self.hook("changegroup", node=hex(self.changelog.node(cor+1)))