Possibly over-cautious check in workingtree_4.py?

James Blackwell jblack at merconline.com
Thu Aug 23 00:57:48 BST 2007


Is there no need to use os.sep() ?

On Wed, Aug 22, 2007 at 04:42:50PM -0500, John Arbash Meinel wrote:
> 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
> =:->
> 

-- 
My home page:   <a href="http://jblack.linuxguru.net">James Blackwell</a>
Gnupg 06357400  F-print AAE4 8C76 58DA 5902 761D  247A 8A55 DA73 0635 7400
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070822/dd2600c9/attachment.pgp 


More information about the bazaar mailing list