push when nothing changed

John Arbash Meinel john at arbash-meinel.com
Wed Dec 6 16:46:44 GMT 2006


Alexander Belchenko wrote:
> John Arbash Meinel ?8H5B:
>>> It locks the repository while operating, and uses atomic replace to fix
>>> the contents, so it should be perfectly safe to use on a running repository.
> 
> So, if my connection to remote server suddenly break I don't lose old
> non-packed data?

Correct. It does the change in memory locally, verifies that nothing has
been lost, and then uses atomic put to update the remote index. So in
the worst case, if your network dropped out in the middle, you might end
up with an extra temp file in the remote repository.

> 
> It won't works from the root of shared repo, only from the branch. It's
> small bug, though.
> 

Well, it opens a branch so that it can find the repository. I suppose
the other possibility would be to use:

bzrdir = bzrdir.BzrDir.open(location)
repo = bzrdir.BzrDir.find_repository()

The problem is that I wanted to be able to just run it from the current
working directory, but you don't have a repository there. I guess it
could be:
        if location is None:
            a_bzrdir = bzrdir.BzrDir.open_containing('.')[0]
        else:
            a_bzrdir = bzrdir.BzrDir.open(location)
        repo = bzrdir.find_repository()

Would that work for you?

John
=:->

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


More information about the bazaar mailing list