1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: add completion "-quit" for command /upgrade

A "-dummy" option has been added too, just to prevent accidental completion with
"-quit" (which is the first option completed).

Thanks to stfn for initial patch.
This commit is contained in:
Sebastien Helleu
2013-07-05 18:22:10 +02:00
parent cd71ea03d2
commit d38d033ce7
18 changed files with 89 additions and 50 deletions
+19 -18
View File
@@ -658,28 +658,29 @@ Beispiele:
........................................
/upgrade [<path_to_binary>|-quit]
path_to_binary: Pfad zu einer ausführbaren WeeChat Binärdatei (Standardeinstellung ist die aktuell ausführbare Datei)
-quit: trennt *ALLE* Verbindungen, speichert die aktuelle Sitzung und beendet WeeChat, um den aktuellen Zustand später wiederherstellen (siehe unten)
path_to_binary: path to WeeChat binary (default is current binary)
-dummy: do nothing (option used to prevent accidental completion with "-quit")
-quit: close *ALL* connections, save session and quit WeeChat, which makes possible a delayed restoration (see below)
Dieser Befehl führt ein Upgrade von WeeChat durch und startet die laufende Sitzung neu. Bevor dieser Befehl ausgeführt wird, sollte eine neue Version von WeeChat entweder vorab kompiliert, oder mit einem Paketmanager installiert worden sein.
This command upgrades and reloads a running WeeChat session. The new WeeChat binary must have been compiled or installed with a package manager before running this command.
Hinweis: SSL Verbindungen werden während eines Upgrades unterbrochen, da diese Verbindungen zur Zeit nicht mit GnuTLS gehalten werden können. Nach einem erfolgten Upgrade findet eine automatische Verbindung zu diesen Servern statt.
Note: SSL connections are lost during upgrade, because reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
Der Upgrade Vorgang besteht aus vier Schritten:
1. Sicherung der Sitzung, in Dateien für Core und Erweiterungen (buffers, history, ..)
2. alle Erweiterungen werden ausgeschaltet (Konfigurationen *.conf werden gesichert)
3. Sicherung der WeeChat Konfiguration (weechat.conf)
4. ausführen der neuen Version von WeeChat und wiederherstellen der Sitzung.
Upgrade process has 4 steps:
1. save session into files for core and plugins (buffers, history, ..)
2. unload all plugins (configuration files (*.conf) are written on disk)
3. save WeeChat configuration (weechat.conf)
4. execute new WeeChat binary and reload session.
Nutzt man die "-quit" Funktion ist die Abfolge geringfügig anders:
1. es werden *ALLE* Verbindungen getrennt (irc,xfer,relay, ...)
2. die Sitzung wird in Dateien gesichert (*.upgrade)
3. alle Erweiterungen werden ausgeschaltet
4. die WeeChat Konfiguration wird gesichert
5. WeeChat wird beendet
Die Sitzung kann zu einem späteren Zeitpunkt wiederhergestellt werden: weechat-curses --upgrade
WICHTIG: Die Sitzung muss mit exakt den selben Konfigurationsdateien wiederhergestellt werden (*.conf)
Es ist möglich die WeeChat-Sitzung auf einem anderen Rechner wiederherzustellen, sofern man den Inhalt des "~/.weechat" Verzeichnisses dorthin kopiert.
With option "-quit", the process is slightly different:
1. close *ALL* connections (irc, xfer, relay, ...)
2. save session into files (*.upgrade)
3. unload all plugins
4. save WeeChat configuration
5. quit WeeChat
Then later you can restore session with command: weechat-curses --upgrade
IMPORTANT: you must restore the session with exactly same configuration (files *.conf).
It is possible to restore WeeChat session on another machine if you copy the content of directory "~/.weechat".
........................................
[[command_weechat_uptime]]
+1
View File
@@ -659,6 +659,7 @@ Examples:
/upgrade [<path_to_binary>|-quit]
path_to_binary: path to WeeChat binary (default is current binary)
-dummy: do nothing (option used to prevent accidental completion with "-quit")
-quit: close *ALL* connections, save session and quit WeeChat, which makes possible a delayed restoration (see below)
This command upgrades and reloads a running WeeChat session. The new WeeChat binary must have been compiled or installed with a package manager before running this command.
+1
View File
@@ -659,6 +659,7 @@ Exemples:
/upgrade [<chemin_vers_binaire>|-quit]
chemin_vers_binaire: chemin vers le binaire WeeChat (par défaut le binaire courant)
-dummy: ne rien faire (option utilisée pour éviter une complétion accidentelle avec "-quit")
-quit: fermer *TOUTES* les connexions, sauver la session et quitter, ce qui rend possible une restauration différée (voir ci-dessous)
Cette commande met à jour et recharge une session de WeeChat qui tourne. Le nouveau binaire WeeChat doit avoir été compilé ou installé via un gestionnaire de paquet avant de lancer cette commande.
+1
View File
@@ -659,6 +659,7 @@ Esempi:
/upgrade [<path_del_binario>|-quit]
path_to_binary: path to WeeChat binary (default is current binary)
-dummy: do nothing (option used to prevent accidental completion with "-quit")
-quit: close *ALL* connections, save session and quit WeeChat, which makes possible a delayed restoration (see below)
This command upgrades and reloads a running WeeChat session. The new WeeChat binary must have been compiled or installed with a package manager before running this command.
+19 -18
View File
@@ -658,28 +658,29 @@ option: オプションの名前 ("*" で始めるか終わるかすれば大量
........................................
/upgrade [<path_to_binary>|-quit]
path_to_binary: WeeChat バイナリへのパス (デフォルトは現在のバイナリ)
-quit: *すべての*接続を閉じ、セッションを保存して WeeChat を終了。遅延復帰 (詳しくは後述) が可能になります。
path_to_binary: path to WeeChat binary (default is current binary)
-dummy: do nothing (option used to prevent accidental completion with "-quit")
-quit: close *ALL* connections, save session and quit WeeChat, which makes possible a delayed restoration (see below)
このコマンドは起動中の WeeChat セッションのアップグレードと再読み込みを行います。このコマンドを実行する前に、新しい WeeChat バイナリをコンパイルするか、パッケージマネージャでインストールしなければいけません。
This command upgrades and reloads a running WeeChat session. The new WeeChat binary must have been compiled or installed with a package manager before running this command.
注意: SSL 接続はアップグレード中に破棄されます、これは今のところ GnuTLS では SSL セッションのリロードができないからです。アップグレードの後に自動的に再接続されます。
Note: SSL connections are lost during upgrade, because reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
アップグレードは 4 つの手順を踏みます:
1. コアとプラグイン (バッファ、履歴、...) のセッションをファイルに保存
2. 全てのプラグインをアンロード (設定ファイル (*.conf) はディスクに書き込まれます)
3. WeeChat 設定を保存 (weechat.conf)
4. 新しい WeeChat バイナリを実行してセッションをリロード。<
Upgrade process has 4 steps:
1. save session into files for core and plugins (buffers, history, ..)
2. unload all plugins (configuration files (*.conf) are written on disk)
3. save WeeChat configuration (weechat.conf)
4. execute new WeeChat binary and reload session.
オプション "-quit" を使うと、上の挙動が少し変わります:
1. *すべての*接続を閉じる (ircxferrelay...)
2. すべてのセッションをファイルに保存 (*.upgrade)
3. すべてのプラグインをアンロード
4. WeeChat 設定を保存
5. WeeChat を終了
この後、セッションを回復させるには weechat-curses --upgrade を使ってください。
重要: 完全に同一の設定で (*.conf ファイルで) セッションを回復させてください。
"~/.weechat" ディレクトリの内容をコピーすれば異なるマシンで WeeChat のセッションを回復することも可能です。
With option "-quit", the process is slightly different:
1. close *ALL* connections (irc, xfer, relay, ...)
2. save session into files (*.upgrade)
3. unload all plugins
4. save WeeChat configuration
5. quit WeeChat
Then later you can restore session with command: weechat-curses --upgrade
IMPORTANT: you must restore the session with exactly same configuration (files *.conf).
It is possible to restore WeeChat session on another machine if you copy the content of directory "~/.weechat".
........................................
[[command_weechat_uptime]]
+3 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-02 15:35+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-06-10 09:13+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1994,6 +1994,8 @@ msgstr "[<cesta_k_binárce>]"
#, fuzzy
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
+4 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-03 13:09+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-07-02 22:20+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@@ -2215,8 +2215,11 @@ msgstr "Aktualisiert WeeChat ohne die Verbindung zum Server zu trennen"
msgid "[<path_to_binary>|-quit]"
msgstr "[<path_to_binary>|-quit]"
#, fuzzy
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
+3 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-02 15:35+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-07-02 15:57+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2102,6 +2102,8 @@ msgstr "[<ruta_al_ejecutable>|-quit]"
#, fuzzy
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
+6 -2
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-02 15:35+0200\n"
"PO-Revision-Date: 2013-07-02 15:36+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-07-05 18:10+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -2159,6 +2159,8 @@ msgstr "[<chemin_vers_binaire>|-quit]"
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
@@ -2190,6 +2192,8 @@ msgid ""
msgstr ""
"chemin_vers_binaire: chemin vers le binaire WeeChat (par défaut le binaire "
"courant)\n"
" -dummy: ne rien faire (option utilisée pour éviter une "
"complétion accidentelle avec \"-quit\")\n"
" -quit: fermer *TOUTES* les connexions, sauver la session et "
"quitter, ce qui rend possible une restauration différée (voir ci-dessous)\n"
"\n"
+3 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-02 15:35+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-07-02 15:57+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1714,6 +1714,8 @@ msgstr "[path_to_binary]"
#, fuzzy
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
+3 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-02 15:35+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-06-14 19:39-0300\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2144,6 +2144,8 @@ msgstr "[<path_del_binario>|-quit]"
#, fuzzy
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
+4 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-02 15:35+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-07-02 16:02+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
@@ -2111,8 +2111,11 @@ msgstr "サーバとの接続を維持して WeeChat をアップグレード"
msgid "[<path_to_binary>|-quit]"
msgstr "[<path_to_binary>|-quit]"
#, fuzzy
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
+4 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-02 15:35+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-07-02 15:37+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2157,8 +2157,11 @@ msgstr "uaktualnia WeeChat bez rozłączania z serwerami"
msgid "[<path_to_binary>|-quit]"
msgstr "[<ścieżka_do_binarki>|-quit]"
#, fuzzy
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
+3 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-02 15:35+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-06-10 09:19+0200\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2059,6 +2059,8 @@ msgstr "[<caminho_para_o_binário>]"
#, fuzzy
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
+3 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-02 15:35+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-07-02 16:02+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1736,6 +1736,8 @@ msgstr "[путь_к_исполняемому_файлу]"
#, fuzzy
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
+3 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-02 15:35+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-06-28 13:51+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1537,6 +1537,8 @@ msgstr ""
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
+3 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.1-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-02 15:35+0200\n"
"POT-Creation-Date: 2013-07-05 18:09+0200\n"
"PO-Revision-Date: 2013-02-14 18:20+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1544,6 +1544,8 @@ msgstr ""
msgid ""
"path_to_binary: path to WeeChat binary (default is current binary)\n"
" -dummy: do nothing (option used to prevent accidental completion "
"with \"-quit\")\n"
" -quit: close *ALL* connections, save session and quit WeeChat, "
"which makes possible a delayed restoration (see below)\n"
"\n"
+6 -1
View File
@@ -5014,6 +5014,9 @@ COMMAND_CALLBACK(upgrade)
(void) data;
(void) buffer;
if ((argc > 1) && (string_strcasecmp (argv[1], "-dummy") == 0))
return WEECHAT_RC_OK;
/*
* it is forbidden to upgrade while there are some background process
* (hook type "process" or "connect")
@@ -6624,6 +6627,8 @@ command_init ()
N_("[<path_to_binary>|-quit]"),
N_("path_to_binary: path to WeeChat binary (default is "
"current binary)\n"
" -dummy: do nothing (option used to prevent "
"accidental completion with \"-quit\")\n"
" -quit: close *ALL* connections, save session "
"and quit WeeChat, which makes possible a delayed "
"restoration (see below)\n\n"
@@ -6655,7 +6660,7 @@ command_init ()
"same configuration (files *.conf).\n"
"It is possible to restore WeeChat session on another "
"machine if you copy the content of directory \"~/.weechat\"."),
"%(filename)",
"%(filename)|-dummy|-quit",
&command_upgrade, NULL);
hook_command (NULL, "uptime",
N_("show WeeChat uptime"),