[merge] push and pull to use Result objects

Martin Pool mbp at sourcefrog.net
Mon Feb 26 00:19:28 GMT 2007


Branch.push and Branch.pull used to return new_revno-old_revno, which is
not really very representative (they can return 0 when a switch
occurred), and leaves no room for returning more data.

This changes them to instead return a Result object with various fields.
 This is also passed to the relevant hooks, which simplifies their
interface.  (This is not a compatibility problem because those hooks
were added in this release.)

This change also changes how these results are reported, which partially
fixes https://bugs.launchpad.net/bzr/+bug/41069 and fixes
https://bugs.launchpad.net/bzr/+bug/73830

It would be good to also report how many revisions were actually
*fetched*; this gives us a place to add that.

I would like to follow this pattern for merge, etc.

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20070226-resultobj.diff
Type: text/x-patch
Size: 63128 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070226/144967f4/attachment-0001.bin 


More information about the bazaar mailing list