How does Tortoise's non recursive commit work?
Asked Answered
S

10

127

I've checked out a copy of the SVN branch (my branch) locally to which I've merged from a different branch (which has a completely different folder structure). So basically there are a lot of deletions (of old files) and additions (of new files).

When I try to commit the merge to the repository (to my branch), Tortoise says

This commit is not recursive, and there are moved/renamed folders selected for commit. Such moves/renames are always performed recursively in the repository. Do you want to commit anyway?

Is it fine to proceed with this commit? If not, what should I do so that there's no problem?

Also, for some files that I've added, I've made changes after adding (if this affects the nature).

Spine answered 22/10, 2012 at 10:58 Comment(0)
F
144

Found by Google how to fix it: press F5 in the commit window (not in the "warning popup")

See http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2831045 for details.

On 26.08.2011 22:39, Ryan J Ollos wrote:

For several months now I've been seeing the following dialog box appear when initiating Commit. It frequently happens when attempting to commit following a merge.

The thing I have noticed lately however is that if I Cancel and then manually refresh the file list (F5), I don't see the message again when initiating the commit a second time. The commit seems to succeed fine and with no further problems.

The commit dialog monitors the working copy in a background thread for change notifications. Such notifications are sent by the OS in case files are modified/moved/renamed/... If such a notification is received, the commit dialog first does a few checks so it can drop most of them. If the notification indicates that a file that is not checked and not visible in the commit dialog has somehow changed, it switches back to non-recursive committing. That's because if you have e.g. a file open in another editor and save your changes while the commit dialog is open, then that file would get committed as well even though you haven't checked it in the commit dialog (it doesn't show up until you refresh the dialog with F5).

So if you see that warning dialog often, please check if there's another tool/app running which modifies files in your working copy.

And as you noticed: if you hit F5, that 'non-recursive flag' is reset because after a refresh, you see all the files again - even the ones you modified after you started the dialog.

Stefan

Fake answered 7/3, 2014 at 8:4 Comment(3)
The link in the answer seems to be dead. Here's a valid one from the Internet Archive web.archive.org/web/20150306224932/http://…Focal
I just tried pressing F5. The effect is that now, the commit dialog file list shows most of my files twice (with exactly the same path and name), and the warning message still appears when I attempt to commit.Sizable
Thanks for this answer, very informative! What worked for me: I closed the windows/apps where the files could possibly be "unintentionally modified" and voila!Biographical
D
28

I had the same issue but resolved it by reverting changes to files that I had marked to 'ignore-on-commit'

Once I reverted these files, then tortoisesvn was able to commit all the other files from the merge

Defaulter answered 30/5, 2014 at 9:12 Comment(2)
what is an actual reason? why or how are these files causing the problem?Libbylibeccio
Perhaps related to this (but I don't currently have the time to try to find out): I tried committing from one further folder up in the working copy and the message went away.Miscue
Y
6

Is it fine if i proceed with this commit?

No, your commit will ignore all changes in WC-tree and reflect only root-level changes (broken merge).

You made an error when checking out non-recursive initially. You can try to perform good, full commit using --depth infinity parameter in the CLI or find this switch in TortoiseSVN GUI.

svn commit --depth infinity . -m "Merge"
Yell answered 27/10, 2012 at 5:29 Comment(2)
"You made an error when checking out non-recursive initially." No, not necessarily. I checked out my WC the same way I always do, but I'm still having this problem suddenly. In fact, this doesn't seem to be the case for any of the alternate solutions below at all.Elboa
This is completely false. I get this message from time to time and I checked out my working copy recursively in the same way I always didDihydric
E
1

Also for some files that I've SVN-added , I've made changes after adding (If this affects the nature).

In my case that was exactly what caused the message to appear, even I unselected those files for the commit.

Ugly solution which only works safely if just a few files are affected:

  1. Create a copy of the changed files
  2. Revert the changed files
  3. Commit the merge/reintegration
  4. Copy the changed files back to the original place

Reminder to self: only reintegrate a branch if the target (trunk) is clean.

Encomiastic answered 3/11, 2015 at 9:31 Comment(0)
B
1

I just had the same issue. Instead of selecting all the files, I clicked on versioned and everything worked well. In my case, the option versioned selected all the files, so everything is ok now.

Bastien answered 20/7, 2016 at 13:40 Comment(1)
This did the trick for me, none of the other solutions worked.Dobbins
S
1

It looks like TortoiseSVN performs some kind of validity checking before calling commit. Good but the error message is very unclear.

When I faced this issue, I went back to using the svn command line to commit. Commit failed due to the reason that one of the folders was not up to date. After updating just that folder, I ran "svn commit" once again and it went through.

Edit: PS: Before you use try this out, make sure you do not have any files marked as "ignore on commit". "Ignore on commit" is tortoise specific and SVN commit picks these changes as well.

Sappington answered 15/2, 2017 at 23:2 Comment(0)
O
1

Just thought I'd post this because it worked for me...

The reason this happened is because I'd partially renamed one of the new projects I'd created and for some reason they all showed up as "Missing" on the commit screen.

After I removed the project and folder (which SVN had put a tick on) and put it back in as a new project again, suddenly all of the "Missing" had turned into "Added" and the commit ran fine without warning me of anything.

Hope this helps!

Odine answered 11/5, 2017 at 8:15 Comment(0)
M
1

I saw this issue and the cause was a few added files not having the added status for no apparent reason. They were 'normal' even though the parent folder correctly showed as 'added'. I reverted those 'normal' changes and then manually re-did them. This made each added item show up twice in the commit list but it resolved the error and everything appears to be in working order now.

It didn't have anything to do with ignore-on-commit as in another answer, it just seemed like a bug in TortoiseSVN.

Munich answered 2/1, 2019 at 14:27 Comment(2)
From what I can tell, TortoiseSVN doesn't recursively move files. Moving a folder changes the folder history, but not the files therein. This means to move folders with TortoiseSVN you have to recreate the folder in the desired destination, add the folder, then move the contents of the original folder over to the new one. Or just use the command line.Silures
I believe this was from a merge, not a move. Unless those are similar operations, I'm not following.Munich
G
0

The problem could be, that your mergeinfo is deleted by someone or automatically, because the infos moved up in the tree. If you are gonna merge them in again, it will work for the moment. But all others will get problems with their not merged branches. SVN will loose some code and merge already submitted code again.

So reverting those files and changing them again could work, but you should not just commit the changes.

Guimond answered 30/6, 2015 at 14:24 Comment(0)
O
-4

i don't know a option for tortoisesvn but u could use the command line

svn commit --non-recursive [folder]

thats sould work just as u like it to work greeings

Orbital answered 26/10, 2012 at 21:4 Comment(1)
Other answers are saying this will not commit what you actually want to commit.Elboa

© 2022 - 2024 — McMap. All rights reserved.