[Svnmerge] Assertion on svnmerge.py avail

Robert Kiessling tmda-kw-svnmerge.74c2ae at ro.bert.de
Mon Oct 3 03:00:01 PDT 2005


"Giovanni Bajo" <rasky at develer.com> writes:

> Now, as far as I can tell, nor the Python nor the sh version of "svnmerge"
> accept the use of a repository path for the -S parameter.

Ah, so a small documentation issue as well, in both
versions. svnmerge.py says:

  svnmerge avail [-s] [-v] [-l] [-d] [-r revs] [-S src] [-A] [dest]
[...]
   "src" may be a repository path or a working directory.

> The Python version
> produces the traceback you showed us, while the sh version will probably
> abort in some other way. I would appreciate if you could double-check this
> behaviour for me.

Summary: sh version works with the file system path only, python
version doesn't work with any. Here's the output:

Sh version with a repository path:

~/bin/svnmerge avail -S /Homes/branches/AAA
svnmerge: "/Homes/branches/AAA" is not a valid URL or working directory

Sh version with a file system path:

$ ~/bin/svnmerge avail -S ../branches/AAA
404

$ ~/bin/svnmerge avail -S /home/robert/data.vc/Homes/branches/AAA
404

Phython version with a repository path:

$ ~/bin/svnmerge.py avail -S /Homes/branches/AAA
Traceback (most recent call last):
  File "/home/robert/bin/svnmerge.py", line 918, in ?
    main(sys.argv[1:])
  File "/home/robert/bin/svnmerge.py", line 887, in main
    assert is_url(opts["head_url"])
AssertionError

It would be nice to get a more meaningful error message in this case,
like e.g.:

  "/Homes/branches/AAA" should be the working directory of the
  head revision, but does not exist in the file system.

Python version with a file system path:

$ ~/bin/svnmerge.py avail -S ../branches/AAA
Traceback (most recent call last):
  File "/home/robert/bin/svnmerge.py", line 918, in ?
    main(sys.argv[1:])
  File "/home/robert/bin/svnmerge.py", line 884, in main
    opts["head_path"] = url_to_rlpath(head)
  File "/home/robert/bin/svnmerge.py", line 458, in url_to_rlpath
    assert dir[:len(root)] == root
AssertionError

$ ~/bin/svnmerge.py avail -S /home/robert/data.vc/Homes/branches/AAA
Traceback (most recent call last):
  File "/home/robert/bin/svnmerge.py", line 918, in ?
    main(sys.argv[1:])
  File "/home/robert/bin/svnmerge.py", line 884, in main
    opts["head_path"] = url_to_rlpath(head)
  File "/home/robert/bin/svnmerge.py", line 458, in url_to_rlpath
    assert dir[:len(root)] == root
AssertionError

I hope this is clearer now.

Robert



More information about the Svnmerge mailing list