mercurial/localrepo.py
changeset 4002 d7b9ec589546
parent 3996 c190df14338c
child 4003 616806f74f0f
equal deleted inserted replaced
4001:dda03b2d9ef1 4002:d7b9ec589546
   711         # check in files
   711         # check in files
   712         new = {}
   712         new = {}
   713         linkrev = self.changelog.count()
   713         linkrev = self.changelog.count()
   714         commit.sort()
   714         commit.sort()
   715         is_exec = util.execfunc(self.root, m1.execf)
   715         is_exec = util.execfunc(self.root, m1.execf)
       
   716         is_link = util.linkfunc(self.root, m1.linkf)
   716         for f in commit:
   717         for f in commit:
   717             self.ui.note(f + "\n")
   718             self.ui.note(f + "\n")
   718             try:
   719             try:
   719                 new[f] = self.filecommit(f, m1, m2, linkrev, tr, changed)
   720                 new[f] = self.filecommit(f, m1, m2, linkrev, tr, changed)
   720                 m1.set(f, is_exec(f))
   721                 m1.set(f, is_exec(f), is_link(f))
   721             except IOError:
   722             except IOError:
   722                 if use_dirstate:
   723                 if use_dirstate:
   723                     self.ui.warn(_("trouble committing %s!\n") % f)
   724                     self.ui.warn(_("trouble committing %s!\n") % f)
   724                     raise
   725                     raise
   725                 else:
   726                 else:
   877                 # we are comparing working dir against non-parent
   878                 # we are comparing working dir against non-parent
   878                 # generate a pseudo-manifest for the working dir
   879                 # generate a pseudo-manifest for the working dir
   879                 # XXX: create it in dirstate.py ?
   880                 # XXX: create it in dirstate.py ?
   880                 mf2 = mfmatches(self.dirstate.parents()[0])
   881                 mf2 = mfmatches(self.dirstate.parents()[0])
   881                 is_exec = util.execfunc(self.root, mf2.execf)
   882                 is_exec = util.execfunc(self.root, mf2.execf)
       
   883                 is_link = util.linkfunc(self.root, mf2.linkf)
   882                 for f in lookup + modified + added:
   884                 for f in lookup + modified + added:
   883                     mf2[f] = ""
   885                     mf2[f] = ""
   884                     mf2.set(f, is_exec(f))
   886                     mf2.set(f, is_exec(f), is_link(f))
   885                 for f in removed:
   887                 for f in removed:
   886                     if f in mf2:
   888                     if f in mf2:
   887                         del mf2[f]
   889                         del mf2[f]
   888         else:
   890         else:
   889             # we are comparing two revisions
   891             # we are comparing two revisions