7

There is a project which had an svn server that is down now, but the trac-browser is still available. Is there a simple way to acces that tree as if it was an svn server? Preferably I'd just donwload the whole repo via git-svn, but a wget solution for the current revision would also be great (the trouble with the latter is that simply crawling will download including trac's wrapped around html).

Tobias Kienzler
  • 25,759
  • 22
  • 127
  • 221
  • Huh? Where does Trac get its info from if the svn server is down? – Pekka Jul 31 '10 at 10:41
  • @Pekka good question.. on the other hand I haven't used trac a lot, so maybe it is still there and I just don't know it's location. What would be the default? The browser URL is http://www.mistaril.com/trac/browser/ btw – Tobias Kienzler Jul 31 '10 at 10:47
  • I don't know Trac at system level so I don't know whether it does any caching. But you should be able to find out in Trac's admin which repo it is accessing. As for a wget solution, you could get hold of each file using the `format=raw` link to the footer of each page... But that's probably not very convenient, either. – Pekka Jul 31 '10 at 10:52
  • @Pekka It's not my trac so I can't access admin. As a workaround, using wget (and seq) I downloaded the changesets from that trac site, now all I need to do is finding out [How to apply a patchfile such that it creates new files if needed](http://stackoverflow.com/questions/3377873/how-to-apply-a-patchfile-such-that-it-creates-new-files-if-needed) – Tobias Kienzler Jul 31 '10 at 11:30
  • What do you actually want to do? All Trac does (absent any caching) is read the svn server. Do you just want to get the code? How about emailing the admin? – Joel J. Adamson Aug 02 '10 at 13:03

1 Answers1

3

Depending on the Trac server configuration, you may find a "zip" link at the bottom of the source browser for the trunk directory and the branches and tags subdirectories. That will give you a zip archive of that tree at the given revision.

I know I've seen someone write a tool to download a source tree from the Trac browser, but I can't seem to find it. Might have been a post to the trac-dev mailing list.

retracile
  • 12,167
  • 4
  • 35
  • 42
  • The tree itself cannot be downloaded (at least in this case), but the changeset can, so I had to use a little for-loop and wget (as mentioned in my comment). Using zip instead of patchfiles did however circumvent my [other problem](http://stackoverflow.com/questions/3377873/how-to-apply-a-patchfile-such-that-it-creates-new-files-if-needed) – Tobias Kienzler Aug 11 '10 at 08:33
  • @Mostafa it's on `Size` column on the `trunk`row – madx Mar 30 '17 at 17:10