I think I understand it. I haven't probed deep enough to be sure but this line:
if br_to is None:
# We have a repository but no branch, copy the revisions, and then
# create a branch. repository_to.fetch(source.repository, revision_id=revision_id)
Looks like it is doing the right thing, but I think it is subtly wrong. Namely, 'revision_id' is a string only if the user specifies "bzr push -r XXXX", otherwise it is just "None".
This handled in the other code paths with a:
if stop_revision is None:
stop_revision = the_branch.last_revision()
I think I understand it. I haven't probed deep enough to be sure but this line:
if br_to is None:
repository _to.fetch( source. repository, revision_ id=revision_ id)
# We have a repository but no branch, copy the revisions, and then
# create a branch.
Looks like it is doing the right thing, but I think it is subtly wrong. Namely, 'revision_id' is a string only if the user specifies "bzr push -r XXXX", otherwise it is just "None".
This handled in the other code paths with a:
if stop_revision is None: last_revision( )
stop_revision = the_branch.
But that isn't being done in this code path.