AnkhSvn doesn't add files to SVN
Asked Answered
M

1

13

This is a known issue - when files are added using Ankh, they are not really added to SVN. Many a times this has caused problems, for instance when committing later through TortoiseSvn only to find missing files, or when creating a patch.

Is there a workaround, or some plans to fix this is a future Ankh release?

Edit - to clarify, when I commit using Ankh, the files are really added. But if the commit is not done using Ankh, the files are not added (unlike other SVN operations which do carry over).

Mazarin answered 31/12, 2009 at 11:11 Comment(6)
What vesrion of Vis Studio? I had similar problems with 2005 and AnkhSVN, but the latest for VS2008 works remarkably well. At the risk of sounding unhelpful, perhaps a reinstall might solve your problem?Malaco
I've always assumed this was just the way it is (badly) designed to work. Add the file and then commit your add. If you add files though tortoise isn't the behaviour the same?Malevolent
Adding through tortoise actually 'adds' to SVN. Then if you use a different SVN client to commit or create a patch, it will see those files. Ankh does not (regardless of version - we're using VS2008, Ankh 2.1.7141).Mazarin
Do you mean that when you right-click -> Subversion -> Add them, they don't get added?Fiver
When I create a new file in Visual Studio, it is automatically 'added'. It gets the plus icon, and when I commit from Ankh it gets added and committed. However, these files are not truely added, and are invisible to other tools.Mazarin
they're listed in View -> Pending Changes as "new", "new" and "added" are different things, but they behave the same when committing in AnkhFiver
F
30

I wouldn't say it's a "known issue", because it's not an issue in AnkhSVN in the first place:

First off all, when you commit the "new" files, they're added just in time for the commit. The reason for the "new" status vs the "added" status, is that it makes it easier/cheaper to do renames/moves, something that's very common for new files.

When you go to Tools -> Options -> Source Control -> Subversion Environment, there's a checkbox "Directly add new files to Subversion". This will automatically add new files right away, instead of giving them the "new" status.

Fiver answered 1/1, 2010 at 2:2 Comment(2)
What is the behavior with renamed and deleted files? Can it be configured?Azores
@BatteryBackupUnit: I tried the "Directly add new files" option with VS 2017 and the behavior is fine - I saw no problem with renaming, moving, or deleting. I'm not sure why this is not checked by default.Panache

© 2022 - 2024 — McMap. All rights reserved.