comparison hgext/evolve.py @ 1636:13f830540a14

config: report evolve as origin for config
author timeless@gmail.com
date Fri, 08 Apr 2016 18:45:58 +0000
parents 91ba7e0daff6
children 078e6777ac15
comparison
equal deleted inserted replaced
1635:91ba7e0daff6 1636:13f830540a14
2153 if progresscb: progresscb() 2153 if progresscb: progresscb()
2154 emtpycommitallowed = repo.ui.backupconfig('ui', 'allowemptycommit') 2154 emtpycommitallowed = repo.ui.backupconfig('ui', 'allowemptycommit')
2155 tr = repo.currenttransaction() 2155 tr = repo.currenttransaction()
2156 assert tr is not None 2156 assert tr is not None
2157 try: 2157 try:
2158 repo.ui.setconfig('ui', 'allowemptycommit', True) 2158 repo.ui.setconfig('ui', 'allowemptycommit', True, 'evolve')
2159 repo.dirstate.beginparentchange() 2159 repo.dirstate.beginparentchange()
2160 repo.dirstate.setparents(divergent.node(), node.nullid) 2160 repo.dirstate.setparents(divergent.node(), node.nullid)
2161 repo.dirstate.endparentchange() 2161 repo.dirstate.endparentchange()
2162 oldlen = len(repo) 2162 oldlen = len(repo)
2163 amend(ui, repo, message='', logfile='') 2163 amend(ui, repo, message='', logfile='')
3860 extra['rebase_source'] = orig.hex() 3860 extra['rebase_source'] = orig.hex()
3861 3861
3862 backup = repo.ui.backupconfig('phases', 'new-commit') 3862 backup = repo.ui.backupconfig('phases', 'new-commit')
3863 try: 3863 try:
3864 targetphase = max(orig.phase(), phases.draft) 3864 targetphase = max(orig.phase(), phases.draft)
3865 repo.ui.setconfig('phases', 'new-commit', targetphase, 'rebase') 3865 repo.ui.setconfig('phases', 'new-commit', targetphase, 'evolve')
3866 # Commit might fail if unresolved files exist 3866 # Commit might fail if unresolved files exist
3867 nodenew = repo.commit(text=commitmsg, user=orig.user(), 3867 nodenew = repo.commit(text=commitmsg, user=orig.user(),
3868 date=orig.date(), extra=extra) 3868 date=orig.date(), extra=extra)
3869 finally: 3869 finally:
3870 repo.ui.restoreconfig(backup) 3870 repo.ui.restoreconfig(backup)