5

My boss wants us to use subversion for our MS Word documentation. The idea is, only our department has access to the Word documents, so we update and commit changes to them.

But we want to share these documents with certain other people in our company. We use confluence to control access.

Currently, when we update the Word document, we commit to SVN and then update the attachment (viewed as a page) in Confluence. This allows us to email a URL to a certain document, and only permits people with the correct permissions in Confluence to see it. This is what we want.

Is there any way to have Confluence reference the most recent version of the file specified in SVN? I would like to commit changes to SVN and have users always see the most recent version in Confluence.

TylerH
  • 20,799
  • 66
  • 75
  • 101
jeph perro
  • 6,242
  • 26
  • 90
  • 124

6 Answers6

3

This request can't be satisfied, because you're asking for features that span from other products by Atlassian. The closest match to this request is to embed links to Atlassian Fisheye in Confluence, going through one layer of indirection ([Confluence]->[Fisheye]->[SVN]).

Actual Confluence integration for SVN does not exist, because it falls outside the bounds of Confluence's product scope. Instead, Atlassian provides other tools for this purpose, like Fisheye and JIRA, to interface with SVN directly.

If you would like to develop a service stack that comes as close as possible to your boss' original request, consider following this tutorial for establishing the full, integrated suite that Atlassian provides. Anything beyond this should be looked into by way of plugins from the community or from the company itself.

(Full disclosure: I neither work for Atlassian nor have any pre-existing business relationship with them. I've simply used their software within companies to whom I've been employed.)

MrGomez
  • 23,788
  • 45
  • 72
2

I think there is no plugin for this case but possibly you can write a small shell script that uses the Confluence CLI to push changed files as an attachment to the specified pages in Confluence.

Christian Koch
  • 701
  • 7
  • 16
0

MS Sharepoint has all the features you need (document versioning plus restricted access all built in, with a web interface) and it's free (or at least, the foundation version is, which will do what you want)

Kristian Glass
  • 37,325
  • 7
  • 45
  • 73
ciro
  • 1
  • 2
0

I would recommend adding a post-commit hook in SVN on the server.

@echo off
SET SVNLOOK=C:\Program Files\CollabNet Subversion Server\svnlook.exe
SET GREP=D:\SVN\Repo\hooks\grep.exe

REM Write a list of modified *.doc files to a .log file
("%svnlook%" changed -t %2 %1 | "%grep%" "^U.*\.doc$" > %2.log)

REM ----------------------------------------
REM Here, you would use the file "%2.log" to push the updated word documents.
REM ----------------------------------------

REM Clean up the .log file
del %2.log
John Gietzen
  • 48,783
  • 32
  • 145
  • 190
0

I would abandon the whole idea and then

  1. Import your word docs as pages in Confluence (I do keep in mind that if you have a large number of documents this might seem like a mundane task)
  2. Use Confluence permission management to control access... you can bind the user management to MS Active Directory and other directory services.

This way you have both 1) a rather handy permission control system and 2) version control system for your documents.

0

Couldn't just you write an SVN post commit hook that checks for a given repo or a given file extension and that then updates the attachmentdata table in your confluence database directly ?

  1. You pass into the binary location to svnlook along with the repsitory name and the revision number.
  2. Then you run svnlook to get a list of changed files.
  3. Then you filter the files so that only word documents are listed.
  4. Then for each file you get the filename and filepath.
  5. From the filename you get the file data.
  6. Then you run SQL to update the relevant attachmentdata entry.

A beginners guide for Post Commit Hooks is available at Subversion Post-Commit Hooks 101 and additional information is avaliable at the following Stackoverflow questions:

Community
  • 1
  • 1
Appleman1234
  • 15,946
  • 45
  • 67