[merge] push and pull to use Result objects
John Arbash Meinel
john at arbash-meinel.com
Mon Feb 26 14:17:48 GMT 2007
John Arbash Meinel has voted +1 (conditional).
Status is now: Semi-approved
Comment:
I like having more information returned by push/pull.
I wonder if we want to define __str__ rather than just __int__. I
thought __int__ only came into play if someone did int(X). And I don't
think people are doing:
count = Branch.pull()
int(count)
I don't really like that the Result objects do not have members
pre-defined. It means that if you want to figure out what you are
supposed to look for, you have to go to the code that uses them, and
figure it out. Or do introspection of the objects in an interpreter.
I'm guessing it was because you didn't really know what you wanted to
add. But I think you have figured it out by now.
If you want it to be easy to add new key=>value pairs (which is really
all members are) I would rather see it as an explicit dictionary. So
that people see it as such, rather than expecting them to use
result.__dict__ or something like that.
This isn't strictly backwards compatible, but I think it is a simple
enough upgrade that it is worth breaking. I do think it would be good
for the 'bzr pull' output to spit out more than the current revno. I
find "bzr update" to be pretty confusing because it doesn't give me any
sense of context. I would prefer at least "Now at revno 2 (from revno
1)". Or something like that.
For details, see:
http://bundlebuggy.aaronbentley.com/request/%3C45E22790.8080604%40sourcefrog.net%3E
More information about the bazaar
mailing list