f2f81ffb77c5 — Steve Fink 4 years ago
(untested) add phexport --first to use the message for the first patch and no others
1 files changed, 7 insertions(+), 3 deletions(-)

M __init__.py
M __init__.py +7 -3
@@ 1302,6 1302,8 @@ for opt in newbug_opts:
           b'Comment to add with updated commit', B'TEXT'),
          (b'', b'same', False,
           b'Reuse the comment, reviewers, etc. for all updated commits'),
+         (b'', b'first', False,
+          b'Use the comment for only the first commit'),
          (b'e', b'edit', False,
           b'Open a text editor to modify fields'),
          (b't', b'to', b'',

          
@@ 1804,12 1806,14 @@ def _bzexport_phabsend(ui, repo, opts, r
     revs = repo.anyrevs([rev.encode()], user=True)
     revs.sort()
 
-    if len(revs) > 1 and not opts['edit'] and not opts['same']:
-        raise error.Abort("Multiple revisions require --edit or --same flag")
+    if len(revs) > 1 and not opts['edit'] and not opts['same'] and not opts['first']:
+        raise error.Abort(
+            "Multiple revisions require --same, --first, or --edit")
 
     if opts['new']:
         values = edit_form(ui, repo, values, 'new_bug_template')
-        fill_values(values, ui, repo, api_server, finalize=True, patchdata=contents)
+        fill_values(values, ui, repo, api_server, finalize=True,
+                    patchdata=contents)
         bug = create_bug(ui, values, bzinfo, opts)
         values['BUGNUM'] = str(bug)