mercurial/cmdutil.py
changeset 22210 537f55a27101
parent 22209 06fbd9518bc5
child 22211 76fa261b5fe3
equal deleted inserted replaced
22209:06fbd9518bc5 22210:537f55a27101
  2459         def removeforget(abs):
  2459         def removeforget(abs):
  2460             if repo.dirstate[abs] == 'a':
  2460             if repo.dirstate[abs] == 'a':
  2461                 return _('forgetting %s\n')
  2461                 return _('forgetting %s\n')
  2462             return _('removing %s\n')
  2462             return _('removing %s\n')
  2463 
  2463 
  2464         missingmodified = dsmodified - smf
       
  2465         dsmodified -= missingmodified
       
  2466 
       
  2467         # action to be actually performed by revert
  2464         # action to be actually performed by revert
  2468         # (<list of file>, message>) tuple
  2465         # (<list of file>, message>) tuple
  2469         actions = {'revert': ([], _('reverting %s\n')),
  2466         actions = {'revert': ([], _('reverting %s\n')),
  2470                    'add': ([], _('adding %s\n')),
  2467                    'add': ([], _('adding %s\n')),
  2471                    'remove': ([], removeforget),
  2468                    'remove': ([], removeforget),
  2476             #   file state
  2473             #   file state
  2477             #   action
  2474             #   action
  2478             #   make backup
  2475             #   make backup
  2479             (modified,         (actions['revert'],   False)),
  2476             (modified,         (actions['revert'],   False)),
  2480             (dsmodified,       (actions['revert'],   True)),
  2477             (dsmodified,       (actions['revert'],   True)),
  2481             (missingmodified,  (actions['remove'],   True)),
       
  2482             (dsadded,          (actions['remove'],   True)),
  2478             (dsadded,          (actions['remove'],   True)),
  2483             (removed,          (actions['add'],      True)),
  2479             (removed,          (actions['add'],      True)),
  2484             (dsremoved,        (actions['undelete'], True)),
  2480             (dsremoved,        (actions['undelete'], True)),
  2485             (clean,            (None,                False)),
  2481             (clean,            (None,                False)),
  2486             )
  2482             )