~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: John Arbash Meinel
  • Date: 2005-10-20 02:53:09 UTC
  • mto: (1185.82.1 bzr-w-changeset)
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: john@arbash-meinel.com-20051020025309-4634e1c343914a89
Hiding OPTIONS since it has been removed. Updating for the new Branch.open_containing()

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
"""
8
8
 
9
9
import sys
10
 
from bzrlib.commands import Command, register_command, OPTIONS
 
10
from bzrlib.commands import Command, register_command
11
11
from bzrlib.branch import Branch
12
12
from bzrlib.revisionspec import RevisionSpec
13
13
 
99
99
            else:
100
100
                raise BzrCommandError('--revision can take at most 2 arguments')
101
101
 
102
 
            target_branch = Branch.open_containing('.')
 
102
            target_branch, relpath = Branch.open_containing('.')
103
103
            target_revno, target_rev_id = target_info.in_history(target_branch)
104
104
            base_branch = target_branch
105
105
            if base_info is not None:
114
114
            if target is None:
115
115
                target = './@'
116
116
            b_target_path, target_revno = parse_spec(target)
117
 
            target_branch = Branch.open_containing(b_target_path)
 
117
            target_branch, relpath = Branch.open_containing(b_target_path)
118
118
            if target_revno is None or target_revno == -1:
119
119
                if hasattr(target_branch, 'last_patch'):
120
120
                    target_rev_id = target_branch.last_patch()
132
132
                    base_rev_id = target_rev.parents[0].revision_id
133
133
            else:
134
134
                base_path, base_revno = parse_spec(base)
135
 
                base_branch = Branch.open_containing(base_path)
 
135
                base_branch, relpath = Branch.open_containing(base_path)
136
136
                if base_revno is None or base_revno == -1:
137
137
                    if hasattr(target_branch, 'last_patch'):
138
138
                        base_rev_id = target_branch.last_patch()
164
164
        from read_changeset import read_changeset
165
165
        #from bzrlib.xml import serializer_v4
166
166
 
167
 
        b = Branch.open_containing('.')
 
167
        b, relpath = Branch.open_containing('.')
168
168
 
169
169
        if filename is None or filename == '-':
170
170
            f = sys.stdin
189
189
    def run(self, filename=None, reverse=False, auto_commit=False):
190
190
        import apply_changeset
191
191
 
192
 
        b = Branch.open_containing('.') # Make sure we are in a branch
 
192
        b, relpath = Branch.open_containing('.') # Make sure we are in a branch
193
193
        if filename is None or filename == '-':
194
194
            f = sys.stdin
195
195
        else:
207
207
register_command(cmd_apply_changeset)
208
208
register_command(cmd_send_changeset)
209
209
 
210
 
OPTIONS['reverse'] = None
211
 
OPTIONS['auto-commit'] = None
 
210
#OPTIONS['reverse'] = None
 
211
#OPTIONS['auto-commit'] = None
212
212
 
213
213
def test_suite():
214
214
    from doctest import DocTestSuite