Mercurial > public > mercurial-scm > hg
comparison mercurial/httprepo.py @ 11153:9936ed1d04f4
push: document return values between various repo methods.
This starts at localrepository.push() and seeps down to
push_addchangegroup(), push_unbundle(), prepush(), addchangegroup(),
and leaks out to sshrepository.unbundle(), sshrepository.addchangegroup(),
and httprepository.unbundle(). Seems to cover everything you ever
wanted to know about pushing but were afraid to ask.
author | Greg Ward <greg-hg@gerg.ca> |
---|---|
date | Sun, 02 May 2010 21:56:25 -0400 |
parents | 2e1a9b811d13 |
children | db3f6f0e4e7d |
comparison
equal
deleted
inserted
replaced
11152:e8d10d085f47 | 11153:9936ed1d04f4 |
---|---|
206 headlst = " ".join([hex(n) for n in heads]) | 206 headlst = " ".join([hex(n) for n in heads]) |
207 f = self.do_cmd("changegroupsubset", bases=baselst, heads=headlst) | 207 f = self.do_cmd("changegroupsubset", bases=baselst, heads=headlst) |
208 return util.chunkbuffer(zgenerator(f)) | 208 return util.chunkbuffer(zgenerator(f)) |
209 | 209 |
210 def unbundle(self, cg, heads, source): | 210 def unbundle(self, cg, heads, source): |
211 '''Send cg (a readable file-like object representing the | |
212 changegroup to push, typically a chunkbuffer object) to the | |
213 remote server as a bundle. Return an integer response code: | |
214 non-zero indicates a successful push (see | |
215 localrepository.addchangegroup()), and zero indicates either | |
216 error or nothing to push.''' | |
211 # have to stream bundle to a temp file because we do not have | 217 # have to stream bundle to a temp file because we do not have |
212 # http 1.1 chunked transfer. | 218 # http 1.1 chunked transfer. |
213 | 219 |
214 type = "" | 220 type = "" |
215 types = self.capable('unbundle') | 221 types = self.capable('unbundle') |