hgext/mq.py
changeset 3473 0e68608bd11d
parent 3465 2d35a8d2b32d
child 3492 fbf8320f25c8
equal deleted inserted replaced
3472:df7202f6887c 3473:0e68608bd11d
   591             h = []
   591             h = []
   592             stoprev = 0
   592             stoprev = 0
   593             if stop in chlog.nodemap:
   593             if stop in chlog.nodemap:
   594                 stoprev = chlog.rev(stop)
   594                 stoprev = chlog.rev(stop)
   595 
   595 
   596             for r in range(chlog.count() - 1, -1, -1):
   596             for r in xrange(chlog.count() - 1, -1, -1):
   597                 n = chlog.node(r)
   597                 n = chlog.node(r)
   598                 if n not in p:
   598                 if n not in p:
   599                     h.append(n)
   599                     h.append(n)
   600                 if n == stop:
   600                 if n == stop:
   601                     break
   601                     break
   953         msg = opts.get('msg', '').rstrip()
   953         msg = opts.get('msg', '').rstrip()
   954         if msg:
   954         if msg:
   955             if comments:
   955             if comments:
   956                 # Remove existing message.
   956                 # Remove existing message.
   957                 ci = 0
   957                 ci = 0
   958                 for mi in range(len(message)):
   958                 for mi in xrange(len(message)):
   959                     while message[mi] != comments[ci]:
   959                     while message[mi] != comments[ci]:
   960                         ci += 1
   960                         ci += 1
   961                     del comments[ci]
   961                     del comments[ci]
   962             comments.append(msg)
   962             comments.append(msg)
   963         if comments:
   963         if comments:
  1034                 repo.dirstate.copy(src, dst)
  1034                 repo.dirstate.copy(src, dst)
  1035             repo.dirstate.update(r, 'r')
  1035             repo.dirstate.update(r, 'r')
  1036             # if the patch excludes a modified file, mark that file with mtime=0
  1036             # if the patch excludes a modified file, mark that file with mtime=0
  1037             # so status can see it.
  1037             # so status can see it.
  1038             mm = []
  1038             mm = []
  1039             for i in range(len(m)-1, -1, -1):
  1039             for i in xrange(len(m)-1, -1, -1):
  1040                 if not matchfn(m[i]):
  1040                 if not matchfn(m[i]):
  1041                     mm.append(m[i])
  1041                     mm.append(m[i])
  1042                     del m[i]
  1042                     del m[i]
  1043             repo.dirstate.update(m, 'n')
  1043             repo.dirstate.update(m, 'n')
  1044             repo.dirstate.update(mm, 'n', st_mtime=0)
  1044             repo.dirstate.update(mm, 'n', st_mtime=0)
  1102 
  1102 
  1103         unapplied = self.series_end(all_patches=True)
  1103         unapplied = self.series_end(all_patches=True)
  1104         if not length:
  1104         if not length:
  1105             length = len(self.series) - start
  1105             length = len(self.series) - start
  1106         if not missing:
  1106         if not missing:
  1107             for i in range(start, start+length):
  1107             for i in xrange(start, start+length):
  1108                 pfx = ''
  1108                 pfx = ''
  1109                 patch = pname(i)
  1109                 patch = pname(i)
  1110                 if self.ui.verbose:
  1110                 if self.ui.verbose:
  1111                     if i < unapplied:
  1111                     if i < unapplied:
  1112                         status = 'A'
  1112                         status = 'A'