changeset 452:a1e91c24dab5

rawcommit: do lookup of parents at the appropriate layer -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 rawcommit: do lookup of parents at the appropriate layer manifest hash: fc4b2d4416d00da5db2f4659e42ecba2a96dba1e -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCu2UoywK+sNU5EO8RApdDAJ9Vph6qVyzL++YeXyFC8HKf9ZhkGgCeNc0Y j2AMu6aWmuLuy2XwztS8gms= =f8mQ -----END PGP SIGNATURE-----
author mpm@selenic.com
date Thu, 23 Jun 2005 17:43:04 -0800
parents c9d134165392
children 7a3a3952c431
files mercurial/commands.py mercurial/hg.py
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Jun 23 17:37:47 2005 -0800
+++ b/mercurial/commands.py	Thu Jun 23 17:43:04 2005 -0800
@@ -553,7 +553,9 @@
     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):
--- a/mercurial/hg.py	Thu Jun 23 17:37:47 2005 -0800
+++ b/mercurial/hg.py	Thu Jun 23 17:43:04 2005 -0800
@@ -478,8 +478,8 @@
 
     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])