##// END OF EJS Templates
import: --no-commit should update .hg/last-message.txt...
Steve Borho -
r12913:0e0a52bd default
parent child Browse files
Show More
@@ -2279,6 +2279,7 b' def import_(ui, repo, patch1, *patches, '
2279 d = opts["base"]
2279 d = opts["base"]
2280 strip = opts["strip"]
2280 strip = opts["strip"]
2281 wlock = lock = None
2281 wlock = lock = None
2282 msgs = []
2282
2283
2283 def tryone(ui, hunk):
2284 def tryone(ui, hunk):
2284 tmpname, message, user, date, branch, nodeid, p1, p2 = \
2285 tmpname, message, user, date, branch, nodeid, p1, p2 = \
@@ -2329,7 +2330,10 b' def import_(ui, repo, patch1, *patches, '
2329 finally:
2330 finally:
2330 files = cmdutil.updatedir(ui, repo, files,
2331 files = cmdutil.updatedir(ui, repo, files,
2331 similarity=sim / 100.0)
2332 similarity=sim / 100.0)
2332 if not opts.get('no_commit'):
2333 if opts.get('no_commit'):
2334 if message:
2335 msgs.append(message)
2336 else:
2333 if opts.get('exact'):
2337 if opts.get('exact'):
2334 m = None
2338 m = None
2335 else:
2339 else:
@@ -2378,6 +2382,8 b' def import_(ui, repo, patch1, *patches, '
2378 if not haspatch:
2382 if not haspatch:
2379 raise util.Abort(_('no diffs found'))
2383 raise util.Abort(_('no diffs found'))
2380
2384
2385 if msgs:
2386 repo.opener('last-message.txt', 'wb').write('* * *\n'.join(msgs))
2381 finally:
2387 finally:
2382 release(lock, wlock)
2388 release(lock, wlock)
2383
2389
@@ -437,6 +437,14 b' Test fuzziness (ambiguous patch location'
437 $ hg revert -a
437 $ hg revert -a
438 reverting a
438 reverting a
439
439
440
441 import with --no-commit should have written .hg/last-message.txt
442
443 $ echo '\n' | cat .hg/last-message.txt -
444 change
445
446
447
440 test fuzziness with eol=auto
448 test fuzziness with eol=auto
441
449
442 $ hg --config patch.eol=auto import --no-commit -v tip.patch
450 $ hg --config patch.eol=auto import --no-commit -v tip.patch
General Comments 0
You need to be logged in to leave comments. Login now