987 # bids is a mapping from action method to list af actions |
987 # bids is a mapping from action method to list af actions |
988 # Consensus? |
988 # Consensus? |
989 if len(bids) == 1: # all bids are the same kind of method |
989 if len(bids) == 1: # all bids are the same kind of method |
990 m, l = bids.items()[0] |
990 m, l = bids.items()[0] |
991 if all(a == l[0] for a in l[1:]): # len(bids) is > 1 |
991 if all(a == l[0] for a in l[1:]): # len(bids) is > 1 |
992 repo.ui.note(" %s: consensus for %s\n" % (f, m)) |
992 repo.ui.note(_(" %s: consensus for %s\n") % (f, m)) |
993 actions[f] = l[0] |
993 actions[f] = l[0] |
994 continue |
994 continue |
995 # If keep is an option, just do it. |
995 # If keep is an option, just do it. |
996 if 'k' in bids: |
996 if 'k' in bids: |
997 repo.ui.note(" %s: picking 'keep' action\n" % f) |
997 repo.ui.note(_(" %s: picking 'keep' action\n") % f) |
998 actions[f] = bids['k'][0] |
998 actions[f] = bids['k'][0] |
999 continue |
999 continue |
1000 # If there are gets and they all agree [how could they not?], do it. |
1000 # If there are gets and they all agree [how could they not?], do it. |
1001 if 'g' in bids: |
1001 if 'g' in bids: |
1002 ga0 = bids['g'][0] |
1002 ga0 = bids['g'][0] |
1003 if all(a == ga0 for a in bids['g'][1:]): |
1003 if all(a == ga0 for a in bids['g'][1:]): |
1004 repo.ui.note(" %s: picking 'get' action\n" % f) |
1004 repo.ui.note(_(" %s: picking 'get' action\n") % f) |
1005 actions[f] = ga0 |
1005 actions[f] = ga0 |
1006 continue |
1006 continue |
1007 # TODO: Consider other simple actions such as mode changes |
1007 # TODO: Consider other simple actions such as mode changes |
1008 # Handle inefficient democrazy. |
1008 # Handle inefficient democrazy. |
1009 repo.ui.note(_(' %s: multiple bids for merge action:\n') % f) |
1009 repo.ui.note(_(' %s: multiple bids for merge action:\n') % f) |