equal
deleted
inserted
replaced
1967 # This not what we expect from amend. |
1967 # This not what we expect from amend. |
1968 return old.node() |
1968 return old.node() |
1969 |
1969 |
1970 ph = repo.ui.config('phases', 'new-commit', phases.draft) |
1970 ph = repo.ui.config('phases', 'new-commit', phases.draft) |
1971 try: |
1971 try: |
1972 repo.ui.setconfig('phases', 'new-commit', old.phase()) |
1972 if opts.get('secret'): |
|
1973 commitphase = 'secret' |
|
1974 else: |
|
1975 commitphase = old.phase() |
|
1976 repo.ui.setconfig('phases', 'new-commit', commitphase) |
1973 newid = repo.commitctx(new) |
1977 newid = repo.commitctx(new) |
1974 finally: |
1978 finally: |
1975 repo.ui.setconfig('phases', 'new-commit', ph) |
1979 repo.ui.setconfig('phases', 'new-commit', ph) |
1976 if newid != old.node(): |
1980 if newid != old.node(): |
1977 # Reroute the working copy parent to the new changeset |
1981 # Reroute the working copy parent to the new changeset |