Show More
@@ -440,13 +440,18 b' def patch(ui, repo, patch1, *patches, **' | |||||
440 | # make sure text isn't empty |
|
440 | # make sure text isn't empty | |
441 | if not text: text = "imported patch %s\n" % patch |
|
441 | if not text: text = "imported patch %s\n" % patch | |
442 |
|
442 | |||
443 |
f = os.popen(" |
|
443 | f = os.popen("patch -p%d < %s" % (strip, pf)) | |
444 | files = filter(None, map(lambda x: x.rstrip(), f.read().splitlines())) |
|
444 | files = [] | |
|
445 | for l in f.read().splitlines(): | |||
|
446 | l.rstrip('\r\n'); | |||
|
447 | if not quiet: | |||
|
448 | print l | |||
|
449 | if l[:14] == 'patching file ': | |||
|
450 | files.append(l[14:]) | |||
445 | f.close() |
|
451 | f.close() | |
446 |
|
452 | |||
447 | if files: |
|
453 | if len(files) > 0: | |
448 | if os.system("patch -p%d < %s %s" % (strip, pf, quiet)): |
|
454 | addremove(ui, repo, *files) | |
449 | raise "patch failed!" |
|
|||
450 | repo.commit(files, text) |
|
455 | repo.commit(files, text) | |
451 |
|
456 | |||
452 | def pull(ui, repo, source="default"): |
|
457 | def pull(ui, repo, source="default"): |
General Comments 0
You need to be logged in to leave comments.
Login now