Merge lp://staging/~mbp/bzr/135234-checkout-relpath into lp://staging/bzr

Proposed by Martin Pool
Status: Rejected
Rejected by: Martin Pool
Proposed branch: lp://staging/~mbp/bzr/135234-checkout-relpath
Merge into: lp://staging/bzr
Diff against target: 195 lines (+53/-18)
6 files modified
NEWS (+7/-3)
bzrlib/branch.py (+23/-7)
bzrlib/builtins.py (+2/-1)
bzrlib/tests/blackbox/test_bound_branches.py (+2/-0)
bzrlib/tests/blackbox/test_checkout.py (+12/-4)
bzrlib/tests/test_branch.py (+7/-3)
To merge this branch: bzr merge lp://staging/~mbp/bzr/135234-checkout-relpath
Reviewer Review Type Date Requested Status
Ian Clatworthy Approve
Review via email: mp+21343@code.staging.launchpad.net

Commit message

(mbp) store a relative URL to the master branch of checkouts

Description of the change

This fixes bug 135234 by:

- storing relative URLs to the master branch for lightweight and heavyweight checkouts
- coping with a trailing newline in the location file, in case it's manually edited

To post a comment you must log in.
Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

3 cheers for this patch! Some minor things:

* there's a bit of junk in NEWS - "* Cope"
* builtins.py has ", e" added to an except clause and the exception isn't used anywhere. (I'm fine with leaving that as is though - it's harmless.)

review: Approve
5094. By Martin Pool

Fix typo

Revision history for this message
Martin Pool (mbp) wrote :
5095. By Martin Pool

merge news

Revision history for this message
Martin Pool (mbp) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

fails in an info test:

 File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/tests/blackbox/test_info.py", line 1210, in assertCheckoutStatusOutput
   ), out)
AssertionError: texts not equal:
 Lightweight checkout (format: 2a)
 Location:
   light checkout root: tree/lightcheckout
         checkout root: tree/checkout
- checkout of branch: repo/branch
+ checkout of branch: ../../repo/branch/
? ++++++ +

 Format:

Revision history for this message
Martin Pool (mbp) wrote :

Aaron raises a question in https://bugs.edge.launchpad.net/bzr/+bug/135234/comments/4 as to whether it's really ideal to store relative paths all the time.

We do as a general principle store relative paths when possible, partly because they're more likely to work when the same directories are addressed across different transports.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

I think the frequency of relative paths is increasing as more people use Neil's colo plugin and the various workspace models in Explorer. We could detect those cases pretty easily I suspect, e.g. we want relative paths in at least these cases:

1. If the branch path starts with the checkout path
2. If the checkout path starts with the repository path.

Unmerged revisions

5095. By Martin Pool

merge news

5094. By Martin Pool

Fix typo

5093. By Martin Pool

Cope with a trailing newline in a .bzr/branch/location file

5092. By Martin Pool

Update BranchReference tests to expect relative URLs

5091. By Martin Pool

Branch references (used for lightweight checkouts) also store a relative url.

5090. By Martin Pool

The master of a bound branch is now stored as a relative URL if possible.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.