Comments
Patch
@@ -399,10 +399,12 @@ class pulloperation(object):
self.common = None
# set of pulled head
self.rheads = None
# list of missing changeset to fetch remotly
self.fetch = None
+ # result of changegroup pulling (used as returng code by pull)
+ self.cgresult = None
@util.propertycache
def pulledsubset(self):
"""heads of the set of changeset target by the pull"""
# compute target subset
@@ -448,22 +450,22 @@ def pull(repo, remote, heads=None, force
heads=pullop.heads,
force=force)
pullop.common, pullop.fetch, pullop.rheads = tmp
if not pullop.fetch:
pullop.repo.ui.status(_("no changes found\n"))
- result = 0
+ pullop.cgresult = 0
else:
- result = _pullchangeset(pullop)
+ pullop.cgresult = _pullchangeset(pullop)
_pullphase(pullop)
_pullobsolete(pullop)
pullop.closetransaction()
finally:
pullop.releasetransaction()
lock.release()
- return result
+ return pullop.cgresult
def _pullchangeset(pullop):
"""pull changeset from unbundle into the local repo"""
# We delay the open of the transaction as late as possible so we
# don't open transaction for nothing or you break future useful