All pastes #157645 Raw Edit

Something

public text v1 · immutable
·published 2006-09-01 18:03 UTC
rendered paste body
While pushing there are two common cases we decently handle:

 1a) The target dir doesn't exist. Create it and happily push everything.
 1b) Some parent directories also don't exist. Create them if
     --creat-prefix is given, complain and bail if not.

 2) The target is the same branch, but older. Update it.

Between case 1 and 2 there are several other situations one can
encounter. With Launchpad hosted branches, initial pushes get
interrupted from time to time. When people try to resume, bzr will
loudly fail. Usually some part of the bzrdir hierarchy has been written,
but not enough for bzr to recognize it as a valid branch.

A complicating factor is that Launchpad does not allow you to remove the
branch directory:

 https://launchpad.net/products/launchpad-bazaar/+bug/34540


See

https://launchpad.net/products/launchpad-bazaar/+bug/53340
https://launchpad.net/products/bzr/+bug/45504
https://launchpad.net/products/bzr/+bug/30576

no deleting of branches:
Different kinds of situations:

two trivial ones, the dir does not exist, and there is already a branch
present.

the dir exists and has a branch present
    normal diverged branch logic kicks in (or not)

the dir does not exist
    create it and go on

more than one level does not exist
    create the inbetween parts if --create-prefix is given, fail
    otherwise

the dir exists but is entirely empty
    populate with .bzr and continue

the dir exists and has a .bzr that isn't entirely done
    overwrite it?

the dir exists and has non .bzr files but no .bzr
    blow away? remote/local


the dir exists 
Wouter van Heyst