comparison mercurial/cmdutil.py @ 20790:49f2d5644f04

config: set a 'source' in most cases where config don't come from file but code Some extensions set configuration settings that showed up in 'hg showconfig --debug' with 'none' as source. That was confusing. Instead, they will now tell which extension they come from. This change tries to be consistent and specify a source everywhere - also where it perhaps is less relevant.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 19 Mar 2014 02:45:14 +0100
parents efbf15979538
children 7731a2281cf0
comparison
equal deleted inserted replaced
20789:d19c9bdbbf35 20790:49f2d5644f04
1980 try: 1980 try:
1981 if opts.get('secret'): 1981 if opts.get('secret'):
1982 commitphase = 'secret' 1982 commitphase = 'secret'
1983 else: 1983 else:
1984 commitphase = old.phase() 1984 commitphase = old.phase()
1985 repo.ui.setconfig('phases', 'new-commit', commitphase) 1985 repo.ui.setconfig('phases', 'new-commit', commitphase, 'amend')
1986 newid = repo.commitctx(new) 1986 newid = repo.commitctx(new)
1987 finally: 1987 finally:
1988 repo.ui.setconfig('phases', 'new-commit', ph) 1988 repo.ui.setconfig('phases', 'new-commit', ph, 'amend')
1989 if newid != old.node(): 1989 if newid != old.node():
1990 # Reroute the working copy parent to the new changeset 1990 # Reroute the working copy parent to the new changeset
1991 repo.setparents(newid, nullid) 1991 repo.setparents(newid, nullid)
1992 1992
1993 # Move bookmarks from old parent to amend commit 1993 # Move bookmarks from old parent to amend commit