Push after commit --local

Matthieu Moy Matthieu.Moy at imag.fr
Tue Sep 19 12:59:31 BST 2006


"James Henstridge" <james at jamesh.id.au> writes:

> How about making "bzr update" do a push in the case where the local
> checkout's revision history is a strict superset of the master
> branch's history? 

I don't think it is a good idea.

I like commands to be predictible, and here, I can type "bzr update"
while the master doesn't have a new revision, and by the time bzr
accesses it, a new revision has came. Or I can just "incorrectly
believe" that there are no new revisions, and get unexpected results.

After "push", I don't need to commit, while after "update", I do. And
it'd find it pretty disturbing if the rule for "do I have to commit
after update to make my changes available" is "sometimes". BTW, is not
far from the "pull" Vs "merge" debate.

So, I prefer having a separate command, and having error messages
pointing to it:

$ bzr commit -m foo
bzr: ERROR: Bound branch BzrBranch5('file:///tmp/bar/') is out of date with master branch BzrBranch5('file:///tmp/foo/').
To commit to master branch, run update and then commit.
You can also pass --local to commit to continue working disconnected.

It should say

"To commit to master branch, run push --master or update and then commit"

(assuming "push --master" is chosen and implemented)

And "push" should point to update when pushing to the master if the
branches have diverged.

-- 
Matthieu




More information about the bazaar mailing list