Is it possible to get SVN path from a file?
This file is under SVN control and not in the workspace. I would like to store the SVN path in my database.
The ‘files/folder meta info’ didn’t expose this info. Or an I overlooking somthing?
Hi @Johnny_Gel , I don’t think Knime’s current nodes are able to read svn path. To do that, Knime would have to support svn and I don’t think there is any Knime extension that supports svn.
Just like for your OS, you can only see the svn path if you have an svn client installed. If I recall (haven’t used svn for ages), you can’t see the svn path directly from your OS list file. You have to run an svn command to see that. Or sometimes when you install a GUI client, it may integrate with your File Explorer UI as an option, but in the background it would be executing that svn command.
That being said, I don’t quite get what you are trying to do. I mean, what is the purpose of trying to get the svn path from a file? May be if you explain a bit more, we can provide some alternative ways.
I had the same thought as you have.
Yes the path is exposed by the SVN client I have installed to the windows explorer. In my case turtoiseSVN.
The purpose of this is to store the path of the data source file. This raw data source is stored on a SVN server. I would like to store this location in my database with measurement data. It will create traceability to the data source.
Hi @Johnny_Gel , I see, thanks for the additional information.
I think you could do a combination of Windows and Knime in this case.
You can extract the svn path using the command line via a batch file. TortoiseSVN provides command line capabilities, but is not installed by default. There is a “command line client tools” option during installation.
You can create a batch file that would run
svn info for each of your project and redirect the results to a file, and then you can parse that file to extract the paths, and write them to a db table.
You can even use Knime to build the batch file if needed.
EDIT: Also, can you tell us what do you wish to capture in the database? I suppose some project name as readable identifier, and the local path (the checked out version, although you could have multiple ones), and the svn path? I’m assuming the svn path would be without the protocol (https / svn+ssh)?
Alternatively, if all of this is independent from what’s on the local, you can always execute the command
svn ls. This would list all the repos on the svn server. I don’t remember if it would show the path, but you can build the path based on this list if it does not show the path. Save the results to a file, and manipulate via Knime and save to db.
Unfortunately the command line tools are not installed.
The purpose is to have traceability of measurement data file. These files are stored on a SVN server. With the svn path (with or without protocol that doesn’t make a different) I have a traceability to the raw data files of the measurement.
Hi @Johnny_Gel , as I mentioned:
So, you can just add this option. If you cannot add this option to the already installed TortoiseSVN, worst case would be to just re-install TortoiseSVN and choose that option.
With the command line, you will be able to get something written in a file that you can then parse. Without the command line, you will only see this info through the UI, which you can only get into a file if you manually copy and paste them.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.