=== modified file 'pqm/__init__.py' --- pqm/__init__.py 2008-09-29 08:57:02 +0000 +++ pqm/__init__.py 2008-11-24 20:09:58 +0000 @@ -233,6 +233,9 @@ def make_local_dir(self, sender, branch, output_dir): raise PQMTlaFailure(sender, 'Unsupported operation') + def latest_revision_info(self, sender, branch): + raise PQMTlaFailure(sender, 'Unsupported operation') + class ArchHandler(VCSHandler): @@ -465,6 +468,11 @@ branch = Branch.open(branch_spec) branch.create_checkout(output_dir, lightweight=True) + def latest_revision_info(self, sender, branch_location): + from bzrlib.branch import Branch + branch = Branch.open(branch_location) + return branch.revno(), branch.repository.get_revision(branch.last_revision()).message + class BranchSpecOptionHandler: """Configuration mechanism for a branch specifications. === modified file 'pqm/script.py' --- pqm/script.py 2008-09-29 08:57:02 +0000 +++ pqm/script.py 2008-11-24 20:09:58 +0000 @@ -402,6 +402,20 @@ self.successful.append(line) self.output += self._success_output(merge_name, start_time) self.get_vcs().commit(sender, dir, self.commitmsg, to_repo_revision, config) + # Now that we've committed to the branch, let's include the + # commit details in the output + try: + revno, commit_msg = self.get_vcs().latest_revision_info(sender, to_repo_revision) + self.successful[-1] = ("%s\n" + "Revision: %s \n" + "Commit Message: %s" + % (line, revno, commit_msg)) + self.output += ["\n", "Revision Details:", "\n", + "Revision: %s" % revno, "\n", + "Commit Message: %s" % commit_msg, "\n"] + except PQMTlaFailure: + # If the latest_revision_info function isn't implemented + pass def get_arch_impl(self): # TODO: Tim Penhey, 2008-05-28 === modified file 'pqm/tests/test_pqm.py' --- pqm/tests/test_pqm.py 2008-09-29 08:58:53 +0000 +++ pqm/tests/test_pqm.py 2008-11-24 20:09:58 +0000 @@ -574,6 +574,12 @@ return self.fail("Merge conflict not raised.") + def test_latest_revision_info(self): + handler = pqm.Bazaar2Handler() + revno, message = handler.latest_revision_info("me", "bzrbranch") + self.assertEqual(1, revno) + self.assertEqual('start branch.', message) +