mercurial (2.1.1-2) deb_specific__use_sensible-editor.patch

Summary

 hgeditor                       |    2 +-
 i18n/da.po                     |    4 ++--
 i18n/de.po                     |    8 ++++----
 i18n/el.po                     |    4 ++--
 i18n/fr.po                     |    4 ++--
 i18n/it.po                     |    6 +++---
 i18n/ja.po                     |   11 ++++++-----
 i18n/pt_BR.po                  |   14 ++++++++------
 i18n/ro.po                     |    7 ++++---
 i18n/ru.po                     |   14 ++++++++------
 i18n/sv.po                     |    9 +++++----
 i18n/zh_CN.po                  |    4 ++--
 i18n/zh_TW.po                  |    6 +++---
 mercurial/commands.py          |    4 ++--
 mercurial/help/config.txt      |    3 ++-
 mercurial/help/environment.txt |    2 +-
 mercurial/ui.py                |    2 +-
 17 files changed, 56 insertions(+), 48 deletions(-)

    
download this patch

Patch contents

Use sensible-editor as default instead of vi.

--- a/hgeditor
+++ b/hgeditor
@@ -7,7 +7,7 @@
 # only for Mercurial, modify this:
 case "${EDITOR}" in
     "")
-        EDITOR="vi"
+        EDITOR="sensible-editor"
         ;;
     emacs)
         EDITOR="$EDITOR -nw"
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1901,8 +1901,8 @@
     editor = ui.geteditor()
     cmdpath = util.findexe(editor) or util.findexe(editor.split()[0])
     if not cmdpath:
-        if editor == 'vi':
-            ui.write(_(" No commit editor set and can't find vi in PATH\n"))
+        if editor == 'sensible-editor':
+            ui.write(_(" No commit editor set and can't find sensible-editor in PATH\n"))
             ui.write(_(" (specify a commit editor in your configuration"
                        " file)\n"))
         else:
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -687,7 +687,7 @@
         return (os.environ.get("HGEDITOR") or
                 self.config("ui", "editor") or
                 os.environ.get("VISUAL") or
-                os.environ.get("EDITOR", "vi"))
+                os.environ.get("EDITOR", "sensible-editor"))
 
     def progress(self, topic, pos, item="", unit="", total=None):
         '''show a progress message
--- a/i18n/da.po
+++ b/i18n/da.po
@@ -8752,7 +8752,7 @@
 msgid "Checking commit editor...\n"
 msgstr ""
 
-msgid " No commit editor set and can't find vi in PATH\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
 msgstr ""
 
 msgid " (specify a commit editor in your configuration file)\n"
@@ -14194,7 +14194,7 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 
 msgid ""
--- a/i18n/de.po
+++ b/i18n/de.po
@@ -9951,8 +9951,8 @@
 msgid "Checking commit editor...\n"
 msgstr "Prüfe Editor für Versionsmeldungen...\n"
 
-msgid " No commit editor set and can't find vi in PATH\n"
-msgstr " Kein Editor für Versionsmeldungen angegeben und vi nicht im PATH\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
+msgstr " Kein Editor für Versionsmeldungen angegeben und sensible-editor nicht im PATH\n"
 
 msgid " (specify a commit editor in your configuration file)\n"
 msgstr " (Gib einen Editor in der .hgrc Datei an!)\n"
@@ -15794,7 +15794,7 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 "EDITOR\n"
 "    Manchmal muss Mercurial eine Textdatei in einem Editor öffnen, damit\n"
@@ -15802,7 +15802,7 @@
 "    Nachricht geschrieben wird. Der verwendete Editor wird aus den drei\n"
 "    Umgebungsvariablen HGEDITOR, VISUAL und EDITOR (in dieser Reihenfolge)\n"
 "    ermittelt. Der erste nicht-leere wird verwendet. Wenn alle Angaben\n"
-"    leer sind, wird der Standard 'vi' verwendet."
+"    leer sind, wird der Standard 'sensible-editor' verwendet."
 
 msgid ""
 "PYTHONPATH\n"
--- a/i18n/el.po
+++ b/i18n/el.po
@@ -274,7 +274,7 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 
 msgid ""
@@ -11500,7 +11500,7 @@
 msgid "Checking commit editor...\n"
 msgstr ""
 
-msgid " No commit editor set and can't find vi in PATH\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
 msgstr ""
 
 msgid " (specify a commit editor in your .hgrc file)\n"
--- a/i18n/fr.po
+++ b/i18n/fr.po
@@ -299,7 +299,7 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 
 msgid ""
@@ -8228,7 +8228,7 @@
 msgid "Checking commit editor...\n"
 msgstr ""
 
-msgid " No commit editor set and can't find vi in PATH\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
 msgstr ""
 
 msgid " (specify a commit editor in your .hgrc file)\n"
--- a/i18n/it.po
+++ b/i18n/it.po
@@ -7157,8 +7157,8 @@
 msgid "Checking commit editor...\n"
 msgstr "Sto controllando l'editor per il commit...\n"
 
-msgid " No commit editor set and can't find vi in PATH\n"
-msgstr "Nessun editor per il commit trovato e non trovo vi in PATH\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
+msgstr "Nessun editor per il commit trovato e non trovo sensible-editor in PATH\n"
 
 msgid " (specify a commit editor in your configuration file)\n"
 msgstr ""
@@ -10462,7 +10462,7 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 
 msgid ""
--- a/i18n/ja.po
+++ b/i18n/ja.po
@@ -9190,8 +9190,8 @@
 msgid "Checking commit editor...\n"
 msgstr "メッセージ入力用エディタの検証中...\n"
 
-msgid " No commit editor set and can't find vi in PATH\n"
-msgstr " エディタが起動できません(vi にも PATH が通っていません)\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
+msgstr " エディタが起動できません(sensible-editor にも PATH が通っていません)\n"
 
 msgid " (specify a commit editor in your configuration file)\n"
 msgstr " (コミットメッセージ用エディタを設定ファイルで設定してください)\n"
@@ -15196,7 +15196,8 @@
 
 msgid ""
 "``editor``\n"
-"    The editor to use during a commit. Default is ``$EDITOR`` or ``vi``."
+"    The editor to use during a commit. Default is ``$EDITOR`` or\n"
+"    ``sensible-editor``."
 msgstr ""
 "``editor``\n"
 "    コミットログ入力用エディタ。 無指定の場合、 ``$EDITOR`` ないし\n"
@@ -16185,7 +16186,7 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 "EDITOR\n"
 "    コミット時のメッセージのように、 エディタでファイルを開き、\n"
@@ -16193,7 +16194,7 @@
 "    そこで使用されるエディタは、 HGEDITOR、 VISUAL\n"
 "    あるいは EDITOR 環境変数に設定されたものを(この順序で)使用します。\n"
 "    最初の空で無い値に設定された環境変数の値を使用します。\n"
-"    いずれも未設定 (あるいは空) の場合は、 'vi' が使用されます。"
+"    いずれも未設定 (あるいは空) の場合は、 'sensible-editor' が使用されます。"
 
 msgid ""
 "PYTHONPATH\n"
--- a/i18n/pt_BR.po
+++ b/i18n/pt_BR.po
@@ -10376,10 +10376,10 @@
 msgid "Checking commit editor...\n"
 msgstr "Verificando editor para consolidação...\n"
 
-msgid " No commit editor set and can't find vi in PATH\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
 msgstr ""
 " Nenhum editor para consolidação configurado, e não foi possível encontrar "
-"'vi' no PATH\n"
+"'sensible-editor' no PATH\n"
 
 msgid " (specify a commit editor in your configuration file)\n"
 msgstr ""
@@ -16537,10 +16537,12 @@
 
 msgid ""
 "``editor``\n"
-"    The editor to use during a commit. Default is ``$EDITOR`` or ``vi``."
+"    The editor to use during a commit. Default is ``$EDITOR`` or\n"
+"    ``sensible-editor``."
 msgstr ""
 "``editor``\n"
-"    O editor usado durante um commit. O padrão é ``$EDITOR`` ou ``vi``."
+"    O editor usado durante um commit. O padrão é ``$EDITOR`` ou\n"
+"    ``sensible-editor``."
 
 msgid ""
 "``fallbackencoding``\n"
@@ -17560,7 +17562,7 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 "EDITOR\n"
 "    Algumas vezes o Mercurial precisa abrir em um editor um arquivo\n"
@@ -17568,7 +17570,7 @@
 "    mensagens de consolidação. O editor usado é determinado pela\n"
 "    consulta às variáveis de ambiente HGEDITOR, VISUAL e EDITOR,\n"
 "    nessa ordem. O primeiro valor não vazio é escolhido. Se todos\n"
-"    estiverem vazios, o editor será o 'vi'."
+"    estiverem vazios, o editor será o 'sensible-editor'."
 
 msgid ""
 "PYTHONPATH\n"
--- a/i18n/sv.po
+++ b/i18n/sv.po
@@ -8717,8 +8717,8 @@
 msgid "Checking commit editor...\n"
 msgstr "Kontrollerar arkiveringseditor...\n"
 
-msgid " No commit editor set and can't find vi in PATH\n"
-msgstr " Ingen arkiveringseditor satt och kan inte hitta vi i PATH\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
+msgstr " Ingen arkiveringseditor satt och kan inte hitta sensible-editor i PATH\n"
 
 msgid " (specify a commit editor in your configuration file)\n"
 msgstr " (specificera en arkiveringseditor i din konfigurationsfil)\n"
@@ -13794,7 +13794,8 @@
 
 msgid ""
 "``editor``\n"
-"    The editor to use during a commit. Default is ``$EDITOR`` or ``vi``."
+"    The editor to use during a commit. Default is ``$EDITOR`` or\n"
+"    ``sensible-editor``."
 msgstr ""
 
 msgid ""
@@ -14477,7 +14478,7 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 
 msgid ""
--- a/i18n/zh_CN.po
+++ b/i18n/zh_CN.po
@@ -5880,7 +5880,7 @@
 msgid "Checking commit editor...\n"
 msgstr ""
 
-msgid " No commit editor set and can't find vi in PATH\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
 msgstr ""
 
 msgid " (specify a commit editor in your .hgrc file)\n"
@@ -8768,7 +8768,7 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 
 msgid ""
--- a/i18n/zh_TW.po
+++ b/i18n/zh_TW.po
@@ -6760,8 +6760,8 @@
 msgid "Checking commit editor...\n"
 msgstr "檢查提交訊息編輯器...\n"
 
-msgid " No commit editor set and can't find vi in PATH\n"
-msgstr "沒有設定提交訊息編輯器,然後在PATH中也沒有vi\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
+msgstr "沒有設定提交訊息編輯器,然後在PATH中也沒有sensible-editor\n"
 
 msgid " (specify a commit editor in your configuration file)\n"
 msgstr "(在你的設定檔指明一個用來編輯提交訊息的編輯器)\n"
@@ -9710,7 +9710,7 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 
 msgid ""
--- a/mercurial/help/environment.txt
+++ b/mercurial/help/environment.txt
@@ -94,7 +94,7 @@
     editor it uses is determined by looking at the environment
     variables HGEDITOR, VISUAL and EDITOR, in that order. The first
     non-empty one is chosen. If all of them are empty, the editor
-    defaults to 'vi'.
+    defaults to 'sensible-editor'.
 
 PYTHONPATH
     This is used by Python to find imported modules and may need to be
--- a/mercurial/help/config.txt
+++ b/mercurial/help/config.txt
@@ -1055,7 +1055,8 @@
     Print debugging information. True or False. Default is False.
 
 ``editor``
-    The editor to use during a commit. Default is ``$EDITOR`` or ``vi``.
+    The editor to use during a commit. Default is ``$EDITOR`` or
+    ``sensible-editor``.
 
 ``fallbackencoding``
     Encoding to try if it's not possible to decode the changelog using
--- a/i18n/ro.po
+++ b/i18n/ro.po
@@ -7722,7 +7722,7 @@
 msgid "Checking commit editor...\n"
 msgstr "Se verifică editorul pentru commit...\n"
 
-msgid " No commit editor set and can't find vi in PATH\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
 msgstr ""
 
 msgid " (specify a commit editor in your configuration file)\n"
@@ -11925,7 +11925,8 @@
 
 msgid ""
 "``editor``\n"
-"    The editor to use during a commit. Default is ``$EDITOR`` or ``vi``."
+"    The editor to use during a commit. Default is ``$EDITOR`` or\n"
+"    ``sensible-editor``."
 msgstr ""
 
 msgid ""
@@ -12570,7 +12571,7 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 
 msgid ""
--- a/i18n/ru.po
+++ b/i18n/ru.po
@@ -10573,8 +10573,8 @@
 msgid "Checking commit editor...\n"
 msgstr "Проверка редактора сообщений фиксации...\n"
 
-msgid " No commit editor set and can't find vi in PATH\n"
-msgstr " Редактор сообщений не установлен и vi не доступен в PATH\n"
+msgid " No commit editor set and can't find sensible-editor in PATH\n"
+msgstr " Редактор сообщений не установлен и sensible-editor не доступен в PATH\n"
 
 msgid " (specify a commit editor in your configuration file)\n"
 msgstr " (задайте редактор сообщений в вашем конфиге)\n"
@@ -16647,10 +16647,12 @@
 
 msgid ""
 "``editor``\n"
-"    The editor to use during a commit. Default is ``$EDITOR`` or ``vi``."
+"    The editor to use during a commit. Default is ``$EDITOR`` or\n"
+"    ``sensible-editor``."
 msgstr ""
 "``editor``\n"
-"    Редактор, вызываемый при фиксации. По умолчанию ``$EDITOR`` or ``vi``."
+"    Редактор, вызываемый при фиксации. По умолчанию ``$EDITOR`` or\n"
+"    ``sensible-editor``."
 
 msgid ""
 "``fallbackencoding``\n"
@@ -17652,14 +17654,14 @@
 "    editor it uses is determined by looking at the environment\n"
 "    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
 "    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'."
+"    defaults to 'sensible-editor'."
 msgstr ""
 "EDITOR\n"
 "    Иногда требуется открыть текстовый файл в редакторе, чтобы.\n"
 "    внести изменения, например для написания сообщения фиксации.\n"
 "    Используемый редактор определяется переменными среды HGEDITOR,\n"
 "    VISUAL и EDITOR, именно в таком порядке. Выбирается первая\n"
-"    непустая переменная. Если они все пусты, используется 'vi'."
+"    непустая переменная. Если они все пусты, используется 'sensible-editor'."
 
 msgid ""
 "PYTHONPATH\n"