Hi.
sorry... hunted for a bug tracker, couldn't find one. First time
using svnmerge I ran into a bug which looks like a rare edge case (but
also one that should be easy to fix). Here is a failing test
(attached) and the traceback it exposes below. In a nutshell: made a
branch from trunk, say "work_foo", then moved that branch to
"release_candidate_foo" ... svn merge in release_candidate_foo gets
confused because work_foo is deleted in head (specifically, `svn info
"dead_branch_url"` fails inside svnmerge.py).
PS> you will need `easy_install fixture` to run the test
Traceback (most recent call last):
File "/Users/kumar/bin/svnmerge.py", line 1962, in ?
main(sys.argv[1:])
File "/Users/kumar/bin/svnmerge.py", line 1957, in main
cmd(branch_dir, branch_props)
File "/Users/kumar/bin/svnmerge.py", line 1451, in __call__
return self.func(*args, **kwargs)
File "/Users/kumar/bin/svnmerge.py", line 1125, in action_merge
find_reflected=opts["bidirectional"])
File "/Users/kumar/bin/svnmerge.py", line 960, in analyze_source_revs
return analyze_revs(target_dir, source_url, base, end_rev, **kwargs)
File "/Users/kumar/bin/svnmerge.py", line 914, in analyze_revs
logs[url] = RevisionLog(url, begin, end, find_reflected)
File "/Users/kumar/bin/svnmerge.py", line 297, in __init__
repos_path = target_to_repos_relative_path(url)
File "/Users/kumar/bin/svnmerge.py", line 754, in
target_to_repos_relative_path
root = get_repo_root(target)
File "/Users/kumar/bin/svnmerge.py", line 734, in get_repo_root
return info["Repository Root"]
KeyError: 'Repository Root'
from fixture import TempIO
from subprocess import call
def test_deleted_branch_confuses_merge():
tmp = TempIO()
call(['svnadmin', 'create', tmp.join('repos')])
repos = tmp.join('repos')
call(['svn', 'mkdir', "file://%s/trunk" % repos, '-m', "making trunk"])
call(['svn', 'co', "file://%s/trunk" % repos, "trunk"], cwd=tmp)
tmp.putfile("trunk/foo.py", "pretend this is code")
call(['svn', 'add', "foo.py"], cwd=tmp.join("trunk"))
call(['svn', 'ci', "-m", "adding foo"], cwd=tmp.join("trunk"))
call(['svn', 'mkdir', "file://%s/branches" % repos,
'-m', "making branches"])
call(['svn', 'cp', ".", "file://%s/branches/branch1" % repos, '-m',
"making branch1 from trunk"], cwd=tmp.join("trunk"))
# make a branch from a branch and delete the old one :
call(['svn', 'mv',
"file://%s/branches/branch1" % repos,
"file://%s/branches/branch2" % repos,
'-m', "branch1 is now known as branch2"],
cwd=tmp.join("trunk"))
call(['svn', 'co', "file://%s/branches/branch2" % repos, "branch2"],
cwd=tmp)
call(['svnmerge.py', 'init'], cwd=tmp.join("branch2"))
call(['svn', 'ci', "-F", "svnmerge-commit-message.txt"],
cwd=tmp.join("branch2"))
r = call(['svnmerge.py', 'merge'], cwd=tmp.join("branch2"))
assert r == 0
if __name__ == '__main__':
test_deleted_branch_confuses_merge()_______________________________________________
Svnmerge mailing list
[email protected]
http://www.orcaware.com/mailman/listinfo/svnmerge