Mercurial > hg
changeset 3154:b1f10d3223c1
dirstate: add copies function
rename copies to copymap
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 25 Sep 2006 17:53:17 -0500 |
parents | c82ea81d6850 |
children | 56c59ba7aa76 |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 11 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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()