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