mercurial/localrepo.py
changeset 6740 b148e9099133
parent 6739 c9fbd6ec3489
child 6742 2d54e7c1e69d
--- a/mercurial/localrepo.py	Wed Jun 25 17:35:20 2008 -0500
+++ b/mercurial/localrepo.py	Thu Jun 26 13:46:29 2008 -0500
@@ -485,12 +485,9 @@
 
     def changectx(self, changeid):
         if changeid == None:
-            raise "nope!"
+            return context.workingctx(self)
         return context.changectx(self, changeid)
 
-    def workingctx(self):
-        return context.workingctx(self)
-
     def parents(self, changeid=None):
         '''
         get list of changectxs for parents of changeid or working directory
@@ -1202,7 +1199,7 @@
         return [n for (r, n) in heads]
 
     def branchheads(self, branch=None, start=None):
-        branch = branch is None and self.workingctx().branch() or branch
+        branch = branch is None and self.changectx(None).branch() or branch
         branches = self.branchtags()
         if branch not in branches:
             return []