[RFC] make push a separate method on Branch

John Arbash Meinel john at arbash-meinel.com
Mon Jan 29 17:25:14 GMT 2007


Robert Collins wrote:
> We have push currently implemented via pull(), because its largely
> symmetrical. I wanted to write a hook today that would be for push only,
> but couldn't because of this. One way in which push and pull are not
> symmetrical is in performance: in push, the source branch is always
> local, and thus fast, and in pull, the target branch is always local and
> thus fast.
> 
> So I think we should have explicit push and pull methods on branch,
> which may share a common worker function - I'll look at that when doing
> the split.
> 
> Thoughts ?
> 
> -Rob

Having them as separate functions seems reasonable.

IIRC, There are some other things which are slightly different. Like it
 doesn't make really sense for 'push' to set the parent, since parent
isn't usually accessible from that location relative to the target. If I
push from a local path to another machine, it would get a 'file:///'
path on the other machine. I think Aaron argued that since it *might*
(you might have a similar setup on the other machine), it doesn't hurt
to set it, and might actually be useful. I don't really agree, but not
enough to fight a lot about it.

John
=:->




More information about the bazaar mailing list