Trouble with "bind/update"

Torsten Bronger bronger at physik.rwth-aachen.de
Tue Apr 22 10:34:48 BST 2008


Hallöchen!

John Arbash Meinel writes:

> Torsten Bronger wrote:
>
>> [...]  In order to work more safely (*cough*), I wanted to switch
>> to an SVN-like development with "bzr bind".
>>
>> However, then the next commit failed and told me to do an update.
>> I did, and it reported me a lot of changes to my working tree.  I
>> didn't like that and said "revert".  Stupid me.
>
> Your changes are still present in the local repository.

*Hug*

> [...]
>
>> By the way, the "revert" didn't leave any foo.bar.~123~ files in
>> my directories.
>
> That is because it was shown as a clean merge. (The files would be
> the same if you did 'bzr revert; bzr merge -r revid:XXXX'.) So it
> looked the same as if you had merged someone else's code (didn't
> change anything) and then changed your mind and did 'bzr revert'.

But in my case, the files didn't also exist somewhere else, unless
the dead head in the local repo counts.

> I agree there are some limitations, however after the 'update' it
> should have told you:
>   Your local commits will now show as pending merges with 'bzr status',
>   and can be committed with 'bzr commit'.
>
> If you have suggestions about how we could convey that better, we
> would be happy to hear them.

The problem is maybe some sort of culture clash.  Coming from SVN, I
didn't expect that the sequence "bind/update" renders my locally
committed things dangling.  In spite of the above message, one
thinks that "once committed means safe".  Maybe one could prepend
the line "Note that some of your local commits are not committed
anymore!  These commits will now ...".

Alternatively, one can use the error message after a failed commit to
the bound branch to inform SVN users that they are doing somthing
potentially dangerous.  At the moment, it says:

    bzr: ERROR: Bound branch BzrBranch6('...') is out of date with master branch RemoteBranch(...).
    To commit to master branch, run update and then commit.

First, the "out of date" seems unfortunate to me; in my case, it was
the other way round actually. And secondly, one can insert the line
"You may wish to synchronize with the master branch with pull/push
before committing any changes."  However, this is not waterproof
because the local changes would be in the way at first.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                                      Jabber ID: bronger at jabber.org
               (See http://ime.webhop.org for further contact info.)




More information about the bazaar mailing list