(Thanks in advance, SOers!)
Problem I’m trying to solve
Is there a way (e.g., in bash or in ruby) to read the content of a file on a remote svn repo without first checking it out locally and read it locally, given I have the path to it (e.g., “svn+ssh://svn.something/folder/morefolder/something.txt”)
Things I’ve tried or thought of trying
There isn’t a counterpart for something like more or less as an svn option. Looking at the list of available options for the svn command, the closest possible thing I can think of to achieve this is something along the line of
- Using
svn praise [svn file path], and then - Parse it accordingly (in my program or in bash) to extract what I want out of it.
Additional Note
I’ve googled and looked around on StackOverflow, and it seems like no one else (or at least I haven’t yet come across anyone) has discussed about this problem/usecase. I have a legit reason for this specific need but I do wonder if I’m missing anything in my thought process.
Please let me know if I’m missing any info in this question. Thanks again!
Have you tried svn cat? I believe that’s precisely the functionality you are seeking.
Here’s the documentation
http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.cat.html
This command conveniently outputs the contents of the remote repository URL to stdout.