comparison mercurial/cmdutil.py @ 5550:db6633f11d59

cmdutil: make "files" list all files, add "file_mods" for modified files
author Patrick Mezard <pmezard@gmail.com>
date Sat, 24 Nov 2007 20:16:59 +0100
parents 5a124ce4602a
children 9981b6b19ecf
comparison
equal deleted inserted replaced
5545:5a124ce4602a 5550:db6633f11d59
576 def getfiles(): 576 def getfiles():
577 if not files: 577 if not files:
578 files[:] = self.repo.status( 578 files[:] = self.repo.status(
579 log.parents(changenode)[0], changenode)[:3] 579 log.parents(changenode)[0], changenode)[:3]
580 return files 580 return files
581 # XXX: "files" means "modified files" in debug, "all changed 581 def showfiles(**args):
582 # files" otherwise. This should be fixed and a "file_mods" be 582 return showlist('file', changes[3], **args)
583 # introduced instead. 583 def showmods(**args):
584 if self.ui.debugflag: 584 return showlist('file_mod', getfiles()[0], **args)
585 def showfiles(**args):
586 return showlist('file', getfiles()[0], **args)
587 else:
588 def showfiles(**args):
589 return showlist('file', changes[3], **args)
590 def showadds(**args): 585 def showadds(**args):
591 return showlist('file_add', getfiles()[1], **args) 586 return showlist('file_add', getfiles()[1], **args)
592 def showdels(**args): 587 def showdels(**args):
593 return showlist('file_del', getfiles()[2], **args) 588 return showlist('file_del', getfiles()[2], **args)
594 def showmanifest(**args): 589 def showmanifest(**args):
602 'branches': showbranches, 597 'branches': showbranches,
603 'date': changes[2], 598 'date': changes[2],
604 'desc': changes[4].strip(), 599 'desc': changes[4].strip(),
605 'file_adds': showadds, 600 'file_adds': showadds,
606 'file_dels': showdels, 601 'file_dels': showdels,
602 'file_mods': showmods,
607 'files': showfiles, 603 'files': showfiles,
608 'file_copies': showcopies, 604 'file_copies': showcopies,
609 'manifest': showmanifest, 605 'manifest': showmanifest,
610 'node': hex(changenode), 606 'node': hex(changenode),
611 'parents': showparents, 607 'parents': showparents,