Reputation:
Using TortoiseSVN (a command line solution is OK too), without creating a folder on the repository side, what are the steps to checkout a single file, edit and check back in with comments?
Upvotes: 6
Views: 26795
Reputation: 453
I'm guessing this particular feature was not available when this question was asked, but on my currently installed version (TortoiseSVN 1.14.7, Build 29687
) I do see an Edit
context menu in Repository Browser when I right-clicked on on XML file. When you save the file in the opened editor (Win11 Notepad in my case), and exit the program, a commit comment window popped up allowing me to check the file back in!...
Sorry for such a late resurrection but let me add this for the googlers coming here after 15+ years! :)
When I tried to use the feature for a PNG file (for which an "Edit" shell command was not defined on my computer), it showed me a file selector to pick a .exe
. So I'm guessing Tortoise tries to find and trigger the Edit
shell command for the file type, and if one is not available, it lets you pick up an editor application - haven't tested, and couldn't find relevant doc unfortunately)
(Feature was added probably(?) in version 1.5.0-alpha1
according to ChangeLog).
Upvotes: 0
Reputation: 99
You have a file single.txt you want to commit.
The right procedure is :
cd /path/destination_directory
svn up
svn commit single.txt -m "Insert here a commit message"
Hope this will help.
Upvotes: 1
Reputation: 121
This is possible with TortoiseSVN, but you must checkout the parent directory as well:
Upvotes: 2
Reputation: 4568
AFAIK you cannot get a copy of a single file from SVN, a working copy is always a directory. So you will need to check out a whole folder in order to edit the file in question and then commit.
This was the case some time back (less than 3 months) and I doubt it has changed since then.
Upvotes: 5
Reputation: 191048
OR
Refer to Stack Overflow question Checkout one file from Subversion.
Upvotes: 3
Reputation: 13421
To check out a single file, you'll still need to check out its parent directory. From the command line, to check out https://svn.example.com/trunk/myfolder/index.html
:
svn co https://svn.example.com/trunk/myfolder/ --depth empty
svn up myfolder/index.html
Now, you can edit and commit this file as usual, without checking out anything else.
TortoiseSVN also includes "checkout depth" in its svn checkout menu option; however, I don't know of a way to make Tortoise do svn up filename
on a file that doesn't exist.
Upvotes: 3