##// END OF EJS Templates
debugstate: print symlinks as 'lnk', not '777'
Bryan O'Sullivan -
r5156:49554ba9 default
parent child Browse files
Show More
@@ -759,20 +759,21 b' def debugsetparents(ui, repo, rev1, rev2'
759
759
760 def debugstate(ui, repo):
760 def debugstate(ui, repo):
761 """show the contents of the current dirstate"""
761 """show the contents of the current dirstate"""
762 dc = repo.dirstate._map
762 k = repo.dirstate._map.items()
763 k = dc.keys()
764 k.sort()
763 k.sort()
765 for file_ in k:
764 for file_, ent in k:
766 if dc[file_][3] == -1:
765 if ent[3] == -1:
767 # Pad or slice to locale representation
766 # Pad or slice to locale representation
768 locale_len = len(time.strftime("%x %X", time.localtime(0)))
767 locale_len = len(time.strftime("%x %X", time.localtime(0)))
769 timestr = 'unset'
768 timestr = 'unset'
770 timestr = timestr[:locale_len] + ' '*(locale_len - len(timestr))
769 timestr = timestr[:locale_len] + ' '*(locale_len - len(timestr))
771 else:
770 else:
772 timestr = time.strftime("%x %X", time.localtime(dc[file_][3]))
771 timestr = time.strftime("%x %X", time.localtime(ent[3]))
773 ui.write("%c %3o %10d %s %s\n"
772 if ent[1] & 020000:
774 % (dc[file_][0], dc[file_][1] & 0777, dc[file_][2],
773 mode = 'lnk'
775 timestr, file_))
774 else:
775 mode = '%3o' % (ent[1] & 0777)
776 ui.write("%c %s %10d %s %s\n" % (ent[0], mode, ent[2], timestr, file_))
776 for f in repo.dirstate.copies():
777 for f in repo.dirstate.copies():
777 ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f))
778 ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f))
778
779
General Comments 0
You need to be logged in to leave comments. Login now