add fails with "No such file" on win32

Bug #379106 reported by mgm
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Low
Unassigned

Bug Description

Under windows XP, bzr add Q:\archive\myfile.txt fails with the message bzr: ERROR: No such file: u'Q:/rchive/myfile.txt`
Changes to existing files can still be committed, but this bug pretty much kills bzr's utility.

Version info:
Bazaar (bzr) 1.14
  Python interpreter: C:\Program Files\Bazaar\python25.dll 2.5.2
  Python standard library: C:\Program Files\Bazaar\lib\library.zip
  bzrlib: C:\Program Files\Bazaar\lib\library.zip\bzrlib
  Bazaar configuration: C:\Documents and Settings\mmartin\Application Data\bazaar\2.0

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

Hi mmartin, thanks for the report.

What happens if you cd to q:\archive and then try 'bzr add myfile.txt'?

summary: - add
+ add fails with "No such file" on win32
Changed in bzr:
status: New → Incomplete
Revision history for this message
mgm (matt-martin-ieee) wrote :

The error happens the same way regardless of CWD . Also happends if tbzr is used.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 379106] Re: add fails with "No such file" on win32

2009/5/21 mgm <email address hidden>:
> The error happens the same way regardless of CWD . Also happends if tbzr
> is used.

Could you please post the traceback shown by 'bzr -Derror add myfile.txt'?

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
mgm (matt-martin-ieee) wrote :

I guess the email reply didn't work. Here is the traceback:

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 727, in exception_to_return_code
  File "bzrlib\commands.pyo", line 922, in run_bzr
  File "bzrlib\commands.pyo", line 559, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 587, in run
  File "bzrlib\mutabletree.pyo", line 52, in tree_write_locked
  File "bzrlib\mutabletree.pyo", line 392, in smart_add
  File "bzrlib\osutils.pyo", line 1728, in file_kind
NoSuchFile: No such file: u'Q:/rchive/myfile.txt'

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

2009/5/27 mgm <email address hidden>:
> I guess the email reply didn't work. Here is the traceback:
>
> Traceback (most recent call last):
>  File "bzrlib\commands.pyo", line 727, in exception_to_return_code
>  File "bzrlib\commands.pyo", line 922, in run_bzr
>  File "bzrlib\commands.pyo", line 559, in run_argv_aliases
>  File "bzrlib\builtins.pyo", line 587, in run
>  File "bzrlib\mutabletree.pyo", line 52, in tree_write_locked
>  File "bzrlib\mutabletree.pyo", line 392, in smart_add
>  File "bzrlib\osutils.pyo", line 1728, in file_kind
> NoSuchFile: No such file: u'Q:/rchive/myfile.txt'
>

So, for the sake of not jumping to conclusions, is the directory name
actually 'rchive' or 'archive' and a character is being lost
somewhere? If the latter it's quite mysterious, but it would explain
why we get command not found.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
mgm (matt-martin-ieee) wrote :

Per the original bug report, the file of interest in this example is "Q:\archive\myfile.txt". BZR is somehow cutting off the first letter of the path (beyond the drive letter). It certainly is quite mysterious.

Revision history for this message
Wouter van Heyst (larstiq) wrote :

On Thu, May 28, 2009 at 03:36:54AM -0000, mgm wrote:
> Per the original bug report, the file of interest in this example is
> "Q:\archive\myfile.txt". BZR is somehow cutting off the first letter of
> the path (beyond the drive letter). It certainly is quite mysterious.

The escape sequence '\a' is the ascii Bell. Could you try:

    bzr add Q:/archive/myfile.txt

instead of

    bzr add Q:\archive\myfile.txt

If that works, Windows path handling is going wrong somewhere. If it
doesn't, something else is up.

Wouter van Heyst

Revision history for this message
mgm (matt-martin-ieee) wrote :

Same result regardless of using forward or back slashes, or changing to the directory interest and adding the file without a path.

To be clear:
    bzr add Q:/archive/myfile.txt
    bzr add Q:\archive\myfile.txt
and
   q:
   cd archive
   bzr add myfile.txt

All give the same error.

Revision history for this message
mgm (matt-martin-ieee) wrote :

I have answered all questions and this bug is still marked as "incomplete". Is anyone out there ?

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

Hi,

I agree the bug's complete though I personally don't know what could be causing this. I see you said in the early comment it happens regardless of cwd. Does it happen if you use a different path like "c:\test\"?

(btw you can change the bug status yourself if you think it's no longer incomplete.)

Changed in bzr:
importance: Undecided → Medium
status: Incomplete → Confirmed
Jelmer Vernooij (jelmer)
tags: added: add win32
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Low
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.