diff hgext/mq.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 ba58c5a61503
children d13913355390
line wrap: on
line diff
--- a/hgext/mq.py	Mon Apr 04 16:21:57 2011 -0500
+++ b/hgext/mq.py	Mon Apr 04 16:21:59 2011 -0500
@@ -899,7 +899,7 @@
                 else:
                     p.write("# HG changeset patch\n")
                     p.write("# Parent "
-                            + hex(repo[None].parents()[0].node()) + "\n")
+                            + hex(repo[None].p1().node()) + "\n")
                     if user:
                         p.write("# User " + user + "\n")
                     if date:
@@ -1054,7 +1054,7 @@
                 heads += ls
             if not heads:
                 heads = [nullid]
-            if repo.dirstate.parents()[0] not in heads and not exact:
+            if repo.dirstate.p1() not in heads and not exact:
                 self.ui.status(_("(working directory not at a head)\n"))
 
             if not self.series:
@@ -1148,7 +1148,7 @@
                     ret = self.apply(repo, s, list, all_files=all_files)
             except:
                 self.ui.warn(_('cleaning up working directory...'))
-                node = repo.dirstate.parents()[0]
+                node = repo.dirstate.p1()
                 hg.revert(repo, node, None)
                 # only remove unknown files that we know we touched or
                 # created while patching