Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 17/05/17 22:46, 積丹尼 Dan Jacobson wrote:
> PB> So this is working across file systems
> Yes.
>>> '/home/jidanni/jidanni.org/location/grow/programs' -> '/tmp/programs'
> This says to me "I, the mv command, have just moved A to B.
>
> PB> create dir /tmp/programs
> If that (create B) is what it is doing in that step, then it should not
> mention the unrelated A.
>
>>> '/home/jidanni/jidanni.org/location/grow/programs/grow.tgz' ->
>>> '/tmp/programs/grow.tgz'
> This says to me "I am moving A/C to B/C". But there is no more A... at
> least that is what the user thinks... so how could it still move it.
>
>
> PB> I suppose we could distinguish the creation operations, though
> PB> note if the first attempted rename() worked for the source dir,
> PB> then there would have been just a single operation output like:
>
> PB> '/home/jidanni/jidanni.org/location/grow/programs' -> '/tmp/programs'
>
> Well all I know is if the user always can do something on one line, then he
> would expect a consistent number of -v output lines.
Well I'm not sure about having a consistent number of output lines,
but I do see that the output can be confusing. The attached patch
distinguishes the different operations for mv, as follows:
$ mkdir /tmp/mv-test && touch /tmp/mv-test/file
$ src/mv -v /tmp/mv-test .
created directory './mv-test'
copied '/tmp/mv-test/file' -> './mv-test/file'
removed '/tmp/mv-test/file'
removed directory '/tmp/mv-test'
$ src/mv -v mv-test mv-test-2
renamed 'mv-test' -> 'mv-test-2'
$ src/mv -v mv-test-2/file mv-test-2/file2
renamed 'mv-test-2/file' -> 'mv-test-2/file2'
cheers,
Pádraig