Skip to main content

Senior Web Engineer. Open web / music. Remote DJ. Tall Dutch guy. #3million

micro.blog/sander

svandragt

mixcloud.com/cloudseer

 

Resolve Conflicted Files That Don't Exist

Download VisualSvn Server, open a command prompt and type svn resolved -R . to resolve all conflicts, then commit again.

 

Combining multiple Subversion repositories

This post describes a step by step guide on how to combine multiple Subversion repositories whilst keeping individual history (and commit messages).

Dumping

Exporting from pagefeedbacktool repository the /trunk/public folder and integrating that into the services repository under /trunk/public/pagefeedback:

Dump the repository including only /trunk/public as follows:

E:\\Repositories\\pagefeedbacktool>svnadmin dump .| svndumpfilter include --drop-empty-revs --renumber-revs trunk/public > ..\\services\\filtered.dump

Loading

However as pathnames are stored as part of the dump (and replacing the path with a texteditor corrupts the dump), we have to include the full path under a different parent directory:

In VisualSVN create a /trunk/public/pagefeedback/trunk/public folder structure (try without the final public if import fails) then load the dump as follows:

E:\\Repositories\\services>svnadmin load . --parent-dir "trunk/public/pagefeedback" < filtered.dump

The dump is successful but at the wrong path:

currently: /trunk/public/pagefeedback/trunk/public
should be: /trunk/public/pagefeedback/

Post-correction

Open two Windows Explorer windows with both paths side by side, select all the files that should be moved, then RIGHT click drag them to the destination folder and choose SVN Move versioned files here...

Commit from the repository root.

It is now safe to remove the trunk/public folders under /trunk/public/pagefeedback/

Commit again.

 

Subversion repository creation rule

Do not use capitals for repository names!
Because when checking out a working copy you will have to specify the respository url case sensitive. Failing to provide the correct case sensitive name result in things might appear to work but you might get access forbidden messages for certain users in some point, and other mysterious errors, such as the svn commit error below:

access to '/svn/project/!svn/act/c50e0f11-eec3-154a-9695-20ec222ad7f3' forbidden

 

Fixing Trac after upgrading VisualSVN

If you upgraded VisualSVN Server like I have today to 1.61 and have Trac installed as per VisualSvn+Trac then you’ll notice Trac stopped working.

To fix this, follow this part of the instructions:

Add following line at the top of file C:\Program Files\VisualSVN Server\httpd-wrapper.bat:

set PYTHONHOME=%~dp0\Trac\python

Update: Later updates to VisualSvn Server break Trac.

 

TracFogbugzPlugin 0.9u-py2.5 Patch for Trac 0.11

If you use both VisualSvn + Trac (or another flavour of Subversion and Trac), and tried to integrate them with Fogbugz , you will have tried the TracFogbugzPlugin.

Trying to get this to work isn’t straightforward as it’s not compatible with Trac 0.11. You will come across the following error:

Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\trac\web\api.py", line 339, in
send_error
'text/html')
File "C:\Python25\Lib\site-packages\trac\web\chrome.py", line 684, in
render_template
data = self.populate_data(req, data)
File "C:\Python25\Lib\site-packages\trac\web\chrome.py", line 592, in
populate_data
d['chrome'].update(req.chrome)
File "C:\Python25\Lib\site-packages\trac\web\api.py", line 168, in
__getattr__
value = self.callbacks[name](self)
File "C:\Python25\Lib\site-packages\trac\web\chrome.py", line 460, in
prepare_request
for category, name, text in contributor.get_navigation_items(req):
File
"c:\Python25\lib\site-packages\tracfogbugzplugin-0.9u-py2.5.egg\fogbugz\fogb
ugz.py", line 22, in get_navigation_items
yield 'mainnav', 'fogbugz', Markup('<a href="%s">FogBuz</a>',
self.baseurl)
LookupError: unknown encoding: >/">https://<<myurl>>/

To fix this line 22 needs changed, to read:

yield 'mainnav', 'fogbugz', Markup('<a href="%s">FogBuz</a>'%self.baseurl)

Or download the file below and use it as part of the installation instructions (if this is your first Python Egg you want to read about installing Trac plugins. ;)

Now it is loading but the plugin doesn't seem to work, haha.

Download: Patched tracfogbugzplugin-09u-py25