Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 15484:a44446ff9ad8
phases: marked content of a changegroup as published
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 11 Nov 2011 00:19:00 +0100 |
parents | 9ae766f2f452 |
children | fa47291b3f1f |
comparison
equal
deleted
inserted
replaced
15483:9ae766f2f452 | 15484:a44446ff9ad8 |
---|---|
1976 p = lambda: cl.writepending() and self.root or "" | 1976 p = lambda: cl.writepending() and self.root or "" |
1977 self.hook('pretxnchangegroup', throw=True, | 1977 self.hook('pretxnchangegroup', throw=True, |
1978 node=hex(cl.node(clstart)), source=srctype, | 1978 node=hex(cl.node(clstart)), source=srctype, |
1979 url=url, pending=p) | 1979 url=url, pending=p) |
1980 | 1980 |
1981 added = [cl.node(r) for r in xrange(clstart, clend)] | |
1982 if srctype != 'strip': | |
1983 phases.advanceboundary(self, 0, added) | |
1981 # make changelog see real files again | 1984 # make changelog see real files again |
1982 cl.finalize(trp) | 1985 cl.finalize(trp) |
1983 | 1986 |
1984 tr.close() | 1987 tr.close() |
1985 finally: | 1988 finally: |
1992 self.ui.debug("updating the branch cache\n") | 1995 self.ui.debug("updating the branch cache\n") |
1993 self.updatebranchcache() | 1996 self.updatebranchcache() |
1994 self.hook("changegroup", node=hex(cl.node(clstart)), | 1997 self.hook("changegroup", node=hex(cl.node(clstart)), |
1995 source=srctype, url=url) | 1998 source=srctype, url=url) |
1996 | 1999 |
1997 for i in xrange(clstart, clend): | 2000 for n in added: |
1998 self.hook("incoming", node=hex(cl.node(i)), | 2001 self.hook("incoming", node=hex(n), source=srctype, url=url) |
1999 source=srctype, url=url) | |
2000 | 2002 |
2001 # never return 0 here: | 2003 # never return 0 here: |
2002 if dh < 0: | 2004 if dh < 0: |
2003 return dh - 1 | 2005 return dh - 1 |
2004 else: | 2006 else: |