comparison mercurial/cmdutil.py @ 17468:8fea378242e3

Merge with stable
author Patrick Mezard <patrick@mezard.eu>
date Sun, 09 Sep 2012 12:35:06 +0200
parents a306837f8c87 bacde764fba0
children ad1561723dde
comparison
equal deleted inserted replaced
17467:448d0c452140 17468:8fea378242e3
8 from node import hex, nullid, nullrev, short 8 from node import hex, nullid, nullrev, short
9 from i18n import _ 9 from i18n import _
10 import os, sys, errno, re, tempfile 10 import os, sys, errno, re, tempfile
11 import util, scmutil, templater, patch, error, templatekw, revlog, copies 11 import util, scmutil, templater, patch, error, templatekw, revlog, copies
12 import match as matchmod 12 import match as matchmod
13 import subrepo, context, repair, bookmarks, graphmod, revset 13 import subrepo, context, repair, bookmarks, graphmod, revset, phases
14 14
15 def parsealiases(cmd): 15 def parsealiases(cmd):
16 return cmd.lstrip("^").split("|") 16 return cmd.lstrip("^").split("|")
17 17
18 def findpossible(cmd, table, strict=False): 18 def findpossible(cmd, table, strict=False):
1673 files=files, 1673 files=files,
1674 filectxfn=filectxfn, 1674 filectxfn=filectxfn,
1675 user=user, 1675 user=user,
1676 date=date, 1676 date=date,
1677 extra=extra) 1677 extra=extra)
1678 newid = repo.commitctx(new) 1678 ph = repo.ui.config('phases', 'new-commit', phases.draft)
1679 try:
1680 repo.ui.setconfig('phases', 'new-commit', old.phase())
1681 newid = repo.commitctx(new)
1682 finally:
1683 repo.ui.setconfig('phases', 'new-commit', ph)
1679 if newid != old.node(): 1684 if newid != old.node():
1680 # Reroute the working copy parent to the new changeset 1685 # Reroute the working copy parent to the new changeset
1681 repo.setparents(newid, nullid) 1686 repo.setparents(newid, nullid)
1682 1687
1683 # Move bookmarks from old parent to amend commit 1688 # Move bookmarks from old parent to amend commit