Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 13357:b67867940bd1
bookmarks: move commit action into core
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 10 Feb 2011 13:46:27 -0600 |
parents | d96db730fcb2 |
children | f26a51857dc7 |
comparison
equal
deleted
inserted
replaced
13356:d96db730fcb2 | 13357:b67867940bd1 |
---|---|
985 msgfn = self.pathto(msgfile.name[len(self.root)+1:]) | 985 msgfn = self.pathto(msgfile.name[len(self.root)+1:]) |
986 self.ui.write( | 986 self.ui.write( |
987 _('note: commit message saved in %s\n') % msgfn) | 987 _('note: commit message saved in %s\n') % msgfn) |
988 raise | 988 raise |
989 | 989 |
990 # update dirstate and mergestate | 990 # update bookmarks, dirstate and mergestate |
991 parents = (p1, p2) | |
992 if p2 == nullid: | |
993 parents = (p1,) | |
994 bookmarks.update(self, parents, ret) | |
991 for f in changes[0] + changes[1]: | 995 for f in changes[0] + changes[1]: |
992 self.dirstate.normal(f) | 996 self.dirstate.normal(f) |
993 for f in changes[2]: | 997 for f in changes[2]: |
994 self.dirstate.forget(f) | 998 self.dirstate.forget(f) |
995 self.dirstate.setparents(ret) | 999 self.dirstate.setparents(ret) |