Transport patch (was Please explain LOCATION in the pull command)
Martin Pool
martinpool at gmail.com
Wed Sep 14 04:18:03 BST 2005
On 13/09/05, John A Meinel <john at arbash-meinel.com> wrote:
> Currently only http:// and local references are supported. ftp support
> in the current framework is possible.
> I developed an backend change, which was supposed to make it easier to
> install new protocols (and I implemented local filesystem, http, sftp
> (crude) and rsync versions).
>
> Currently, a lot of the bzr code can only write to the local filesystem,
> and makes assumptions (that os.normpath() works correctly) on files it
> is going to write to. So my Transport work only really fixed the read
> portion (but left open the ability to create proper write support).
>
> I think it has bit-rotted a little bit, I branched at about revno=900 or
> so, and now bzr.dev is on 1197. I've been on vacation, but I'll
> hopefully have some time to clean it up for Martin to look at it again.
It has rotted a bit so not easy to merge in, but I'm looking at the
diff. (Attached, in case anyone else wants to comment - Robert?)
It looks a bit large and intimidating but I see a fair fraction of the
changes are just replacements of direct io with redirections through
the transport, and that should be easy to update.
I think that the Branch should probably discard any cached information
when it's unlocked. While it's locked, we assume that nobody else can
change it.
Indeed it might be nice to cache digested objects, rather than files,
so as to avoid repeatedly parsing, but that doesn't have to be done
now.
I see you commented out the code that hides the tracebacks. I can
understand why :-) but I think for regular users it's much better not
to have them. In my tree now if you set BZR_DEBUG=1 then you get
trace messages and full backtraces on stderr, which is better for
developers.
We can probably get rid of ScratchBranch etc now that the test
framework runs each test inside a temporary directory; that might mean
moving some tests on branch from docstrings into regular tests but
that's OK.
A stylistic things, barely worth mentioning and some are arbitrary but
it is good to keep things consistent.
- The first line of a docstring should be a self-contained sentence.
- Our pattern is to keep tests in bzrlib.selftest, not in the code
they describe.
Reviewing this makes me think it would be nice to have a command we
could call "diff-for-merge" (maybe something better, "outstanding"?),
which shows a the diff since the last point on a branch that has been
merged.
I'd be happy to put in an updated form of this.
--
Martin
More information about the bazaar
mailing list