mercurial/hg.py
branchstable
changeset 34957 b64ea7fb9599
parent 34879 7d51a7792f52
child 35340 773a9a06047c
equal deleted inserted replaced
34956:f445b10dc7fb 34957:b64ea7fb9599
   241 
   241 
   242     if relative:
   242     if relative:
   243         try:
   243         try:
   244             sharedpath = os.path.relpath(sharedpath, destvfs.base)
   244             sharedpath = os.path.relpath(sharedpath, destvfs.base)
   245             requirements += 'relshared\n'
   245             requirements += 'relshared\n'
   246         except IOError as e:
   246         except (IOError, ValueError) as e:
       
   247             # ValueError is raised on Windows if the drive letters differ on
       
   248             # each path
   247             raise error.Abort(_('cannot calculate relative path'),
   249             raise error.Abort(_('cannot calculate relative path'),
   248                               hint=str(e))
   250                               hint=str(e))
   249     else:
   251     else:
   250         requirements += 'shared\n'
   252         requirements += 'shared\n'
   251 
   253