hgext/histedit.py
changeset 29877 1c19d3efe15d
parent 29876 034d38b5f6fb
child 29878 d7de02efa47e
equal deleted inserted replaced
29876:034d38b5f6fb 29877:1c19d3efe15d
  1377     seen = set()
  1377     seen = set()
  1378     prev = None
  1378     prev = None
  1379     for action in actions:
  1379     for action in actions:
  1380         action.verify(prev)
  1380         action.verify(prev)
  1381         prev = action
  1381         prev = action
  1382         constraints = action.constraints
  1382         constrs = action.constraints
  1383         for constraint in constraints:
  1383         for constraint in constrs:
  1384             if constraint not in _constraints.known():
  1384             if constraint not in _constraints.known():
  1385                 raise error.ParseError(_('unknown constraint "%s"') %
  1385                 raise error.ParseError(_('unknown constraint "%s"') %
  1386                         constraint)
  1386                         constraint)
  1387 
  1387 
  1388         if action.node is not None:
  1388         if action.node is not None:
  1389             ha = node.hex(action.node)
  1389             ha = node.hex(action.node)
  1390             if _constraints.noother in constraints and ha not in expected:
  1390             if _constraints.noother in constrs and ha not in expected:
  1391                 raise error.ParseError(
  1391                 raise error.ParseError(
  1392                     _('%s "%s" changeset was not a candidate')
  1392                     _('%s "%s" changeset was not a candidate')
  1393                      % (action.verb, ha[:12]),
  1393                      % (action.verb, ha[:12]),
  1394                     hint=_('only use listed changesets'))
  1394                     hint=_('only use listed changesets'))
  1395             if _constraints.forceother in constraints and ha in expected:
  1395             if _constraints.forceother in constrs and ha in expected:
  1396                 raise error.ParseError(
  1396                 raise error.ParseError(
  1397                     _('%s "%s" changeset was not an edited list candidate')
  1397                     _('%s "%s" changeset was not an edited list candidate')
  1398                      % (action.verb, ha[:12]),
  1398                      % (action.verb, ha[:12]),
  1399                     hint=_('only use listed changesets'))
  1399                     hint=_('only use listed changesets'))
  1400             if _constraints.noduplicates in constraints and ha in seen:
  1400             if _constraints.noduplicates in constrs and ha in seen:
  1401                 raise error.ParseError(_(
  1401                 raise error.ParseError(_(
  1402                         'duplicated command for changeset %s') %
  1402                         'duplicated command for changeset %s') %
  1403                         ha[:12])
  1403                         ha[:12])
  1404             seen.add(ha)
  1404             seen.add(ha)
  1405     missing = sorted(expected - seen)  # sort to stabilize output
  1405     missing = sorted(expected - seen)  # sort to stabilize output