comparison mercurial/localrepo.py @ 4530:0ac7fee4f024

Make sure the changelog mentions files whose flags changed These changes don't actually need a new filelog entry (see next patch), but if we don't mention the files in the changelog, it becomes much harder to find all changesets that touch a file (not even a "hg log --removed file" will work).
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 09 Jun 2007 01:04:28 -0300
parents 78b6add1f966
children b51a8138292a
comparison
equal deleted inserted replaced
4529:860478527568 4530:0ac7fee4f024
782 is_link = util.linkfunc(self.root, m1.linkf) 782 is_link = util.linkfunc(self.root, m1.linkf)
783 for f in commit: 783 for f in commit:
784 self.ui.note(f + "\n") 784 self.ui.note(f + "\n")
785 try: 785 try:
786 new[f] = self.filecommit(f, m1, m2, linkrev, tr, changed) 786 new[f] = self.filecommit(f, m1, m2, linkrev, tr, changed)
787 m1.set(f, is_exec(f), is_link(f)) 787 new_exec = is_exec(f)
788 new_link = is_link(f)
789 if not changed or changed[-1] != f:
790 # mention the file in the changelog if some flag changed,
791 # even if there was no content change.
792 old_exec = m1.execf(f)
793 old_link = m1.linkf(f)
794 if old_exec != new_exec or old_link != new_link:
795 changed.append(f)
796 m1.set(f, new_exec, new_link)
788 except (OSError, IOError): 797 except (OSError, IOError):
789 if use_dirstate: 798 if use_dirstate:
790 self.ui.warn(_("trouble committing %s!\n") % f) 799 self.ui.warn(_("trouble committing %s!\n") % f)
791 raise 800 raise
792 else: 801 else: