Mercurial > public > mercurial-scm > hg-stable
diff mercurial/filelog.py @ 45811:a5206e71c536
revlog: extend addgroup() with callback for duplicates
The addgroup() interface currently doesn't allow the caller to keep
track of duplicated nodes except by looking at the returned node list.
Add an optional second callback for this purpose and change the return
type to a boolean. This allows follow-up changes to use more efficient
storage for the node list in places that are memory-sensitive.
Differential Revision: https://phab.mercurial-scm.org/D9231
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Sun, 18 Oct 2020 22:18:02 +0200 |
parents | 687b865b95ad |
children | b994db7c4d1e f7b61ad3c64a |
line wrap: on
line diff
--- a/mercurial/filelog.py Wed Oct 07 14:26:47 2020 +0530 +++ b/mercurial/filelog.py Sun Oct 18 22:18:02 2020 +0200 @@ -139,6 +139,7 @@ linkmapper, transaction, addrevisioncb=None, + duplicaterevisioncb=None, maybemissingparents=False, ): if maybemissingparents: @@ -150,7 +151,11 @@ ) return self._revlog.addgroup( - deltas, linkmapper, transaction, addrevisioncb=addrevisioncb + deltas, + linkmapper, + transaction, + addrevisioncb=addrevisioncb, + duplicaterevisioncb=duplicaterevisioncb, ) def getstrippoint(self, minlink):