diff mercurial/cmdutil.py @ 13878:a8d13ee0ce68

misc: replace .parents()[0] with p1()
author Matt Mackall <mpm@selenic.com>
date Mon, 04 Apr 2011 16:21:59 -0500
parents 8796fb6af67e
children 03f3ce7ca2a8
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Mon Apr 04 16:21:57 2011 -0500
+++ b/mercurial/cmdutil.py	Mon Apr 04 16:21:59 2011 -0500
@@ -72,7 +72,7 @@
     return p
 
 def bail_if_changed(repo):
-    if repo.dirstate.parents()[1] != nullid:
+    if repo.dirstate.p2() != nullid:
         raise util.Abort(_('outstanding uncommitted merge'))
     modified, added, removed, deleted = repo.status()[:4]
     if modified or added or removed or deleted:
@@ -122,12 +122,12 @@
 
 def revpair(repo, revs):
     if not revs:
-        return repo.dirstate.parents()[0], None
+        return repo.dirstate.p1(), None
 
     l = revrange(repo, revs)
 
     if len(l) == 0:
-        return repo.dirstate.parents()[0], None
+        return repo.dirstate.p1(), None
 
     if len(l) == 1:
         return repo.lookup(l[0]), None