There is a shortcut "Create new revision." What does it do?

• Jul 31, 2019 - 18:43

The shortcuts list has "Create new revision" on Ctrl+F11. What does this do?
Tried it with no obvious effect. Nothing in the manual. Searching the forums for "Create new revision" gets no results. Searching "new revision" gets a ton of results, but all about revisions of MuseScore itself. I am pretty sure I can't generate a new version of MuseScore that easily :)

I like to include a score revision number in the footer, so that I can distinguish between paper copies of scores that end up scattered about the house. I have been just adding "revision 3" to the copyright field in the score properties, but it would be nice to have something a bit more elegant. Actually, the equivalent of the "build number" using in software, which increments automatically on each build would be nice.

Even an editable "revision" meta tag and entry in the Score Properties would be useful. The current "Revision" meta tag is the revision of MuseScore, which doesn't help me.


Comments

Good question. Checking the code:

      {
         MsWidget::MAIN_WINDOW,
         STATE_NORMAL,
         "revision",
         QT_TRANSLATE_NOOP("action","Create New Revision"),
         QT_TRANSLATE_NOOP("action","Create new revision")
         },
      {

then going to

      else if (cmd == "revision") {
            Score* sc = _score->masterScore();
            sc->createRevision();
            }

which leads to

void Score::createRevision()
      {
#if 0
qDebug("createRevision");
      QBuffer dbuf;
      dbuf.open(QIODevice::ReadWrite);
      saveFile(&dbuf, false, false);
      dbuf.close();
 
      QByteArray ba1 = readToBuffer();
 
      QString os = QString::fromUtf8(ba1.data(), ba1.size());
      QString ns = QString::fromUtf8(dbuf.buffer().data(), dbuf.buffer().size());
 
      diff_match_patch dmp;
      Revision* r = new Revision();
      r->setDiff(dmp.patch_toText(dmp.patch_make(ns, os)));
      r->setId("1");
      _revisions->add(r);
 
//      qDebug("patch:\n%s\n==========", qPrintable(patch));
      //
#endif
      }

So it indeed does nothing. It seems related to the score comparison tool.

In reply to by Marc Sabatella

Thanks Jojo and Marc. I've written enough #if 0 code to understand how it happens.

And while I don't get my "revision" wish, I now know about the compare tool. Time to go through the menus and see what other goodies I don't know about. Found a number of other useful things by perusing the shortcuts list.

Do you still have an unanswered question? Please log in first to post your question.