Q: How to merge my changes back to a shared repository?

John Arbash Meinel john at arbash-meinel.com
Sun Jan 8 17:46:02 GMT 2006


Claudius Schnörr wrote:
> Hello,
> 
> I just started to use bzr (bazaar-ng) 0.6.2.
> 
> All works fine so far except that I'm not able to update my changes to a
> shared repository.
> 
> What I did so far:
> - bzr branch sftp://user@host//opt/BZRrep/Testproj
> - cd Testproj
> - edit some files
> - bzr commit -m "some changes"
> 
> Now, with the following commands I get errors:
> - bzr export sftp://user@host//opt/BZRrep/Testproj
> - bzr export sftp://user@host//opt/BZRrep
> - bzr merge
> - bzr export sftp://user@host/opt/BZRrep/Testproj
> - bzr export sftp://user@host/opt/BZRrep

You don't want the 'export' command. Export is the idea of taking the
current branch, and creating a non-bzr 'export'. Such as a tarball, or a
regular directory structure.

...

> Can anybody help?
> 
> I thank you in advance,
> 
> Claudius

What you want is 'push'. As in
bzr push sftp://user@host//opt/BZRrep/Testproj

After running it one time, it will remember the location, so you can
just do:
bzr push

Also, since you have branched, to get up-to-date, you can run:
bzr pull

If it is truly shared, then you need to make sure you 'pull' before you
commit, so that you can cleanly push (you don't have a diverged shared
location).

For example:

1) Wake up in the morning
2) 'bzr pull' # Get any changes from overnight
3) hack hack
4) 'bzr pull' # Make sure you didn't miss anything since you started
   hacking
5) 'bzr commit -m stuff'
6) 'bzr push' # Update the remote branch.

I have implemented something called bound branches, which handle steps
4,5,6 for you automatically when you go to commit. (Actually it just
restricts commit if you haven't done 4, but it does 5, 6 for you).

This isn't in mainline yet, but it might make it into 0.7.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060108/e0cfe420/attachment.pgp 


More information about the bazaar mailing list