98
98
strip_help="""Strip the smallest prefix containing num leading slashes from \
99
99
each file name found in the patch file."""
100
100
Option.OPTIONS['strip'] = Option('strip', type=int, help=strip_help)
101
103
class cmd_patch(bzrlib.commands.Command):
102
104
"""Apply a named patch to the current tree.
104
106
takes_args = ['filename?']
108
def run(self, filename=None, strip=-1, bzrdiff=0):
108
110
from bzrlib.branch import Branch
109
111
b = Branch.open_containing('.')[0]
116
return patch(b, filename, strip, legacy= not bzrdiff)
113
119
class cmd_shelve(bzrlib.commands.Command):