Changes between Initial Version and Version 8 of Ticket #20


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20

    • Property Severity changed from to no branch
    • Property Reporter changed from slavazanko to ossi
    • Property Cc ip1024@… added
    • Property Priority changed from major to minor
    • Property Version changed from to master
    • Property Branch state changed from to no branch
    • Property Milestone changed from to Future Releases
  • Ticket #20 – Description

    initial v8  
    77||Release:||current (CVS or snapshot)||Operating System:||All|| 
    88 
    9 Discussion: 
     9Original submission: 
    1010{{{ 
    11 A really fast move can happen only under the circumstances  
    12 described in the quoted text - everything else will be suboptimal.  
    13 I don't want to block any attempts to move the directory if the  
    14 existing directory is not empty, but it cannot be performed as  
    15 fast. The more dupicate directories exist the performance will get  
    16 worse (in large trees). 
    17         Pavel Tsekov <ptsekov> 
    18 Project Administrator 
    19 Tue 12 Jul 2005 01:09:19 PM UTC, comment #4: 
     11situation: 
     12foo/name/file exists. 
     13bar/name/ exists. 
     14both on the same partition. 
     15you're in "foo/", cursor over "name". 
     16press <f6>, enter "../bar", confirm. 
     17effect: file is moved by copying. this is because mc incorrectly  
     18diagnoses a cross-device move. 
     19the code in question is file.c, move_file_file() & move_dir_dir(). 
     20when fixing, please consider the case of moving a tree where only a  
     21subtree is on another device. but maybe it was already considered. :)  
     22}}} 
    2023 
    21 > Does `bar/name/' contain any entries or is it empty ? 
    22 > 
     24Comment 1 by Pavel Tsekov <ptsekov> at Mon 11 Jul 2005 05:01:24 PM UTC: 
     25{{{ 
     26Unfortunately there is nothing to fix here :( If the destination  
     27directory exits, MC decides to use copy_dir_dir() to perform the  
     28task. What you ask should be fully implemented from scratch. In  
     29fact move_dir_dir() is quite simplistic. 
     30}}} 
    2331 
    24 empty, but this should not matter. i don't think we want this susv3- 
    25 compliant behavior. at the top level, if the target is an existing  
    26 directory (empty or not), we want to move into this directory (like  
    27 we currently do). once we started recursing, we just merge into  
    28 existing directories. 
    29 frankly, move should behave just like copy. i think it would even  
    30 make sense to merge move into copy with an additional flag. if a  
    31 real move succeeds, skip the recursion. if it fails, do a recursive  
    32 copy+delete. because of the recursion, a real move is attempted at  
    33 every level - exactly what we want. 
    34         Oswald Buddenhagen <ossi> 
    35 Tue 12 Jul 2005 11:53:46 AM UTC, comment #3: 
     32Comment 2 by Oswald Buddenhagen <ossi> at Mon 11 Jul 2005 05:09:14 PM UTC: 
     33{{{ 
     34yes, indeed. i even started developing an algorithm to post here,  
     35but stopped because the existance checks and file/dir  
     36discrimination started turning the few lines into real work. :)= 
     37anyway, the basic idea is: when a move fails, if the source is a  
     38file, move via copy, otherwise create the target dir (if missing)  
     39and recursively call the move function for all files in the source  
     40dir. or something like that. :) 
     41}}} 
    3642 
     43Comment 3 by Pavel Tsekov <ptsekov> at Tue 12 Jul 2005 11:53:46 AM UTC: 
     44{{{ 
    3745Does `bar/name/' contain any entries or is it empty ? I ask this  
    3846question because of the following paragraph in the description of  
     
    5260So if we have an empty destination directory we could perform an  
    5361efficient move instead of copying . It is as simple as that. 
    54         Pavel Tsekov <ptsekov> 
    55 Project Administrator 
    56 Mon 11 Jul 2005 05:09:14 PM UTC, comment #2: 
     62}}} 
    5763 
    58 yes, indeed. i even started developing an algorithm to post here,  
    59 but stopped because the existance checks and file/dir  
    60 discrimination started turning the few lines into real work. :)= 
    61 anyway, the basic idea is: when a move fails, if the source is a  
    62 file, move via copy, otherwise create the target dir (if missing)  
    63 and recursively call the move function for all files in the source  
    64 dir. or something like that. :) 
    65         Oswald Buddenhagen <ossi> 
    66 Mon 11 Jul 2005 05:01:24 PM UTC, comment #1: 
     64Comment 4 by Oswald Buddenhagen <ossi> at Tue 12 Jul 2005 01:09:19 PM UTC: 
     65{{{ 
     66> Does `bar/name/' contain any entries or is it empty ? 
     67> 
    6768 
    68 Unfortunately there is nothing to fix here :( If the destination  
    69 directory exits, MC decides to use copy_dir_dir() to perform the  
    70 task. What you ask should be fully implemented from scratch. In  
    71 fact move_dir_dir() is quite simplistic. 
    72         Pavel Tsekov <ptsekov> 
    73 Project Administrator 
    74 Mon 11 Jul 2005 03:44:56 PM UTC, original submission: 
     69empty, but this should not matter. i don't think we want this susv3- 
     70compliant behavior. at the top level, if the target is an existing  
     71directory (empty or not), we want to move into this directory (like  
     72we currently do). once we started recursing, we just merge into  
     73existing directories. 
     74frankly, move should behave just like copy. i think it would even  
     75make sense to merge move into copy with an additional flag. if a  
     76real move succeeds, skip the recursion. if it fails, do a recursive  
     77copy+delete. because of the recursion, a real move is attempted at  
     78every level - exactly what we want. 
     79}}} 
    7580 
    76 situation: 
    77 foo/name/file exists. 
    78 bar/name/ exists. 
    79 both on the same partition. 
    80 you're in "foo/", cursor over "name". 
    81 press <f6>, enter "../bar", confirm. 
    82 effect: file is moved by copying. this is because mc incorrectly  
    83 diagnoses a cross-device move. 
    84 the code in question is file.c, move_file_file() & move_dir_dir(). 
    85 when fixing, please consider the case of moving a tree where only a  
    86 subtree is on another device. but maybe it was already considered. :)  
     81Comment 5 by Pavel Tsekov <ptsekov>: 
     82{{{ 
     83A really fast move can happen only under the circumstances  
     84described in the quoted text - everything else will be suboptimal.  
     85I don't want to block any attempts to move the directory if the  
     86existing directory is not empty, but it cannot be performed as  
     87fast. The more dupicate directories exist the performance will get  
     88worse (in large trees). 
    8789}}}