Mercurial > hg > mercurial-crew-with-dirclash
changeset 3159:e43fd1623fe1
fix users of dirstate.copies broken by b1f10d3223c1
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 26 Sep 2006 13:58:58 +0200 |
parents | ca00ce41a2e8 |
children | 36ab673f66a5 1839e6e91c3a |
files | mercurial/commands.py mercurial/patch.py |
diffstat | 2 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1162,8 +1162,8 @@ def debugstate(ui, repo): % (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 @@ def status(ui, repo, *pats, **opts): 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