Mercurial > hg
comparison mercurial/localrepo.py @ 1717:7a4a16a7d21f
hooks run after transactions finish must not affect method results.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Tue, 14 Feb 2006 15:10:45 -0800 |
parents | 03ee100b8c21 |
children | c1996b84d4f5 |
comparison
equal
deleted
inserted
replaced
1715:40346aa66b0f | 1717:7a4a16a7d21f |
---|---|
463 | 463 |
464 self.dirstate.setparents(n) | 464 self.dirstate.setparents(n) |
465 self.dirstate.update(new, "n") | 465 self.dirstate.update(new, "n") |
466 self.dirstate.forget(remove) | 466 self.dirstate.forget(remove) |
467 | 467 |
468 if not self.hook("commit", node=hex(n)): | 468 self.hook("commit", node=hex(n)) |
469 return None | |
470 return n | 469 return n |
471 | 470 |
472 def walk(self, node=None, files=[], match=util.always): | 471 def walk(self, node=None, files=[], match=util.always): |
473 if node: | 472 if node: |
474 fdict = dict.fromkeys(files) | 473 fdict = dict.fromkeys(files) |
1378 % (changesets, revisions, files, heads)) | 1377 % (changesets, revisions, files, heads)) |
1379 | 1378 |
1380 tr.close() | 1379 tr.close() |
1381 | 1380 |
1382 if changesets > 0: | 1381 if changesets > 0: |
1383 if not self.hook("changegroup", | 1382 self.hook("changegroup", node=hex(self.changelog.node(cor+1))) |
1384 node=hex(self.changelog.node(cor+1))): | |
1385 self.ui.warn(_("abort: changegroup hook returned failure!\n")) | |
1386 return 1 | |
1387 | 1383 |
1388 for i in range(cor + 1, cnr + 1): | 1384 for i in range(cor + 1, cnr + 1): |
1389 self.hook("incoming", node=hex(self.changelog.node(i))) | 1385 self.hook("incoming", node=hex(self.changelog.node(i))) |
1390 | |
1391 return | |
1392 | 1386 |
1393 def update(self, node, allow=False, force=False, choose=None, | 1387 def update(self, node, allow=False, force=False, choose=None, |
1394 moddirstate=True, forcemerge=False, wlock=None): | 1388 moddirstate=True, forcemerge=False, wlock=None): |
1395 pl = self.dirstate.parents() | 1389 pl = self.dirstate.parents() |
1396 if not force and pl[1] != nullid: | 1390 if not force and pl[1] != nullid: |