repopick: skip abandoned commits

Change-Id: I7f203fc4f790bf26acce1112c5c24c703acd9326
diff --git a/tools/repopick.py b/tools/repopick.py
index 022cfce..f369f2b 100755
--- a/tools/repopick.py
+++ b/tools/repopick.py
@@ -139,7 +139,7 @@
     parser.add_argument('-b', '--auto-branch', action='store_true', help='shortcut to "--start-branch auto --abandon-first --ignore-missing"')
     parser.add_argument('-q', '--quiet', action='store_true', help='print as little as possible')
     parser.add_argument('-v', '--verbose', action='store_true', help='print extra information to aid in debug')
-    parser.add_argument('-f', '--force', action='store_true', help='force cherry pick even if commit has been merged')
+    parser.add_argument('-f', '--force', action='store_true', help='force cherry pick even if change is closed')
     parser.add_argument('-p', '--pull', action='store_true', help='execute pull instead of cherry-pick')
     parser.add_argument('-t', '--topic', help='pick all commits from a specified topic')
     parser.add_argument('-Q', '--query', help='pick all commits using the specified query')
@@ -247,12 +247,12 @@
 
     for item in mergables:
         print('Applying change number {0}...'.format(item['id']))
-        # Check if commit has already been merged and exit if it has, unless -f is specified
-        if item['status'] == 'MERGED':
+        # Check if change is open and exit if it's not, unless -f is specified
+        if item['status'] != 'OPEN' and not args.query:
             if args.force:
-                print('!! Force-picking a merged commit !!\n')
+                print('!! Force-picking a closed change !!\n')
             else:
-                print('Commit already merged. Skipping the cherry pick.\nUse -f to force this pick.')
+                print('Change is closed. Skipping the cherry pick.\nUse -f to force this pick.')
                 continue
 
         # Convert the project name to a project path