1636 release(lock, wlock) |
1636 release(lock, wlock) |
1637 |
1637 |
1638 def _docommit(ui, repo, *pats, **opts): |
1638 def _docommit(ui, repo, *pats, **opts): |
1639 if opts.get('interactive'): |
1639 if opts.get('interactive'): |
1640 opts.pop('interactive') |
1640 opts.pop('interactive') |
1641 cmdutil.dorecord(ui, repo, commit, None, False, |
1641 ret = cmdutil.dorecord(ui, repo, commit, None, False, |
1642 cmdutil.recordfilter, *pats, **opts) |
1642 cmdutil.recordfilter, *pats, **opts) |
1643 return |
1643 # ret can be 0 (no changes to record) or the value returned by |
|
1644 # commit(), 1 if nothing changed or None on success. |
|
1645 return 1 if ret == 0 else ret |
1644 |
1646 |
1645 if opts.get('subrepos'): |
1647 if opts.get('subrepos'): |
1646 if opts.get('amend'): |
1648 if opts.get('amend'): |
1647 raise error.Abort(_('cannot amend with --subrepos')) |
1649 raise error.Abort(_('cannot amend with --subrepos')) |
1648 # Let --subrepos on the command line override config setting. |
1650 # Let --subrepos on the command line override config setting. |