Subversion: How to get a list of all active, unmerged branches

First, you have to take list all branches in the HEAD revision:

svn list repo/branches/ -r HEAD

And then, you have to loop through results, and check mergeinfo. Here is a script that you can save as *.bat file:

@echo off

for /f %%b in ('svn list repo/branches -r HEAD') do call :revisions %%b

exit /b

:revisions
for /f %%r in ('svn mergeinfo --show-revs eligible repo/branches/%1 repo/trunk') do (
    echo repo/branches/%1
    exit /b
)

I'm using a :revision subroutine here, because I want to exit it when I see the first revision available to merge. That's why this program won't print duplicate branches.