[PLUGIN] rsync-push rsync-pull

John Meinel john at arbash-meinel.com
Wed Jun 22 18:48:12 BST 2005


On Jun 22, 2005, at 7:56 AM, Aaron Bentley wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> John Arbash Meinel wrote:
>> Anyway, these provide the following commands:
>> bzr rsync-pull
>> bzr rsync-push
>>
>> They will create the files .bzr/x-rsync-location and 
>> .bzr/x-rsync-revision
>> Which keep track of the last push/pull location and last push/pull 
>> revision.
>>
>> I would love to integrate this better with "bzr pull" that Aaron 
>> Bentley
>> wrote, but the protocols are different. You cannot access branch
>> information over rsync, but rsync is much faster to download than the
>> current RemoteBranch code.
>
> These sound an awful lot like the bzr-push and bzr-pull scripts in the
> bzrtools.  bzr-push can also be used as a plugin, though I didn't do
> that for bzr-pull, because I considered it obsolete.
>
> If your rsync-push script only uploads source files and control files,
> it's an improvement on mine.
>
> In any case, the x-pull-data and x-push-data files are already intended
> for use with rsync.
I should have looked closer to see what had been implemented. It does 
indeed only copy control files. It uses the same steps as the 
upload-bzr.dev script. Except it looks to see if .bzrignore and 
.rsyncignore exist before telling rsync to use them.

I also thing the script needs a few more bits of detection. 
Specifically, it should check to see if the working tree has any 
uncommitted changes before allowing you to do a push or pull.

>
>> Long term, bzr pull is the better way to go, but for the moment, this 
>> is
>> faster, remembers permissions, and allows "bzr push". It just is more
>> dangerous, as you can lose changes if you are not careful.
>
> What would not allow "bzr push"?

What I meant was more of a native version, which uses the Branch 
interface. Currently "bzr pull" uses a RemoteBranch in order to do the 
pull. Which means it can handle all sorts of nice conflicts, etc. But 
because we don't support writing to a remote branch yet, we cannot 
implement "bzr push".

If I get the time, I will try and look closer at your bzr-push script, 
and try and resolve any differences. For now, I made it work for my 
needs. Which means I can actually use bzr for development (at least of 
bzr plugins :) because I can store them centrally and develop on the 3+ 
machines I happen to work on.

Another small benefit to bzr rsync-pull is that it will also take into 
account a .bzrignore or .rsyncignore file. It does not delete excluded 
files, so it won't remove all of your ".pyc" files each time you try to 
do a sync.

Also, bzr rsync-pull is designed to check and see if the revno changes, 
and if it does, it will print out the logs of the new revisions. It 
only does it when the --verbose flag is set, but I default it so that 
it is always set.

>
> Aaron
>

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050622/05c072ea/attachment.pgp 


More information about the bazaar mailing list