Commits

David Douard  committed bd09170

qsync: fix mq commit message generation

A CR was missing when both applied and ready to review patches are generated
during a single qsync.

  • Participants
  • Parent commits 3538b06
  • Branches default

Comments (0)

Files changed (2)

File hgext/qsync.py

                         assert False, "Should be exported"
 
     if review:
-        message += '\n'.join('* applied %s' % x for x in applied_list)
-        message += '\n'.join('* %s ready for review' % x for x in review_list)
+        if applied_list:
+            message += '\n'.join('* applied %s' % x for x in applied_list) + '\n'
+        if review_list:
+            message += '\n'.join('* %s ready for review' % x for x in review_list) + '\n'
     memctx = patch.makememctx(mqrepo, (parent.node(), nullid),
                               message,
                               None,

File tests/test-qsync.t

   $ hg qsync -a
   abort: Nothing changed
   [255]
+
+mixed sync
+
+  $ hg init local
+  $ cd local
+  $ hg qinit -c
+  $ mkcommit a
+  $ mkcommit b
+  $ hg qlog
+  1 - 7c3bad9141dc add b (draft)
+  0 - 1f0dee641bb7 add a (draft)
+  $ hg qsync -a
+  $ hg mqlog
+  1 - qsubmit commit
+  
+  * DEFAULT-add_a.diff ready for review
+  * DEFAULT-add_b.diff ready for review
+  0 - qsubmit init
+  $ hg phase -p 0
+  $ echo "b" >> b
+  $ hg amend
+  $ hg qsync -a
+  $ hg mqlog -l 1
+  2 - qsubmit commit
+  
+  * applied DEFAULT-add_a.diff
+  * DEFAULT-add_b.diff ready for review
+