Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 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 | e69a0cbe268e |
children | 5c93dd0ae413 |
comparison
equal
deleted
inserted
replaced
3158:ca00ce41a2e8 | 3159:e43fd1623fe1 |
---|---|
1160 for file_ in keys: | 1160 for file_ in keys: |
1161 ui.write("%c %3o %10d %s %s\n" | 1161 ui.write("%c %3o %10d %s %s\n" |
1162 % (dc[file_][0], dc[file_][1] & 0777, dc[file_][2], | 1162 % (dc[file_][0], dc[file_][1] & 0777, dc[file_][2], |
1163 time.strftime("%x %X", | 1163 time.strftime("%x %X", |
1164 time.localtime(dc[file_][3])), file_)) | 1164 time.localtime(dc[file_][3])), file_)) |
1165 for f in repo.dirstate.copies: | 1165 for f in repo.dirstate.copies(): |
1166 ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copies[f], f)) | 1166 ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f)) |
1167 | 1167 |
1168 def debugdata(ui, file_, rev): | 1168 def debugdata(ui, file_, rev): |
1169 """dump the contents of an data file revision""" | 1169 """dump the contents of an data file revision""" |
1170 r = revlog.revlog(util.opener(os.getcwd(), audit=False), | 1170 r = revlog.revlog(util.opener(os.getcwd(), audit=False), |
1171 file_[:-2] + ".i", file_, 0) | 1171 file_[:-2] + ".i", file_, 0) |
2470 format = "%s %%s%s" % (char, end) | 2470 format = "%s %%s%s" % (char, end) |
2471 | 2471 |
2472 for f in changes: | 2472 for f in changes: |
2473 ui.write(format % f) | 2473 ui.write(format % f) |
2474 if ((all or opts.get('copies')) and not opts.get('no_status') | 2474 if ((all or opts.get('copies')) and not opts.get('no_status') |
2475 and opt == 'added' and repo.dirstate.copies.has_key(f)): | 2475 and opt == 'added'): |
2476 ui.write(' %s%s' % (repo.dirstate.copies[f], end)) | 2476 copied = repo.dirstate.copied(f) |
2477 if copied: | |
2478 ui.write(' %s%s' % (copied, end)) | |
2477 | 2479 |
2478 def tag(ui, repo, name, rev_=None, **opts): | 2480 def tag(ui, repo, name, rev_=None, **opts): |
2479 """add a tag for the current tip or a given revision | 2481 """add a tag for the current tip or a given revision |
2480 | 2482 |
2481 Name a particular revision using <name>. | 2483 Name a particular revision using <name>. |