fix users of dirstate.copies broken by
b1f10d3223c1
--- a/mercurial/commands.py Mon Sep 25 22:26:54 2006 -0500
+++ b/mercurial/commands.py Tue Sep 26 13:58:58 2006 +0200
@@ -1162,8 +1162,8 @@
% (dc[file_][0], dc[file_][1] & 0777, dc[file_][2],
time.strftime("%x %X",
time.localtime(dc[file_][3])), file_))
- for f in repo.dirstate.copies:
- ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copies[f], f))
+ for f in repo.dirstate.copies():
+ ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f))
def debugdata(ui, file_, rev):
"""dump the contents of an data file revision"""
@@ -2472,8 +2472,10 @@
for f in changes:
ui.write(format % f)
if ((all or opts.get('copies')) and not opts.get('no_status')
- and opt == 'added' and repo.dirstate.copies.has_key(f)):
- ui.write(' %s%s' % (repo.dirstate.copies[f], end))
+ and opt == 'added'):
+ copied = repo.dirstate.copied(f)
+ if copied:
+ ui.write(' %s%s' % (copied, end))
def tag(ui, repo, name, rev_=None, **opts):
"""add a tag for the current tip or a given revision
--- a/mercurial/patch.py Mon Sep 25 22:26:54 2006 -0500
+++ b/mercurial/patch.py Tue Sep 26 13:58:58 2006 +0200
@@ -433,7 +433,7 @@
def read(f):
return repo.wread(f)
def renamed(f):
- src = repo.dirstate.copies.get(f)
+ src = repo.dirstate.copied(f)
parent = repo.dirstate.parents()[0]
if src:
f = src[0]