[Pkg-mc-commits] r233 - in trunk/debian: . patches patches/bugs

Patrick Winnertz winnie at alioth.debian.org
Sun Aug 9 09:59:35 UTC 2009


Author: winnie
Date: 2009-08-09 09:59:34 +0000 (Sun, 09 Aug 2009)
New Revision: 233

Added:
   trunk/debian/patches/bugs/414_shell_paterns.patch
   trunk/debian/patches/bugs/fish_no_report_on_failed_delete.patch
Modified:
   trunk/debian/changelog
   trunk/debian/patches/series
Log:
Fix several issues in mc



Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-08-09 09:14:50 UTC (rev 232)
+++ trunk/debian/changelog	2009-08-09 09:59:34 UTC (rev 233)
@@ -5,6 +5,13 @@
   * Fix escape of ~ in ~/Desk or something similar (Closes: #520026)
   * Mention in README.Debian that a different TERM on gnome-terminal 
     prevents the cursor from vanishing in mcedit over tabs.
+  * Add patch to make wildcards in copy/remove/move dialog work again
+    (Closes: #540110)
+  * shift-F3 doesn't unmark the selection after copying anymore 
+    (Closes: #302513)
+  * Every fish operation is now placed within a if, so if there are errors
+    because of permissions or something else, this is now reported
+    (Closes: #496974)
 
   [ Denis Briand ]
   * Fix wrong path to wrapper scripts (Closes: #540238).
@@ -12,7 +19,7 @@
     in 2:4.7.0-pre1-2 changelog.
   * Remove trailing whitespaces in several debian/ files.
 
- -- Patrick Winnertz <winnie at debian.org>  Sun, 09 Aug 2009 11:12:14 +0200
+ -- Patrick Winnertz <winnie at debian.org>  Sun, 09 Aug 2009 11:55:31 +0200
 
 mc (2:4.7.0-pre1-2) unstable; urgency=low
 

Added: trunk/debian/patches/bugs/414_shell_paterns.patch
===================================================================
--- trunk/debian/patches/bugs/414_shell_paterns.patch	                        (rev 0)
+++ trunk/debian/patches/bugs/414_shell_paterns.patch	2009-08-09 09:59:34 UTC (rev 233)
@@ -0,0 +1,65 @@
+commit 4586834cb9d4d84b4493bbb58e36d9c32abfb409
+Author: Denys Vlasenko <vda.linux at googlemail.com>
+Date:   Fri Aug 7 14:47:26 2009 +0300
+
+    Ticket #414 (shell patterns in copy dialog)
+    
+    Handle asterisks into replace template string.
+    
+    Signed-off-by: Slava Zanko <slavazanko at gmail.com>
+
+diff --git a/src/search/glob.c b/src/search/glob.c
+index c35b712..08caab4 100644
+--- a/src/search/glob.c
++++ b/src/search/glob.c
+@@ -110,6 +110,33 @@ mc_search__glob_translate_to_regex (gchar * str, gsize * len)
+     return buff;
+ }
+ 
++/* --------------------------------------------------------------------------------------------- */
++
++static GString *
++mc_search__translate_replace_glob_to_regex (gchar *str)
++{
++    GString *buff = g_string_new ("");
++    int cnt = '0';
++
++    while (*str) {
++	char c = *str++;
++	switch (c) {
++	case '*':
++	case '?':
++	    g_string_append_c (buff, '\\');
++	    c = ++cnt;
++	    break;
++	/* breaks copying: mc uses "\0" internally, it must not be changed */
++	/*case '\\':*/
++	case '&':
++	    g_string_append_c (buff, '\\');
++	    break;
++	}
++	g_string_append_c (buff, c);
++    }
++    return buff;
++}
++
+ /*** public functions ****************************************************************************/
+ 
+ void
+@@ -141,8 +168,15 @@ mc_search__run_glob (mc_search_t * mc_search, const void *user_data,
+ }
+ 
+ /* --------------------------------------------------------------------------------------------- */
++
++
+ GString *
+ mc_search_glob_prepare_replace_str (mc_search_t * mc_search, GString * replace_str)
+ {
+-    return mc_search_regex_prepare_replace_str (mc_search, replace_str);
++    GString *repl = mc_search__translate_replace_glob_to_regex(replace_str->str);
++    GString *res = mc_search_regex_prepare_replace_str (mc_search, repl);
++    g_string_free (repl, TRUE);
++    return res;
+ }
++
++/* --------------------------------------------------------------------------------------------- */

Added: trunk/debian/patches/bugs/fish_no_report_on_failed_delete.patch
===================================================================
--- trunk/debian/patches/bugs/fish_no_report_on_failed_delete.patch	                        (rev 0)
+++ trunk/debian/patches/bugs/fish_no_report_on_failed_delete.patch	2009-08-09 09:59:34 UTC (rev 233)
@@ -0,0 +1,82 @@
+diff --git a/vfs/fish.c b/vfs/fish.c
+index 1e1ccbe..344aca1 100644
+--- a/vfs/fish.c
++++ b/vfs/fish.c
+@@ -978,11 +978,17 @@ static int fish_##name (struct vfs_class *me, const char *path1, const char *pat
+ }
+ 
+ FISH_OP(rename, "#RENAME /%s /%s\n"
+-		"mv /%s /%s 2>/dev/null\n"
+-		"echo '### 000'" )
++		"if mv /%s /%s 2>/dev/null; then\n"
++		    "echo '### 000'\n"
++		"else\n"
++		    "echo '### 500'\n"
++		"fi\n")
+ FISH_OP(link,   "#LINK /%s /%s\n"
+-		"ln /%s /%s 2>/dev/null\n"
+-		"echo '### 000'" )
++		"if ln /%s /%s 2>/dev/null; then\n"
++		    "echo '### 000'\n"
++		"else\n"
++		    "echo '### 500'\n"
++		"fi\n")
+ 
+ static int fish_symlink (struct vfs_class *me, const char *setto, const char *path)
+ {
+@@ -991,8 +997,11 @@ static int fish_symlink (struct vfs_class *me, const char *setto, const char *pa
+     qsetto = strutils_shell_escape (setto);
+     g_snprintf(buf, sizeof(buf),
+             "#SYMLINK %s /%s\n"
+-	    "ln -s %s /%s 2>/dev/null\n"
+-	    "echo '### 000'\n",
++	    "if ln -s %s /%s 2>/dev/null; then\n"
++		"echo '### 000'\n"
++	    "else\n"
++		"echo '### 500'\n"
++	    "fi\n",
+ 	    qsetto, rpath, qsetto, rpath);
+     g_free (qsetto);
+     POSTFIX(OPT_FLUSH);
+@@ -1039,8 +1048,11 @@ static int fish_unlink (struct vfs_class *me, const char *path)
+     PREFIX
+     g_snprintf(buf, sizeof(buf),
+             "#DELE /%s\n"
+-	    "rm -f /%s 2>/dev/null\n"
+-	    "echo '### 000'\n",
++	    "if rm -f /%s 2>/dev/null; then\n"
++		"echo '### 000'\n"
++	    "else\n"
++		"echo '### 500'\n"
++	    "fi\n",
+ 	    rpath, rpath);
+     POSTFIX(OPT_FLUSH);
+ }
+@@ -1076,8 +1088,11 @@ static int fish_mkdir (struct vfs_class *me, const char *path, mode_t mode)
+ 
+     g_snprintf(buf, sizeof(buf),
+             "#MKD /%s\n"
+-	    "mkdir /%s 2>/dev/null\n"
+-	    "echo '### 000'\n",
++	    "if mkdir /%s 2>/dev/null; then\n"
++		"echo '### 000'\n"
++	    "else\n"
++		"echo '### 500'\n"
++	    "fi\n",
+ 	    rpath, rpath);
+ 
+     g_free (rpath);
+@@ -1097,8 +1112,11 @@ static int fish_rmdir (struct vfs_class *me, const char *path)
+     PREFIX
+     g_snprintf(buf, sizeof(buf),
+             "#RMD /%s\n"
+-	    "rmdir /%s 2>/dev/null\n"
+-	    "echo '### 000'\n",
++	    "if rmdir /%s 2>/dev/null; then\n"
++		"echo '### 000'\n"
++	    "else\n"
++		"echo '### 500'\n"
++	    "fi\n",
+ 	    rpath, rpath);
+     POSTFIX(OPT_FLUSH);
+ }

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2009-08-09 09:14:50 UTC (rev 232)
+++ trunk/debian/patches/series	2009-08-09 09:59:34 UTC (rev 233)
@@ -11,6 +11,7 @@
 bugs/01_bashism.patch
 bugs/02_uzip_broken_528239.patch
 bugs/03_don_t_escape_tilde.patch
+bugs/414_shell_paterns.patch
 bugs/1392_regression_in_tar_support.patch
 bugs/1453_fix_crash_on_f14.patch
 bugs/1404_ctrl-c_kills_mc.patch
@@ -18,6 +19,7 @@
 bugs/1415_hotlist_buffer_cleanup.patch
 bugs/1461_line_feeds_info_panel.patch
 bugs/1462_fix_wrong_path_to_wrapper_script_540238.patch
+bugs/fish_no_report_on_failed_delete.patch
 man/10_FSSTND_hu_man.patch
 man/11_FSSTND_it_man.patch
 man/12_FSSTND_man.patch




More information about the Pkg-mc-commits mailing list