Mercurial > hg
comparison hgext/record.py @ 25796:4eb8d8a44bf1
record: omit meaningless 'commit' suggestion at 'hg commit -i'
Before this patch, 'hg commit -i' under non-interactive mode suggests
'use commit instead', and it obviously meaningless.
This patch makes 'record.record'()' examine 'ui.interactive()' and
show suggestion by itself before calling 'commands.commit()'.
This allows 'commands.commit()' to specify 'None' for 'cmdsuggest'
argument of 'cmdutil.dorecord()' to omit meaningless 'commit'
suggestion at 'hg commit -i'.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 15 Jul 2015 04:45:58 +0900 |
parents | 29be0450b667 |
children | cc9fb45986d4 |
comparison
equal
deleted
inserted
replaced
25795:69145daacdfa | 25796:4eb8d8a44bf1 |
---|---|
50 q - quit, recording no changes | 50 q - quit, recording no changes |
51 | 51 |
52 ? - display help | 52 ? - display help |
53 | 53 |
54 This command is not available when committing a merge.''' | 54 This command is not available when committing a merge.''' |
55 | |
56 if not ui.interactive(): | |
57 raise util.Abort(_('running non-interactively, use %s instead') % | |
58 'commit') | |
55 | 59 |
56 opts["interactive"] = True | 60 opts["interactive"] = True |
57 backup = ui.backupconfig('experimental', 'crecord') | 61 backup = ui.backupconfig('experimental', 'crecord') |
58 try: | 62 try: |
59 ui.setconfig('experimental', 'crecord', False, 'record') | 63 ui.setconfig('experimental', 'crecord', False, 'record') |