diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -553,7 +553,9 @@ def rawcommit(ui, repo, *flist, **rc): files = relpath(repo, list(flist)) if rc['files']: files += open(rc['files']).read().splitlines() - + + rc['parent'] = map(repo.lookup, rc['parent']) + repo.rawcommit(files, text, rc['user'], rc['date'], *rc['parent']) def recover(ui, repo): diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -478,8 +478,8 @@ class localrepository: def rawcommit(self, files, text, user, date, p1=None, p2=None): orig_parent = self.dirstate.parents()[0] or nullid - p1 = (p1 and self.lookup(p1)) or self.dirstate.parents()[0] or nullid - p2 = (p2 and self.lookup(p2)) or self.dirstate.parents()[1] or nullid + p1 = p1 or self.dirstate.parents()[0] or nullid + p2 = p2 or self.dirstate.parents()[1] or nullid c1 = self.changelog.read(p1) c2 = self.changelog.read(p2) m1 = self.manifest.read(c1[0])