absolute URL in checkouts prevents opening their branch from another machine

Bug #572405 reported by Alexander Belchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

C:\work\Bazaar\plugins\scmproj>bzr push bzr+ssh://bialix@cvv/home/bialix/.bazaar/plugins/scmproj/
Connected (version 1.99, client OpenSSH_5.1)
Authentication (publickey) successful!
Secsh channel 1 opened.
bzr: ERROR: Invalid url supplied to transport: "file:///home/bialix/.bazaar/plugins/scmproj/.bzr/branches/v2/": Win32 file urls
start with file:///x:/, where x is a valid drive letter

C:\work\Bazaar\plugins\scmproj>bzr push sftp://bialix@cvv/home/bialix/.bazaar/plugins/scmproj/
Connected (version 1.99, client OpenSSH_5.1)
Authentication (publickey) successful!
Secsh channel 1 opened.
[chan 1] Opened sftp connection (server version 3)
bzr: ERROR: Invalid url supplied to transport: "file:///home/bialix/.bazaar/plugins/scmproj/.bzr/branches/v2/": Win32 file urls
start with file:///x:/, where x is a valid drive letter

Remote location has a working tree.

Tags: win32
Revision history for this message
Alexander Belchenko (bialix) wrote :
Download full text (4.2 KiB)

РџС‚ 2010-04-30 18:13:23 +0300
0.265 bazaar version: 2.1.1
0.265 bzr arguments: [u'push', u'bzr+ssh://bialix@cvv/home/bialix/.bazaar/plugins/scmproj/']
0.328 looking for plugins in C:\work\Bazaar\plugins
0.546 looking for plugins in C:/Program Files/Bazaar/plugins
0.671 encoding stdout as sys.stdout encoding 'cp866'
0.781 opening working tree 'C:/work/Bazaar/plugins/scmproj'
1.000 bzr-svn: using Subversion 1.6.6 ()
1.203 falling back to default implementation
1.203 failed to load system host keys: [Errno 2] No such file or directory: 'C:\\Documents and Settings\\modul98/.ssh/known_hosts'
[ 3028] 2010-04-30 18:13:24.733 INFO: Connected (version 1.99, client OpenSSH_5.1)
1.734 Trying SSH agent key 69DE0146E3CD769AE60602F7192D0EB5
[ 3028] 2010-04-30 18:13:25.280 INFO: Authentication (publickey) successful!
[ 3028] 2010-04-30 18:13:25.296 INFO: Secsh channel 1 opened.
2.828 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 853, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1055, in run_bzr
  File "bzrlib\commands.pyo", line 661, in run_argv_aliases
  File "bzrlib\commands.pyo", line 665, in run_direct
  File "bzrlib\cleanup.pyo", line 122, in run_simple
  File "bzrlib\cleanup.pyo", line 156, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 1146, in run
  File "bzrlib\push.pyo", line 141, in _show_push_branch
  File "bzrlib\bzrdir.pyo", line 1249, in push_branch
  File "bzrlib\remote.pyo", line 334, in open_branch
  File "bzrlib\branch.pyo", line 2040, in open
  File "bzrlib\bzrdir.pyo", line 842, in open
  File "bzrlib\transport\__init__.pyo", line 1589, in get_transport
  File "bzrlib\transport\__init__.pyo", line 1612, in _try_transport_factories
  File "bzrlib\transport\local.pyo", line 76, in __init__
  File "bzrlib\urlutils.pyo", line 267, in _win32_local_path_from_url
InvalidURL: Invalid url supplied to transport: "file:///home/bialix/.bazaar/plugins/scmproj/.bzr/branches/v2/": Win32 file urls start with file:///x:/, where x is a valid drive letter

2.843 Transferred: 1KiB (0.7K/s r:0K w:0K)
2.843 return code 3

РџС‚ 2010-04-30 18:14:09 +0300
0.281 bazaar version: 2.1.1
0.281 bzr arguments: [u'push', u'sftp://bialix@cvv/home/bialix/.bazaar/plugins/scmproj/']
0.328 looking for plugins in C:\work\Bazaar\plugins
0.578 looking for plugins in C:/Program Files/Bazaar/plugins
0.703 encoding stdout as sys.stdout encoding 'cp866'
0.812 opening working tree 'C:/work/Bazaar/plugins/scmproj'
1.062 bzr-svn: using Subversion 1.6.6 ()
1.125 falling back to default implementation
1.125 failed to load system host keys: [Errno 2] No such file or directory: 'C:\\Documents and Settings\\modul98/.ssh/known_hosts'
[ 3700] 2010-04-30 18:14:10.312 INFO: Connected (version 1.99, client OpenSSH_5.1)
1.640 Trying SSH agent key 69DE0146E3CD769AE60602F7192D0EB5
[ 3700] 2010-04-30 18:14:10.858 INFO: Authentication (publickey) successful!
[ 3700] 2010-04-30 18:14:10.875 INFO: Secsh channel 1 opened.
[ 3700] 2010-04-30 18:14:10.905 INFO: [chan 1] Opened sftp connection (server version 3)
1.828 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 853, in exception_to_return_code
  File "bz...

Read more...

Changed in bzr:
importance: Undecided → Critical
Revision history for this message
Alexander Belchenko (bialix) wrote :

I don't know what is wrong here, really.

Changed in bzr:
status: New → Confirmed
tags: added: win32
Changed in bzr:
importance: Critical → Undecided
status: Confirmed → Invalid
Revision history for this message
Alexander Belchenko (bialix) wrote :

Oh, I see. Absolute path to lightweight checkout! Again! And my favorite colo plugin becomes show-stopper for inter-machines push/pull. Argh!

Revision history for this message
Alexander Belchenko (bialix) wrote :

But error message is *so* unhelpful!

Revision history for this message
Neil Martinsen-Burrell (nmb) wrote : Re: [Bug 572405] Re: push from windows machine to linux is broken

On 2010-04-30 10:21 , Alexander Belchenko wrote:
> Oh, I see. Absolute path to lightweight checkout! Again! And my favorite
> colo plugin becomes show-stopper for inter-machines push/pull. Argh!

Is there anything I could change in colo to make this better? There was
some discussion recently on whether to store relative or absolute paths
for branch locations, but I think that needs to be taken care of in bzr
core.

Revision history for this message
Martin Pool (mbp) wrote :

There was a recent thread about this "[RFC] prohibit push to lightweight checkout" (I think it's the same issue.)

One option: give a warning when opening a file URL relative to a remote URL. There may be some false hits so we could start with just a warning.

Another option: always store a relative URL; I put up a branch for this but people raised the concern that this would cause trouble if they move their checkouts to a different directory. Perhaps that is a less important case or a less problematic breakage than this.

summary: - push from windows machine to linux is broken
+ absolute URL in checkouts prevents opening their branch from another
+ machine
Changed in bzr:
importance: Undecided → Medium
status: Invalid → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.