Show More
@@ -346,6 +346,8 b' class transplanter(object):' | |||||
346 | message = [] |
|
346 | message = [] | |
347 | node = revlog.nullid |
|
347 | node = revlog.nullid | |
348 | inmsg = False |
|
348 | inmsg = False | |
|
349 | user = None | |||
|
350 | date = None | |||
349 | for line in fp.read().splitlines(): |
|
351 | for line in fp.read().splitlines(): | |
350 | if inmsg: |
|
352 | if inmsg: | |
351 | message.append(line) |
|
353 | message.append(line) | |
@@ -360,6 +362,8 b' class transplanter(object):' | |||||
360 | elif not line.startswith('# '): |
|
362 | elif not line.startswith('# '): | |
361 | inmsg = True |
|
363 | inmsg = True | |
362 | message.append(line) |
|
364 | message.append(line) | |
|
365 | if None in (user, date): | |||
|
366 | raise util.Abort(_("filter produced garbled log file")) | |||
363 | return (node, user, date, '\n'.join(message), parents) |
|
367 | return (node, user, date, '\n'.join(message), parents) | |
364 |
|
368 | |||
365 | def log(self, user, date, message, p1, p2, merge=False): |
|
369 | def log(self, user, date, message, p1, p2, merge=False): |
@@ -363,6 +363,19 b' test environment passed to filter' | |||||
363 | Transplant from rev 17ab29e464c6ca53e329470efe2a9918ac617a6f |
|
363 | Transplant from rev 17ab29e464c6ca53e329470efe2a9918ac617a6f | |
364 | $ cd .. |
|
364 | $ cd .. | |
365 |
|
365 | |||
|
366 | test transplant with filter handles invalid changelog | |||
|
367 | ||||
|
368 | $ hg init filter-invalid-log | |||
|
369 | $ cd filter-invalid-log | |||
|
370 | $ cat <<'EOF' >test-filter-invalid-log | |||
|
371 | > #!/bin/sh | |||
|
372 | > echo "" > $1 | |||
|
373 | > EOF | |||
|
374 | $ chmod +x test-filter-invalid-log | |||
|
375 | $ hg transplant -s ../t --filter ./test-filter-invalid-log 0 | |||
|
376 | filtering * (glob) | |||
|
377 | abort: filter failed | |||
|
378 | [255] | |||
366 |
|
379 | |||
367 | test with a win32ext like setup (differing EOLs) |
|
380 | test with a win32ext like setup (differing EOLs) | |
368 |
|
381 |
General Comments 0
You need to be logged in to leave comments.
Login now