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.

Comments (0)

Files changed (2)

                         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,

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
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.