Changes between Initial Version and Version 8 of Ticket #3


Ignore:
Timestamp:
01/11/14 15:19:14 (11 years ago)
Author:
ossi
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3

    • Property Branch state changed from to no branch
    • Property Severity changed from to no branch
    • Property Blocking changed from to 1952
    • Property Milestone changed from to VFS Standardisation
  • Ticket #3 – Description

    initial v8  
    77||Release:||4.6.0||Operating System:||GNU/Linux|| 
    88 
    9 Discussion: 
     9Original submission: 
    1010{{{ 
    11 Sat 13 Mar 2004 06:40:31 PM UTC, comment #2: 
     11Not a bug, but feature request. 
    1212 
     13I am using VFS (extfs). I have written program (backup extractor)  
     14which handle "copyout" and "list" commands from mc. But if I want to 
     15 copyout a whole directory (or a lot of files from archive), it is  
     16called FOR EACH extracted file. In my case, extractor (duplicity  
     17backupper, http://www.nongnu.org/duplicity/ ) starts very long time. 
     18 But it can extract whole directory quickly. 
     19 
     20I think if mc would pass to extfs script environment variable  
     21containing names of ALL the selected files (AND DIRECTORIES) on the  
     22panel before extracting, it would get ability to optimize extract  
     23script. For example, I can fully extract all needed files in  
     24temporary directory by ONE call to duplicity, and then just copy  
     25these files from temp directory to pathes needed by mc. 
     26}}} 
     27 
     28Comment 1 by Anonymous at Sat 13 Mar 2004 12:19:29 AM UTC: 
     29{{{ 
     30Here is a simple patch (also attached). Hope you will apply it in 
     31next release. 
     32 
     33--- mc-4.6.1-pre1/src/file.c 2003-10-27 20:36:19.000000000 +0300 
     34+++ mc-4.6.1-pre1.patched/src/file.c 2004-03-12 03:13:05.000000000 +0300 
     35@@ -1865,4 +1865,27 @@ 
     36} 
     37} 
     38+ 
     39+ /* 
     40+ * Dmitry Koteroff <d[at]koteroff.ru> 
     41+ * Patch to save selected items in environment variable. 
     42+ * This variable would be passed to extfs scripts and may be used 
     43+ * to optimize depacking performance. 
     44+ */ 
     45+ {{{{ 
     46+ char* env = g_strconcat("", NULL); 
     47+ for (i = 0; i < panel->count; i++) { 
     48+ char prevEnv, p; 
     49+ if (!panel->dir.list[i].f.marked) continue; 
     50+ p = concat_dir_and_file (panel->cwd, panel->dir.list[i].fname); 
     51+ prevEnv = env; 
     52+ env = g_strconcat(prevEnv, p, "\n", NULL); 
     53+ g_free(p); 
     54+ g_free(prevEnv); 
     55+ } 
     56+ setenv("MC_SELECTION", env, 1); 
     57+ g_free(env); 
     58+ }}}} 
     59+ 
     60+ 
     61#ifdef WITH_BACKGROUND 
     62/* Did the user select to do a background operation? */ 
     63}}} 
     64 
     65Comment 2 by Anonymous at Sat 13 Mar 2004 06:40:31 PM UTC: 
     66{{{ 
    1367Here is the better patch, it also consider current cursor position. 
    1468 
     
    60114+ setenv("MC_SELECTION", "", 1); setenv("MC_CURRENT", "", 1); 
    61115/* Clean up */ 
    62         Anonymous 
    63 Sat 13 Mar 2004 12:19:29 AM UTC, comment #1: 
    64  
    65 Here is a simple patch (also attached). Hope you will apply it in 
    66 next release. 
    67  
    68 --- mc-4.6.1-pre1/src/file.c 2003-10-27 20:36:19.000000000 +0300 
    69 +++ mc-4.6.1-pre1.patched/src/file.c 2004-03-12 03:13:05.000000000 +0300 
    70 @@ -1865,4 +1865,27 @@ 
    71 } 
    72 } 
    73 + 
    74 + /* 
    75 + * Dmitry Koteroff <d[at]koteroff.ru> 
    76 + * Patch to save selected items in environment variable. 
    77 + * This variable would be passed to extfs scripts and may be used 
    78 + * to optimize depacking performance. 
    79 + */ 
    80 + {{{{ 
    81 + char* env = g_strconcat("", NULL); 
    82 + for (i = 0; i < panel->count; i++) { 
    83 + char prevEnv, p; 
    84 + if (!panel->dir.list[i].f.marked) continue; 
    85 + p = concat_dir_and_file (panel->cwd, panel->dir.list[i].fname); 
    86 + prevEnv = env; 
    87 + env = g_strconcat(prevEnv, p, "\n", NULL); 
    88 + g_free(p); 
    89 + g_free(prevEnv); 
    90 + } 
    91 + setenv("MC_SELECTION", env, 1); 
    92 + g_free(env); 
    93 + }}}} 
    94 + 
    95 + 
    96 #ifdef WITH_BACKGROUND 
    97 /* Did the user select to do a background operation? */ 
    98         Anonymous 
    99 Fri 12 Mar 2004 11:00:45 PM UTC, original submission: 
    100  
    101 Not a bug, but feature request. 
    102  
    103 I am using VFS (extfs). I have written program (backup extractor)  
    104 which handle "copyout" and "list" commands from mc. But if I want to 
    105  copyout a whole directory (or a lot of files from archive), it is  
    106 called FOR EACH extracted file. In my case, extractor (duplicity  
    107 backupper, http://www.nongnu.org/duplicity/ ) starts very long time. 
    108  But it can extract whole directory quickly. 
    109  
    110 I think if mc would pass to extfs script environment variable  
    111 containing names of ALL the selected files (AND DIRECTORIES) on the  
    112 panel before extracting, it would get ability to optimize extract  
    113 script. For example, I can fully extract all needed files in  
    114 temporary directory by ONE call to duplicity, and then just copy  
    115 these files from temp directory to pathes needed by mc. 
    116116}}}