# # # patch "src/monotone/MonotoneHandle.cpp" # from [3bf71e3d9dffe63f27de71530e3168f969578894] # to [db0571759f09af119d85fe03baef6727a8122cab] # # patch "src/monotone/MonotoneThread.cpp" # from [3e57addf8d783dfee4b0d23b7623d251a1863216] # to [06019f57c4dc14e5eabc5025ec32a12f05be7c4a] # # patch "src/view/dialogs/ConnectServerDialog.cpp" # from [a4efba6c7ac92f367fed5fea02f461d2313f2e00] # to [9e5b2676beb47236cd000a47dbfd1ab7c0e425f7] # # patch "src/view/dialogs/OpenPrompt.cpp" # from [feb81552935435e828076c6024187ce978321316] # to [683e45c734ff1c2bc6c0bc10537bc545a2c0e0da] # # patch "src/view/widgets/MenuBar.cpp" # from [73e9e0b595d768336f37d349b7bb0c82835da1b9] # to [a1d670a6aaddff5bd3ab8152a9f3de44409814c8] # ============================================================ --- src/monotone/MonotoneThread.cpp 3e57addf8d783dfee4b0d23b7623d251a1863216 +++ src/monotone/MonotoneThread.cpp 06019f57c4dc14e5eabc5025ec32a12f05be7c4a @@ -130,7 +130,7 @@ void MonotoneThread::run() // remote_stdio outputs a lot of junk we don't want to listen to args << "--reallyquiet"; - // FIXME: remove the mtn:// prefix - monotone up until 0.48 doesn't + // remove the mtn:// prefix - monotone up until 0.48 doesn't // understand the mtn:// syntax everywhere QString host = monotoneHandle->getData().mid(6); @@ -138,21 +138,14 @@ void MonotoneThread::run() // custom '@' syntax - so we need to give the key / auth explicitely // with --key int pos = host.indexOf("@"); - QString key; + QString key(""); if (pos != -1) { key = host.left(pos); host = host.mid(pos + 1); } - - // FIXME: monotone 0.48 crashes on explicit anonymous connections - // see https://savannah.nongnu.org/bugs/?30237 - if (!key.isEmpty()) - { - args << "--key" << key; - } - - args << "remote_stdio" << host; + args << "--key=" + key + << "remote_stdio" << host; } else { ============================================================ --- src/view/widgets/MenuBar.cpp 73e9e0b595d768336f37d349b7bb0c82835da1b9 +++ src/view/widgets/MenuBar.cpp a1d670a6aaddff5bd3ab8152a9f3de44409814c8 @@ -233,7 +233,10 @@ void MenuBar::updateRecentLists() QString label = previousServers[i]; if (rx.indexIn(label) != -1) { - label = tr("%1 (%2...)").arg(rx.cap(2)).arg(rx.cap(1).left(8)); + QString key(tr("")); + if (!rx.cap(1).isEmpty()) + key = rx.cap(1).left(8) + "..."; + label = tr("%1 (%2)").arg(rx.cap(2)).arg(key); } act = menuRecent_Servers->addAction( ============================================================ --- src/view/dialogs/OpenPrompt.cpp feb81552935435e828076c6024187ce978321316 +++ src/view/dialogs/OpenPrompt.cpp 683e45c734ff1c2bc6c0bc10537bc545a2c0e0da @@ -218,7 +218,10 @@ void OpenPrompt::updateRecentLists() QString label = server; if (rx.indexIn(label) != -1) { - label = tr("%1 (%2...)").arg(rx.cap(2)).arg(rx.cap(1).left(8)); + QString key(tr("")); + if (!rx.cap(1).isEmpty()) + key = rx.cap(1).left(8) + "..."; + label = tr("%1 (%2)").arg(rx.cap(2)).arg(key); } recentServers->insertItem(++c, label, server); } ============================================================ --- src/monotone/MonotoneHandle.cpp 3bf71e3d9dffe63f27de71530e3168f969578894 +++ src/monotone/MonotoneHandle.cpp db0571759f09af119d85fe03baef6727a8122cab @@ -139,13 +139,6 @@ void MonotoneHandle::validatePrivateKey( void MonotoneHandle::validatePrivateKey(const QString & keyFragment, QString & keyId) { - if (keyFragment.isEmpty()) - { - throw GuitoneException( - QObject::tr("key fragment in URI is empty or missing") - ); - } - if (privateKeys.size() == 0) { privateKeys = MonotoneUtil::getPrivateKeyMap(MonotoneHandle::create()); @@ -261,15 +254,17 @@ MonotoneHandlePtr MonotoneHandle::create type = server_handle; validateServerConnection(rx.cap(2)); - // FIXME: we might want to make the key part optional once - // remote_stdio can do anonymous connects - QString key; - validatePrivateKey(rx.cap(1), key); - - // FIXME: this might not be so readable, but since most keys - // have email syntax, mtn://address@hidden@server.com isn't better - // either without escaping - cleanedPathOrURI = "mtn://" + key + "@" + rx.cap(2); + QString keyFragment = rx.cap(1); + if (!keyFragment.isEmpty()) + { + QString keyId; + validatePrivateKey(rx.cap(1), keyId); + cleanedPathOrURI = "mtn://" + keyId + "@" + rx.cap(2); + } + else + { + cleanedPathOrURI = "mtn://" + rx.cap(2); + } } else { ============================================================ --- src/view/dialogs/ConnectServerDialog.cpp a4efba6c7ac92f367fed5fea02f461d2313f2e00 +++ src/view/dialogs/ConnectServerDialog.cpp 9e5b2676beb47236cd000a47dbfd1ab7c0e425f7 @@ -46,9 +46,7 @@ ConnectServerDialog::ConnectServerDialog this )); - // FIXME: anonymous connections are supported from 0.99 onwards - // by remote_stdio - //privateKeys->addItem(tr(""), QString()); + privateKeys->addItem(tr(""), QString()); QMap keys = MonotoneUtil::getPrivateKeyMap(MonotoneHandle::create());