mercurial/dirstate.py
changeset 3154 b1f10d3223c1
parent 2962 882e703eaa94
child 3223 53e843840349
--- a/mercurial/dirstate.py	Mon Sep 25 16:45:31 2006 -0500
+++ b/mercurial/dirstate.py	Mon Sep 25 17:53:17 2006 -0500
@@ -23,7 +23,7 @@
         self.map = None
         self.pl = None
         self.dirs = None
-        self.copies = {}
+        self.copymap = {}
         self.ignorefunc = None
         self.blockignore = False
 
@@ -160,7 +160,7 @@
 
         # deref fields so they will be local in loop
         map = self.map
-        copies = self.copies
+        copymap = self.copymap
         format = self.format
         unpack = struct.unpack
 
@@ -176,7 +176,7 @@
             f = st[pos:newpos]
             if '\0' in f:
                 f, c = f.split('\0')
-                copies[f] = c
+                copymap[f] = c
             map[f] = e[:4]
             pos = newpos
 
@@ -193,10 +193,13 @@
     def copy(self, source, dest):
         self.lazyread()
         self.markdirty()
-        self.copies[dest] = source
+        self.copymap[dest] = source
 
     def copied(self, file):
-        return self.copies.get(file, None)
+        return self.copymap.get(file, None)
+
+    def copies(self):
+        return self.copymap
 
     def initdirs(self):
         if self.dirs is None:
@@ -254,8 +257,8 @@
                 st_size = kw.get('st_size', s.st_size)
                 st_mtime = kw.get('st_mtime', s.st_mtime)
                 self.map[f] = (state, s.st_mode, st_size, st_mtime)
-            if self.copies.has_key(f):
-                del self.copies[f]
+            if self.copymap.has_key(f):
+                del self.copymap[f]
 
     def forget(self, files):
         if not files: return
@@ -272,7 +275,7 @@
 
     def clear(self):
         self.map = {}
-        self.copies = {}
+        self.copymap = {}
         self.dirs = None
         self.markdirty()