# HG changeset patch # User David Douard # Date 1337811880 -7200 # Node ID bd0917068cc7df3d5fd63a99e02841e5da31a4c9 # Parent 3538b06ae2d21f056df7f82a7c9d453f9e260ea3 qsync: fix mq commit message generation A CR was missing when both applied and ready to review patches are generated during a single qsync. diff -r 3538b06ae2d2 -r bd0917068cc7 hgext/qsync.py --- a/hgext/qsync.py Tue May 22 10:35:04 2012 +0200 +++ b/hgext/qsync.py Thu May 24 00:24:40 2012 +0200 @@ -107,8 +107,10 @@ 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, diff -r 3538b06ae2d2 -r bd0917068cc7 tests/test-qsync.t --- a/tests/test-qsync.t Tue May 22 10:35:04 2012 +0200 +++ b/tests/test-qsync.t Thu May 24 00:24:40 2012 +0200 @@ -210,3 +210,31 @@ $ 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 +