mercurial/cmdutil.py
changeset 17922 7f5dab94e48c
parent 17891 8f85151ce201
child 17932 c8ffde272653
equal deleted inserted replaced
17921:4ac9cf3d810c 17922:7f5dab94e48c
     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, phases, obsolete
    13 import subrepo, context, repair, graphmod, revset, phases, obsolete
    14 import changelog
    14 import changelog
    15 import lock as lockmod
    15 import lock as lockmod
    16 
    16 
    17 def parsealiases(cmd):
    17 def parsealiases(cmd):
    18     return cmd.lstrip("^").split("|")
    18     return cmd.lstrip("^").split("|")
  1754                 repo.setparents(newid, nullid)
  1754                 repo.setparents(newid, nullid)
  1755 
  1755 
  1756                 # Move bookmarks from old parent to amend commit
  1756                 # Move bookmarks from old parent to amend commit
  1757                 bms = repo.nodebookmarks(old.node())
  1757                 bms = repo.nodebookmarks(old.node())
  1758                 if bms:
  1758                 if bms:
       
  1759                     marks = repo._bookmarks
  1759                     for bm in bms:
  1760                     for bm in bms:
  1760                         repo._bookmarks[bm] = newid
  1761                         marks[bm] = newid
  1761                     bookmarks.write(repo)
  1762                     marks.write()
  1762             #commit the whole amend process
  1763             #commit the whole amend process
  1763             if obsolete._enabled and newid != old.node():
  1764             if obsolete._enabled and newid != old.node():
  1764                 # mark the new changeset as successor of the rewritten one
  1765                 # mark the new changeset as successor of the rewritten one
  1765                 new = repo[newid]
  1766                 new = repo[newid]
  1766                 obs = [(old, (new,))]
  1767                 obs = [(old, (new,))]