call site 6 for path.svnurl.__str__
path/svn/testing/test_urlcommand.py - line 26
25
26
27
28
29
30
31
   def test_move_dir(self):  # overrides base class
->     p = self.root.ensure('origdir', dir=1)
       newp = p.dirpath('newdir')
       p.move(newp)
       assert newp.check(dir=1)
       newp.remove()
       assert not p.check()
path/svn/urlcommand.py - line 153
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
   def ensure(self, *args, **kwargs):
       """ ensure that an args-joined path exists (by default as
               a file). If you specify a keyword argument 'dir=True'
               then the path is forced to be a directory path.
           """
       if getattr(self, 'rev', None) is not None:
           raise py.error.EINVAL(self, "revisions are immutable")
       target = self.join(*args)
       dir = kwargs.get('dir', 0) 
       for x in target.parts(reverse=True): 
           if x.check(): 
               break 
       else: 
           raise py.error.ENOENT(target, "has not any valid base!") 
       if x == target: 
           if not x.check(dir=dir): 
               raise dir and py.error.ENOTDIR(x) or py.error.EISDIR(x) 
           return x 
->     tocreate = target.relto(x) 
       basename = tocreate.split(self.sep, 1)[0]
       tempdir = py.path.local.mkdtemp()
       try:    
           tempdir.ensure(tocreate, dir=dir) 
           cmd = 'svn import -m "%s" "%s" "%s"' % (
                   "ensure %s" % self._escape(tocreate), 
                   self._escape(tempdir.join(basename)), 
                   x.join(basename)._encodedurl())
           process.cmdexec(cmd) 
           self._lsnorevcache.delentry(x.strpath)  # !!! 
       finally:    
           tempdir.remove() 
       return target
path/common.py - line 139
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
   def relto(self, relpath):
       """ return a string which is the relative part of the path
           to the given 'relpath'. 
           """
       if not isinstance(relpath, (str, PathBase)): 
           raise TypeError("%r: not a string or path object" %(relpath,))
->     strrelpath = str(relpath)
       if strrelpath and strrelpath[-1] != self.sep:
           strrelpath += self.sep
       #assert strrelpath[-1] == self.sep
       #assert strrelpath[-2] != self.sep
       strself = str(self)
       if strself.startswith(strrelpath):
           return strself[len(strrelpath):]
       return ""