Show More
@@ -346,6 +346,8 b' class transplanter(object):' | |||
|
346 | 346 | message = [] |
|
347 | 347 | node = revlog.nullid |
|
348 | 348 | inmsg = False |
|
349 | user = None | |
|
350 | date = None | |
|
349 | 351 | for line in fp.read().splitlines(): |
|
350 | 352 | if inmsg: |
|
351 | 353 | message.append(line) |
@@ -360,6 +362,8 b' class transplanter(object):' | |||
|
360 | 362 | elif not line.startswith('# '): |
|
361 | 363 | inmsg = True |
|
362 | 364 | message.append(line) |
|
365 | if None in (user, date): | |
|
366 | raise util.Abort(_("filter produced garbled log file")) | |
|
363 | 367 | return (node, user, date, '\n'.join(message), parents) |
|
364 | 368 | |
|
365 | 369 | def log(self, user, date, message, p1, p2, merge=False): |
@@ -363,6 +363,19 b' test environment passed to filter' | |||
|
363 | 363 | Transplant from rev 17ab29e464c6ca53e329470efe2a9918ac617a6f |
|
364 | 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 | 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