mercurial/localrepo.py
changeset 45193 e64c35dfc6cb
parent 45192 509f5b6c0b7e
child 45194 6979a20ff004
equal deleted inserted replaced
45192:509f5b6c0b7e 45193:e64c35dfc6cb
  3118                 m1 = m1ctx.read()
  3118                 m1 = m1ctx.read()
  3119                 m2 = m2ctx.read()
  3119                 m2 = m2ctx.read()
  3120 
  3120 
  3121                 # check in files
  3121                 # check in files
  3122                 added = []
  3122                 added = []
       
  3123                 filesadded = []
  3123                 changed = []
  3124                 changed = []
  3124                 removed = list(ctx.removed())
  3125                 removed = list(ctx.removed())
  3125                 linkrev = len(self)
  3126                 linkrev = len(self)
  3126                 self.ui.note(_(b"committing files:\n"))
  3127                 self.ui.note(_(b"committing files:\n"))
  3127                 uipathfn = scmutil.getuipathfn(self)
  3128                 uipathfn = scmutil.getuipathfn(self)
  3136                             m[f], is_touched = self._filecommit(
  3137                             m[f], is_touched = self._filecommit(
  3137                                 fctx, m1, m2, linkrev, trp, writefilecopymeta,
  3138                                 fctx, m1, m2, linkrev, trp, writefilecopymeta,
  3138                             )
  3139                             )
  3139                             if is_touched:
  3140                             if is_touched:
  3140                                 changed.append(f)
  3141                                 changed.append(f)
       
  3142                                 if writechangesetcopy and is_touched == 'added':
       
  3143                                     filesadded.append(f)
  3141                             m.setflag(f, fctx.flags())
  3144                             m.setflag(f, fctx.flags())
  3142                     except OSError:
  3145                     except OSError:
  3143                         self.ui.warn(
  3146                         self.ui.warn(
  3144                             _(b"trouble committing %s!\n") % uipathfn(f)
  3147                             _(b"trouble committing %s!\n") % uipathfn(f)
  3145                         )
  3148                         )
  3191                         drop,
  3194                         drop,
  3192                         match=self.narrowmatch(),
  3195                         match=self.narrowmatch(),
  3193                     )
  3196                     )
  3194 
  3197 
  3195                     if writechangesetcopy:
  3198                     if writechangesetcopy:
  3196                         filesadded = [
       
  3197                             f for f in changed if not (f in m1 or f in m2)
       
  3198                         ]
       
  3199                         filesremoved = removed
  3199                         filesremoved = removed
  3200                 else:
  3200                 else:
  3201                     self.ui.debug(
  3201                     self.ui.debug(
  3202                         b'reusing manifest from p1 (listed files '
  3202                         b'reusing manifest from p1 (listed files '
  3203                         b'actually unchanged)\n'
  3203                         b'actually unchanged)\n'