Push after commit --local
Robert Collins
robertc at robertcollins.net
Wed Sep 20 01:13:20 BST 2006
On Tue, 2006-09-19 at 13:59 +0200, Matthieu Moy wrote:
> "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.
I agree with you. Additionally I think that update is expected to be a
'read only' command by users - it would be disorientating to have it
alter the master repository.
> 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.
Theres a separate proposal to have commit be smart enough to push local
commits even if theres nothing to commit locally. I'm not sure how I
feel about that, it does not seem very satisfactory.
-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060920/29c8763c/attachment.pgp
More information about the bazaar
mailing list