Possibly over-cautious check in workingtree_4.py?

John Arbash Meinel john at arbash-meinel.com
Wed Aug 22 22:42:50 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Blake Winton wrote:
> Hello,
> 
> I'm attempting to convert my subversion repository to bazaar, and have
> run into a couple of problems.  First, (as I've already mentioned to
> Gustavo Niemeyer) it seemed to have some empty Node-path:s, which caused
> svn2bzr to fail in interesting ways.  Patching my way around that, I ran
> into the next problem, which is that I'm trying to add a file named
> "rcp2pr... #segment.0020#".
> 
> Naturally, it's triggering the assert "'..' not in f" in
> workingtree_4.py", line 162, in _add.
> 
> I've changed the assert on my local copy to:
>             assert not f.startswith( '..' )
>             assert '//..' not in f
> Which I think should be good enough, but I'ld like confirmation that
> this seems like a semi-sane thing to do before I go ahead and submit a
> bundle/bug report.
> 
> Anyone see any glaring problems with my idea?
> 
> Thanks,
> Blake.
> 
> 

I think that should be:

assert not f.startswith('../')
assert '/../' not in f

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzK3aJdeBCYSNAAMRArcbAKC28NDYf3Lz6z0k5yBZRDphlj/avgCcDQkh
XkY0iLU4KIMj2cHoRtldc+U=
=GRGU
-----END PGP SIGNATURE-----



More information about the bazaar mailing list