Exchanging changes without a server
John Arbash Meinel
john at arbash-meinel.com
Mon May 3 22:22:28 BST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dmitri Pissarenko wrote:
> Hello!
>
> I want to do following:
>
> 1) Developer 1 has a Bzr repository with his source code.
>
> 2) He wants to give the source code to developer 2 and 3 so that they
> can change it and then send the changes to the code back to developer 1.
>
> All this should happen so that the changes are exchanged as file attachments to
> e-mail, i. e. there is no server running all the time.
>
> My question: How can I do this with Bazaar under Windows?
>
> Thanks in advance
>
> Dmitri
>
>
bzr init-repo --no-trees project
cd project
bzr init user1
bzr init user2
bzr co --lightweight user1 work
cd work
tar xvzf $PROJECT.tar.gz
bzr add
bzr commit -m "Initial"
bzr send ../user2 -o ../initial-history.patch
mail initial-history.patch to the other user
user 2 does
bzr init-repo --no-trees project
cd project
bzr init user1
bzr co --lightweight user1 work
cd work
bzr pull ../initial-history.patch
bzr branch --switch . ../user2
At this point, both users have a branch which relates to their work, and
a branch which represents the other person's work. When they want to
synchronize, user1 does:
cd work
bzr send ../user2 -o ../new-stuff.patch
# mail new-stuff.patch to other user, note that you can leave off '-o'
# and it should start an email app for you with an attachment
Then user2 does:
cd ../user1
bzr pull ../new-stuff.patch
cd ../work
bzr merge ../user1
bzr commit -m "Brought in the stuff from user1"
<does their own stuff>
bzr commit -m "New stuff by me"
bzr send ../user1 -o ../user2-new-stuff.patch
# mail to user1
Then user1 does:
cd ../user2
bzr pull ../user2-new-stuff.patch
cd ../work
bzr merge ../user2
bzr commit -m "Bring in the new stuff from user2."
Basically, you each maintain a branch that defines the last stuff that
the other user sent you. And you use "bzr send" to send the difference
of your current branch relative to the last-known state of the other
users branch, and 'bzr pull' to update that branch when they send you
new stuff.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvfPpQACgkQJdeBCYSNAAPzlACg04j91AX6/fbWFI3fUPUKy7Eq
kGIAoJ66xGqCybQ7r6QNHre2PFfGPOWj
=Uzr2
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list