Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 15890:e234eda20984
revlog: make addgroup returns a list of node contained in the added source
This list will contains any node see in the source, not only the added one.
This is intended to allow phase to be move according what was pushed by client
not only what was added.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 13 Jan 2012 01:29:03 +0100 |
parents | 816209eaf963 |
children | 249d3420ec9c |
comparison
equal
deleted
inserted
replaced
15889:816209eaf963 | 15890:e234eda20984 |
---|---|
2013 self.count += 1 | 2013 self.count += 1 |
2014 pr = prog() | 2014 pr = prog() |
2015 source.callback = pr | 2015 source.callback = pr |
2016 | 2016 |
2017 source.changelogheader() | 2017 source.changelogheader() |
2018 if (cl.addgroup(source, csmap, trp) is None | 2018 srccontent = cl.addgroup(source, csmap, trp) |
2019 and not emptyok): | 2019 if not (srccontent or emptyok): |
2020 raise util.Abort(_("received changelog group is empty")) | 2020 raise util.Abort(_("received changelog group is empty")) |
2021 clend = len(cl) | 2021 clend = len(cl) |
2022 changesets = clend - clstart | 2022 changesets = clend - clstart |
2023 for c in xrange(clstart, clend): | 2023 for c in xrange(clstart, clend): |
2024 efiles.update(self[c].files()) | 2024 efiles.update(self[c].files()) |
2062 f = chunkdata["filename"] | 2062 f = chunkdata["filename"] |
2063 self.ui.debug("adding %s revisions\n" % f) | 2063 self.ui.debug("adding %s revisions\n" % f) |
2064 pr() | 2064 pr() |
2065 fl = self.file(f) | 2065 fl = self.file(f) |
2066 o = len(fl) | 2066 o = len(fl) |
2067 if fl.addgroup(source, revmap, trp) is None: | 2067 if not fl.addgroup(source, revmap, trp): |
2068 raise util.Abort(_("received file revlog group is empty")) | 2068 raise util.Abort(_("received file revlog group is empty")) |
2069 revisions += len(fl) - o | 2069 revisions += len(fl) - o |
2070 files += 1 | 2070 files += 1 |
2071 if f in needfiles: | 2071 if f in needfiles: |
2072 needs = needfiles[f] | 2072 needs = needfiles[f] |