~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2006-03-18 23:29:32 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20060318232932-4981a8efa6e028c9
Fixed patch on checkouts

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
    takes_options = ['strip','bzrdiff']
117
117
    def run(self, filename=None, strip=-1, bzrdiff=0):
118
118
        from patch import patch
119
 
        from bzrlib.branch import Branch
120
 
        b = Branch.open_containing('.')[0]
 
119
        from bzrlib.workingtree import WorkingTree
 
120
        wt = WorkingTree.open_containing('.')[0]
121
121
        if strip == -1:
122
122
            if bzrdiff: strip = 0
123
123
            else:       strip = 1
124
124
 
125
 
        return patch(b, filename, strip, legacy= not bzrdiff)
 
125
        return patch(wt, filename, strip, legacy= not bzrdiff)
126
126
 
127
127
class cmd_shelve(bzrlib.commands.Command):
128
128
    """Temporarily set aside some changes from the current tree.