[PATCH] cleanup branch.find_branch_root() (was Re: About merging)
David Vanderson
dave.vanderson at cox.net
Sun Jun 26 22:50:07 BST 2005
John A Meinel wrote:
<snip>
>I think the preferred fix is to make a Branch() object always require an
>explicit base, which must exist, and must be the root. And then change
>all of the other places in the code to use "find_branch".
>
>Admittedly, the current code always wants to search, but in my mind,
>once I'm instantiating an actual branch object, it should be fully
>defined what branch I am getting, it shouldn't go and search.
>If I am calling a function named "find_branch" then I obviously realize
>that I am searching for the root.
>
>
I agree. I have reworked the patch.
>Also, I wouldn't change the name of the parameter from "base" to "f".
>Base has quite a bit more meaning.
>
>
Done.
>Is there any reason that RemoteBranch uses "self.baseurl" instead of
>"self.base"? It means that when you instantiate a RemoteBranch object,
>you have to realize what type it is (or look for both).
>If baseurl is important, maybe it could define both.
>
>John
>=:->
>
>
>
I'm not sure. Since this is my first real foray into the code, I
figured I'd try to touch as little as possible.
Thanks very much for the comments. I have 2 questions:
In find_branch_root, we check for os.path.realpath, but in
Branch.__init__ we just use it. One of those must be wrong, right?
If you are in a subdirectory and do a "bzr diff", you'll get the same
output as if you do "bzr diff" in the branch's root. Is this intentional?
Thanks,
Dave
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cleanup_find_branch_root.patch.1
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20050626/834643e3/attachment.diff
More information about the bazaar
mailing list