Merge lp:~bialix/bzr-colo/rename into lp:bzr-colo

Proposed by Alexander Belchenko
Status: Merged
Merged at revision: not available
Proposed branch: lp:~bialix/bzr-colo/rename
Merge into: lp:bzr-colo
Diff against target: 36 lines (+6/-6)
1 file modified
colocated.py (+6/-6)
To merge this branch: bzr merge lp:~bialix/bzr-colo/rename
Reviewer Review Type Date Requested Status
Neil Martinsen-Burrell Pending
Review via email: mp+22707@code.launchpad.net

Description of the change

I've renamed "dir" variable to more appropriate name, because it prevents me to debug one thing with pdb.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'colocated.py'
2--- colocated.py 2010-02-21 19:30:16 +0000
3+++ colocated.py 2010-04-02 16:10:33 +0000
4@@ -34,7 +34,7 @@
5
6 class NoColocatedWorkspace(errors.BzrCommandError):
7
8- _fmt = "No colocated workspace in %(dir)s"
9+ _fmt = "No colocated workspace in %(directory)s"
10
11
12 class NoCurrentBranch(errors.BzrCommandError):
13@@ -49,19 +49,19 @@
14 def __init__(self, location=u'.'):
15 """A colocated workspace that contains the given path or URL."""
16 try:
17- dir, extra_path = bzrdir.BzrDir.open_containing(location)
18+ a_bzrdir, extra_path = bzrdir.BzrDir.open_containing(location)
19 except errors.NotBranchError:
20- raise NoColocatedWorkspace(dir=location)
21- self.has_tree = dir.has_workingtree()
22+ raise NoColocatedWorkspace(directory=location)
23+ self.has_tree = a_bzrdir.has_workingtree()
24
25 if not self.has_tree:
26 self.base = urlutils.local_path_to_url(location)
27 else:
28- branch = dir.open_branch()
29+ branch = a_bzrdir.open_branch()
30 try:
31 self.base = branch.base[:branch.base.index(COLOCATED_LOCATION)]
32 except ValueError:
33- raise NoColocatedWorkspace(dir=location)
34+ raise NoColocatedWorkspace(directory=location)
35
36 self.repo_location = urlutils.join(self.base, COLOCATED_LOCATION)
37

Subscribers

People subscribed via source and target branches