How to copy / move a file through Tortoise?

23 views
Skip to first unread message

Nathan Hartman

unread,
Sep 12, 2018, 3:18:03 PM9/12/18
to TortoiseSVN
Forgive the n00b question but I'm a command line user: How do you copy (or move) a file using the GUI?

There is no Tortoise submenu for Copy / Move.

Using Explorer's Cut / Copy / Paste creates an untracked file (as expected). Adding this file doesn't maintain history.

What's the Tortoise GUI equivalent of the cli's "svn cp from to"?

Stefan

unread,
Sep 12, 2018, 3:44:39 PM9/12/18
to TortoiseSVN
right-drag the file(s) to the destination, then use one of the context menu entries there.
(scroll down to "drag and drop")

Stefan

Nathan Hartman

unread,
Sep 13, 2018, 10:36:13 AM9/13/18
to TortoiseSVN
Thank you for your reply. Now that you mention it, I remember reading that in the docs -- but then I forgot!

Kalen Brown

unread,
Sep 16, 2018, 8:20:26 PM9/16/18
to TortoiseSVN
I would like to tag onto this question with a question for a little more detail on copy with right click and drag in a local working copy (not repo browser operations). The crux of the question is relating to the server creating an additional copy in the history vs it simply creating a pointer, thus changing how much file space is used. This question relates some to the branch/tag operation which is like a copy but only allows the pointer/shortcut option thus preventing modification during copy. As always, this may bleed over to a true SVN question, not specific to TortoiseSVN, but it is how to use TortoiseSVN to get to the SVN operations. I am working on a 500MB Word file (so a binary file in the eyes of SVN) so it is readily apparent if it is uploading the entire file or just establishing a pointer/shortcut by the time it takes as in 5 seconds vs 2 minutes

If you right click and drag in your working copy, you also have the possibility of modifying the file after you right click and drag but before you do the commit of the copy. This modification doesn't really show up clearly in the log (which I think is a bit sad but probably a native SVN thing), it shows up the same as if you did or didn't modify it. There is no way to know just looking at the log if the file was modified during the copy, they all list in the actions column as an "add" but not modify. If there is, it would be great if someone would tell me. Usually I have to double click and do a diff each time if I want to know. I find it interesting that Tortoise nor SVN as any indication or error that the copy had no integrity from source to destination, it replaces with the file you have.

My question is, how can I/can I get TortoiseSVN to recognize that there was not a change in the file if I really don't want to change the file so that it does not have to transmit the entire file contents and save space on the server. 

I also would like to see the ability to enforce/detect no modification during a copy/move before commit and in the log after.

Logs where 1033 doc was done with the branch operation where it didn't transfer the whole file or have a mod, but the others did and it is obvious that a modification occurred because the file extension changed on 1056 from .docx to .pdf and I dropped in the PDF over it to maintain a contiguous log. Sketchy I know, and I am essentially leaning on the fact that SVN is allowing me to do this, but it is by no means a requirement. I just didn't like the PDF pair to the docx showing up with no log behind it, I have no other way to show even superficially where the PDF was converted from other than the commit message or, what I used to do/usually do, commit the docx file and the PDF in the same commi. I did test from the repo browser (and the web browser access via VisualSVN, and it is infact committing the true PDF and not a copy of the Word file):

Revision: 6507
----
Added : /tags/System/QTR-1033_Rev_A.docx (Copy from path: /trunk/System/QTR-1033.docx, Revision, 6506)

Revision: 6505
----
Added : /tags/System/QTR-1056_Rev_B.docx (Copy from path: /trunk/System/QTR-1056.docx, Revision, 6503)
Added : /tags/System/QTR-1056_Rev_B.pdf (Copy from path: /trunk/System/QTR-1056.docx, Revision, 6503)

Revision: 6491
----
Added : /tags/System/QTP-1242/QTP-1242_Rev_B.docx (Copy from path: /trunk/System/QTP-1242.docx, Revision, 6490)
Added : /tags/System/QTP-1242/QTP-1242_Rev_B.pdf (Copy from path: /trunk/System/QTP-1242.docx, Revision, 6490)

Stefan

unread,
Sep 17, 2018, 2:57:35 PM9/17/18
to TortoiseSVN


On Monday, September 17, 2018 at 2:20:26 AM UTC+2, Kalen Brown wrote:

My question is, how can I/can I get TortoiseSVN to recognize that there was not a change in the file if I really don't want to change the file so that it does not have to transmit the entire file contents and save space on the server. 

it does that automatically if you do a move/rename with the TSVN command.
 

I also would like to see the ability to enforce/detect no modification during a copy/move before commit and in the log after.

Logs where 1033 doc was done with the branch operation where it didn't transfer the whole file or have a mod, but the others did and it is obvious that a modification occurred because the file extension changed on 1056 from .docx to .pdf and I dropped in the PDF over it to maintain a contiguous log.

So the file actually changed. So svn did transfer the new file data.
If it wouldn't do that, then the file wouldn't be correct in the repository.

I'm not sure what you have problems with: an svn move/rename is always just a link, but if you also change the file before or after the move/rename, svn also has to transmit those changes.
If you use a rename but actually replace the file with a different one (a pdf is completely different than a docx file), then you don't really expect that svn does only a link and not store the new pdf file data?

Stefan

Reply all
Reply to author
Forward
0 new messages