diff mercurial/sshrepo.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 08a0f04b56bd
children 1765897fc497
line wrap: on
line diff
--- a/mercurial/sshrepo.py	Sat May 01 18:39:40 2010 -0400
+++ b/mercurial/sshrepo.py	Sun May 02 21:56:25 2010 -0400
@@ -217,6 +217,10 @@
         return self.do_cmd("changegroupsubset", bases=bases, heads=heads)
 
     def unbundle(self, cg, heads, source):
+        '''Send cg (a readable file-like object representing the
+        changegroup to push, typically a chunkbuffer object) to the
+        remote server as a bundle. Return an integer indicating the
+        result of the push (see localrepository.addchangegroup()).'''
         d = self.call("unbundle", heads=' '.join(map(hex, heads)))
         if d:
             # remote may send "unsynced changes"
@@ -242,6 +246,9 @@
             self.abort(error.ResponseError(_("unexpected response:"), r))
 
     def addchangegroup(self, cg, source, url):
+        '''Send a changegroup to the remote server.  Return an integer
+        similar to unbundle(). DEPRECATED, since it requires locking the
+        remote.'''
         d = self.call("addchangegroup")
         if d:
             self.abort(error.RepoError(_("push refused: %s") % d))