[MERGE][0.14] Allow 'bzr push' to push onto existing dir

Alexander Belchenko bialix at ukr.net
Wed Jan 10 20:12:43 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Arbash Meinel пишет:
> I'm looking into fixing:
>   https://launchpad.net/bugs/45504
>   https://launchpad.net/bugs/53340
>   https://launchpad.net/bugs/30576
> 
> By suggestion, I changed how I'm doing it. While working on this, I'm
> concerned that our api isn't quite what we want. But since I'm trying to
> get this merged for 0.14 I did it in a minimally invasive manner, and it
> is set up to be refactored easily.
> 
> Basically this code changes the 'cmd_push' logic so that if there is a
> target BzrDir it will attempt to reuse the target repository and create
> a Branch on demand. Note that it won't create a target WorkingTree,
> mostly because the logic for that is quite a bit trickier. We can't just
> use sprout() or clone() because both of those want to create the BzrDir.
> And I don't feel like implementing 90% of them again.

I have a question: how your code differentiate between incomplete
target standalone branch without repository and incomplete branch
in shared repository?

> 
> It also changes the 'create_prefix' loop, to be (IMO) cleaner, since
> transport.mkdir('.') works just fine rather than trying to clone to the
> parent and pop off the child directory name, etc.
> 
> It also adds '--use-existing' which allows you to 'bzr push' onto a
> directory that already exists, but that has no control directory
> already. (I also thought to call it --use-existing-dir).

- --use-existing-dir is longer but more clear, IMO.

> This should reduce a lot of the errors reported by users of Launchpad.
> Since the changes should allow resuming a push if it gets ^C in the
> middle of transfer.
> 
> There still is a small need for a command that can move the remote
> directory out of the way, or that can nuke the remote .bzr (or rename
> it) and then push over what used to be there. Because there are still
> potential race conditions that can leave something that isn't
> recognizable by bzr. (If you ^C after .bzr/branch is made but before
> ..bzr/branch/format is written, etc)
> 
> I'd like to get feedback on this, since it would be really nice to get
> this into 0.14, and that means getting quick feedback.

+0: I read your patch carefully but I'd like to test it in my real tasks.

> Since it only adds functionality (nothing is deprecated), I think it can
> still qualify as bug-fixes and get merged after the freeze.

- --
Alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFpUi7zYr338mxwCURAjmTAJ9THu6xYBU98F9vITw+Pip/2U7YMACfcd9w
p+IW8GefuXpHnPhpnJRxzyI=
=MOUa
-----END PGP SIGNATURE-----




More information about the bazaar mailing list