Skip to content

Initial internal support for DirCopy - #1081

Closed
eharris wants to merge 4 commits into
rclone:masterfrom
eharris:dircopier
Closed

eharris wants to merge 4 commits into
rclone:masterfrom
eharris:dircopier

Conversation

@eharris

@eharris eharris commented Jan 31, 2017

Copy link
Copy Markdown
Contributor

First pass at DirCopy support. Since we have no remotes (yet) that implement this, I can't be sure that I did everything correct. Please check TestFsDirCopy. Comments and corrections invited.

You may want to exclude the changes to local/local.go as that was just a stab at testing.

@ncw ncw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made a few inline comments.

I'm not sure where you are going with this though - do any of the remotes support DirCopy?

If so I'd be much happier merging this with at least one remote DirCopy implemented.

Comment thread MANUAL.html
<h3 id="move">Move</h3>
<p>Used when moving/renaming an object on the same remote. This is known as a server side move of a file. This is used in <code>rclone move</code> if the server doesn't support <code>DirMove</code>.</p>
<p>If the server isn't capable of <code>Move</code> then rclone simulates it with <code>Copy</code> then delete. If the server doesn't support <code>Copy</code> then rclone will download the file and re-upload it.</p>
<h3 id="dircopy">DirCopy</h3>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that you only need to edit docs/content/overview.md - the other files are auto generated when I do a release. See the contribution manual

Comment thread fstest/fstests/fstests.go

// check remotes
// FIXME: Prints errors.
fstest.CheckListing(t, remote, []fstest.Item{})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need the []fstest.Item{} you can just write this.

I think you are expecting a copy, so you would expect

fstest.CheckListing(t, remote, file1, file2)
fstest.CheckListing(t, newRemote, file1, file2)

Wouldn't you?
Though you don't appear to have created any files?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mostly copied from TestFsDirMove which I figured should be pretty similar.

Ideally it would compare that the entire copied directory tree has the same structure, files, sizes, checksums etc, but I'm not sure how to do that cleanly. Is there something already in rclone that I can use for that?

@eharris

eharris commented Jan 31, 2017

Copy link
Copy Markdown
Contributor Author

DirCopy is supported by opendrive, which I am working on. Was just trying to get the internals in place to be ready.

@ncw

ncw commented Apr 22, 2017

Copy link
Copy Markdown
Member

I'm going to close this for the moment - can you resubmit when you've got something which uses it (eg opendrive).

Thanks

Nick_

@ncw ncw closed this Apr 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants