bzr upload no such file .tmp

Asked by mrex on 2011-07-14


I have a repository on a remote server under /bzr/flash. I also have a web server running on the remote at /var/httpdocs/www. I use bzr upload to upload the files to the web server after I have committed my latest revision. This was working fine for a few revisions, but now about half way through the list of files to be uploaded, I get "bzr ERROR: No such file: '/../../var/httpdocs/www/includes/footer.html.tmp.1310670566.829000000.7492.1155971998': [Errno 2] No such file". Note that the numerical suffixes are different every time, I've tried several uploads.

Using bzr upload with another location (i.e. /home/mrex) on the remote works.

I cannot find any temp files, and I'm at a loss as to how to resolve this. The location is rather large (a working web application) and it would be a pain to simply wipe it out and upload again. Any ideas on how to get beyond this?


Question information

English Edit question
bzr Upload plugin Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Martin Pool (mbp) said : #1

Could it be this problem is caused by symlinks on the server confusing

Vincent Ladeuil (vila) said : #2

What protocol are you using to communicate with the server ?

What versions of bzr and the plugin are you using:
  bzr version
  bzr plugins -v

mrex (mrex) said : #3

Hi Guys,

Thanks for the quick response. The protocol is sftp. I've listed dumps of the version, plugins and info commands on both my workstation and the server below.

My workstation is a Win7 box. The server is a Win2k3 machine running Cygwin. Martin, there are no symlinks that I am aware of in either the repository or the destination on the server. Again, this looks like a "stuck" tmp file of some kind.

Note that I actually upload to "sftp://mrex@<client URL>/../../var/httpdocs/www". Uploads to that location have worked fine before.

Thanks again for your time guys, I love bazaar!

-- Mark


*** bzr version

Bazaar (bzr) 2.3.1
  Python interpreter: C:\Programming\Bazaar\python26.dll 2.6.6
  Python standard library: C:\Programming\Bazaar\lib\
  Platform: Windows-7-6.1.7601-SP1
  bzrlib: C:\Programming\Bazaar\lib\\bzrlib
  Bazaar configuration: C:\Users\mrex\AppData\Roaming\bazaar\2.0
  Bazaar log file: C:\Users\mrex\Documents\.bzr.log

*** bzr plugins -v

bzrtools 2.3.1
   Various useful commands for working with bzr.

colo 0.2.1
   Work with colocated branches using current technology.

explorer 1.1.2
   Version Control for Human Beings.

fastimport 0.10.0
   FastImport Plugin

launchpad 2.3.1 integration plugin for Bazaar.

loom 2.2.1dev
   Loom is a bzr plugin which adds new commands to manage a loom of patches.

netrc_credential_store 2.3.1
   Use ~/.netrc as a credential store for authentication.conf.

news_merge 2.3.1
   Merge hook for bzr's NEWS file.

pipeline 1.1.0
   Manage a series of branches as a pipeline.

qbzr 0.20.0
   QBzr - Qt-based frontend for Bazaar

rewrite 0.6.2dev
   Rebase support.

svn 1.0.5dev
   Support for Subversion branches

upload 1.0.0
   Upload a working tree, incrementally.

   This plugin adds an option (--xml) to log and provides an xml version of some builtin commands.


*** bzr version

Bazaar (bzr) 2.3.1
  Python interpreter: /usr/bin/python 2.6.5
  Python standard library: /usr/lib/python2.6
  Platform: CYGWIN_NT-5.2-1.7.9-0.237-5-3-i686-32bit
  bzrlib: /usr/lib/python2.6/site-packages/bzrlib
  Bazaar configuration: /home/admin2/.bazaar
  Bazaar log file: /home/admin2/.bzr.log

*** bzr plugins -v

bash_completion 2.3.1
   Generate a shell function for bash command line completion.

launchpad 2.3.1 integration plugin for Bazaar.

netrc_credential_store 2.3.1
   Use ~/.netrc as a credential store for authentication.conf.

news_merge 2.3.1
   Merge hook for bzr's NEWS file.


*** bzr info

Repository checkout (format: 2a)
  repository checkout root: .
        checkout of branch: sftp://<client's URL>/bzr/flash/
         shared repository: C:/Webs/<client>/dev/bzr

Related branches:
  push branch: sftp://mrex@<client's URL>/bzr/flash/

mrex (mrex) said : #4

Hey Guys,

Any ideas? The basic repository is working fine for my team, its just the final upload step that we're hung up on. I may just wipe the web directory and start uploading from scratch. Or perhaps bite the bullet and learn some python...


Martin Pool (mbp) said : #5

Hi Mark,

Can you please try upgrading the client and server to 2.4b5, from <>? There are some improvements in this area that may fix your problem.

If you can still reproduce it there, please run the command with the -Derror option added, which should give you a traceback, and post that here.


mrex (mrex) said : #6

TNX, will do tomorrow. I'm in NYC, so it won't happen until some 18~24 hours from now...

mrex (mrex) said : #7

*Sigh* No Joy...

I've updated bzr on both my Win7 workstation and the cygwin instance on the server to 2.4b5. I still get the error:

C:\Webs\<client>\dev\bzr\flash>bzr upload sftp://mrex@<Client URL>/../../var/httpdocs/www -Derror
Connected (version 2.0, client OpenSSH_5.8)
SSH mrex@<Client URL> password:
Authentication (password) successful!
Secsh channel 1 opened.
[chan 1] Opened sftp connection (server version 3)
Uploading Library/bookplayer.html
Uploading Library/library.html
Uploading includes/footer.html
bzr: ERROR: bzrlib.errors.NoSuchFile: No such file: '/../../var/httpdocs/www/includes/footer.html.tmp.1311178872.226000100.4632.2064
057183': [Errno 2] No such file

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 946, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1150, in run_bzr
  File "bzrlib\commands.pyo", line 699, in run_argv_aliases
  File "bzrlib\commands.pyo", line 721, in run
  File "bzrlib\cleanup.pyo", line 135, in run_simple
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "C:/Programming/Bazaar/plugins\upload\", line 560, in run
  File "C:/Programming/Bazaar/plugins\upload\", line 423, in upload_tree
  File "C:/Programming/Bazaar/plugins\upload\", line 202, in upload_file
  File "C:/Programming/Bazaar/plugins\upload\", line 150, in _up_put_bytes
  File "bzrlib\transport\__init__.pyo", line 870, in put_bytes
  File "bzrlib\transport\sftp.pyo", line 486, in put_file
  File "bzrlib\transport\sftp.pyo", line 492, in _put
  File "bzrlib\transport\sftp.pyo", line 896, in _sftp_open_exclusive
  File "bzrlib\transport\sftp.pyo", line 697, in _translate_io_exception
  File "bzrlib\transport\__init__.pyo", line 302, in _translate_error
NoSuchFile: No such file: '/../../var/httpdocs/www/includes/footer.html.tmp.1311178872.226000100.4632.2064057183': [Errno 2] No such

I'm going to try wiping the upload revision file and doing a full upload next. Beyond that, I'm not sure what to do.

Thanks again for looking at all this. Any ideas appreciated.

-- Mark

Martin Pool (mbp) said : #8

How about if you just use sftp://mrex@<Client URL>/var/httpdocs/www ?

mrex (mrex) said : #9

bzr: ERROR: No such file: '/var/httpdocs/www/includes/footer.html.tmp.1311214578.910000100.5016.522101618': [Errno 2] No such file

Martin Pool (mbp) said : #10

So if this used to work on this path, and it still works on other paths, I'm not sure what could be breaking it. This looks a lot like the sftp server is just giving us back a 'no such file' error. You could try checking for errors in the sftp servers logs, checking whether that patch can be accessed from a different sftp client, checking for configuration changes in the sftp server, perhaps just restarting the server.

mrex (mrex) said : #11

Hi Martin,

I tried checking logs, but there were no errors from Cygwin_sshd in the Windows Event Viewer, or in /var/logs/sshd.log. I did restart the service, but got the same error. Finally, I just bit the bullet and wiped the target directory, and did the upload again. 30 minutes later it succeeded.

If I run into this again, I'll more aggressively hunt down the problem and post about it. In fact, I have two suggested changes already:

  -- Upload should not fail if a directory exists
  -- Upload should not fail if a temp file does not exist

If I were running a real 'nix server, instead of Win2k3, things might have been easier to figure out. As it is, I'm considering this closed for now, the workaround being to do a full upload. :(

Thanks again for all the effort.

Martin Pool (mbp) said : #12

I'm glad you solved it.

If you ask to upload to a nonexistent directory, bzr-upload ought to
give a clear error. But I don't think that's what is happening here.