Patchwork [1,of,2,V2] lazymanifest: fix pure hg iterkeys()

login
register
mail settings
Submitter Martin von Zweigbergk
Date March 13, 2015, 4:03 a.m.
Message ID <d38410efbb182767cc61.1426219432@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/8046/
State Accepted
Commit 0178f500d61efce945fe3d287658a59d381b26b6
Headers show

Comments

Martin von Zweigbergk - March 13, 2015, 4:03 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1426211624 25200
#      Thu Mar 12 18:53:44 2015 -0700
# Node ID d38410efbb182767cc61abb8f3a5bcee6f671b39
# Parent  2b7ab29627fd93ca7f5cb838403c2f6c728469bd
lazymanifest: fix pure hg iterkeys()

I broke pure hg when I just added iterkeys() to the native version in
2b7ab29627fd. I forgot to make the pure version sorted. Fix it.

Patch

diff -r 2b7ab29627fd -r d38410efbb18 mercurial/manifest.py
--- a/mercurial/manifest.py	Wed Mar 11 13:46:15 2015 -0700
+++ b/mercurial/manifest.py	Thu Mar 12 18:53:44 2015 -0700
@@ -46,6 +46,9 @@ 
     def __iter__(self):
         return ((f, e[0], e[1]) for f, e in sorted(self.iteritems()))
 
+    def iterkeys(self):
+        return iter(sorted(dict.keys(self)))
+
     def copy(self):
         c = _lazymanifest('')
         c.update(self)