[win32] names of temporary files not unique enough

Bug #290110 reported by Grant Rettke
6
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Medium
Jelmer Vernooij
subversion
Invalid
Undecided
Unassigned

Bug Description

Windows XP SP3
bzr version from installer bzr-setup-1.7.1-1
svn repo hosted locally, FSFS format,
svn exe 1.5.3 from collabnet
Not sure when stx-object-get-def was deleted, but it is not there now.

Log message follows:

bash-3.2$ bzr svn-import svn://osiris ./test-import-repo
bzr: ERROR: bzrlib.errors.NoSuchRevision: SvnBranch('svn://osiris/stx-object-get
def/trunk') has no revision svn-v3-trunk1:0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54:s
tx-object-getdef%2Ftrunk:1190

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 857, in run_bzr_catch_errors
  File "bzrlib\commands.pyo", line 797, in run_bzr
  File "bzrlib\commands.pyo", line 499, in run_argv_aliases
  File "bzrlib\commands.pyo", line 818, in ignore_pipe
  File "C:/Program Files/Bazaar/plugins\svn\__init__.py", line 299, in run
  File "C:/Program Files/Bazaar/plugins\svn\convert.py", line 239, in convert_re
pository
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1897, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1702, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 492, in update_revisions
  File "C:/Program Files/Bazaar/plugins\svn\branch.py", line 299, in last_revisi
on_info
  File "C:/Program Files/Bazaar/plugins\svn\branch.py", line 309, in revision_id
_to_revno
NoSuchRevision: SvnBranch('svn://osiris/stx-object-getdef/trunk') has no revisio
n svn-v3-trunk1:0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54:stx-object-getdef%2Ftrunk:1
190

bzr 1.7.1 on python 2.5.2 (win32)
arguments: ['c:\\Program Files\\Bazaar\\bzr.exe', 'svn-import', 'svn://osiris',
'./test-import-repo']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [1.7.0]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [unknown]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.9.4]
  svn C:\Program Files\Bazaar\plugins\svn [0.4.13]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Tags: windows svn win32

Related branches

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Grant Rettke (grettke) wrote :

I forgot to mention the steps that I took to perform this checkout. Basically I followed the user guide verbatim:

http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html#bzr-svn

I init'd a repo with rich-root-pack and then... now that I write this, I don't recall whether I attempted to checkout or branch the svn repo.

I will check tonight and update this post.

Revision history for this message
Grant Rettke (grettke) wrote :

I can reproduce this. Here is the log:

C:\home\grettke\bzr-migration>cd ..

C:\home\grettke>rd bzr-migration /s /q

C:\home\grettke>md bzr-migration

C:\home\grettke>cd bzr-migration

C:\home\grettke\bzr-migration>bzr svn-import svn://osiris repo
bzr: ERROR: bzrlib.errors.NoSuchRevision: SvnBranch('svn://osiris/stx-object-get
def/trunk') has no revision svn-v3-trunk1:0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54:s
tx-object-getdef%2Ftrunk:1190

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 857, in run_bzr_catch_errors
  File "bzrlib\commands.pyo", line 797, in run_bzr
  File "bzrlib\commands.pyo", line 499, in run_argv_aliases
  File "bzrlib\commands.pyo", line 818, in ignore_pipe
  File "C:/Program Files/Bazaar/plugins\svn\__init__.py", line 299, in run
  File "C:/Program Files/Bazaar/plugins\svn\convert.py", line 239, in convert_re
pository
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1897, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1702, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 492, in update_revisions
  File "C:/Program Files/Bazaar/plugins\svn\branch.py", line 299, in last_revisi
on_info
  File "C:/Program Files/Bazaar/plugins\svn\branch.py", line 309, in revision_id
_to_revno
NoSuchRevision: SvnBranch('svn://osiris/stx-object-getdef/trunk') has no revisio
n svn-v3-trunk1:0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54:stx-object-getdef%2Ftrunk:1
190

bzr 1.7.1 on python 2.5.2 (win32)
arguments: ['bzr', 'svn-import', 'svn://osiris', 'repo']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [1.7.0]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [unknown]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.9.4]
  svn C:\Program Files\Bazaar\plugins\svn [0.4.13]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

C:\home\grettke\bzr-migration>

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Can you still reproduce this with 0.4.14? If so, any chance you can try again, but set _skip_check=False in repository.py:826 and try again?

Revision history for this message
Grant Rettke (grettke) wrote :

I'm going to wait for the 1.9FINAL build for Windows and test it out.

Revision history for this message
Grant Rettke (grettke) wrote :

I just tried again on 1.9 (final). Only difference is that I'm now running Vista 32bit Ultimate SP1. The same result seems to occur, so I will commence with the test in the next comment:

C:\temp\t1>bzr svn-import G:/Old-Svn-Repo imported-svn-repo
Initialising Subversion metadata cache in C:/Users/grettke/AppData/Roaming/bazaa
r/2.0\svn-cache\0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54
bzr: ERROR: bzrlib.errors.NoSuchRevision: SvnBranch('file:///G:/Old-Svn-Repo/stx
-object-getdef/trunk') has no revision svn-v3-trunk1:0ddc1f8c-a0a1-e44c-8b24-8a0
e7423ac54:stx-object-getdef%2Ftrunk:1190

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 893, in run_bzr_catch_errors
  File "bzrlib\commands.pyo", line 839, in run_bzr
  File "bzrlib\commands.pyo", line 539, in run_argv_aliases
  File "bzrlib\commands.pyo", line 853, in ignore_pipe
  File "C:/Programs/Bazaar/plugins\svn\__init__.py", line 281, in run
  File "C:/Programs/Bazaar/plugins\svn\convert.py", line 239, in convert_reposit
ory
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1927, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1727, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 507, in update_revisions
  File "C:/Programs/Bazaar/plugins\svn\branch.py", line 299, in last_revision_in
fo
  File "C:/Programs/Bazaar/plugins\svn\branch.py", line 309, in revision_id_to_r
evno
NoSuchRevision: SvnBranch('file:///G:/Old-Svn-Repo/stx-object-getdef/trunk') has
 no revision svn-v3-trunk1:0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54:stx-object-getde
f%2Ftrunk:1190

bzr 1.9 on python 2.5.2 (win32)
arguments: ['bzr', 'svn-import', 'G:/Old-Svn-Repo', 'imported-svn-repo']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Programs\Bazaar\plugins\bzrtools [1.9.1]
  launchpad C:\Programs\Bazaar\plugins\launchpad [unknown]
  qbzr C:\Programs\Bazaar\plugins\qbzr [0.9.5]
  svn C:\Programs\Bazaar\plugins\svn [0.4.14]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Revision history for this message
Grant Rettke (grettke) wrote :

I made the change here:

try:
            for project, bp, nick in layout.get_branches(revnum, pb=pb):
                branches.append(SvnBranch(self, bp, _skip_check=False))
        finally:
            pb.finished()
        return branches

And got this result:

C:\temp\t2>bzr svn-import file:///G:/Old-Svn-Repo imported-svn-repo
bzr: ERROR: bzrlib.errors.NoSuchRevision: SvnBranch('file:///G:/Old-Svn-Repo/stx
-object-getdef/trunk') has no revision svn-v3-trunk1:0ddc1f8c-a0a1-e44c-8b24-8a0
e7423ac54:stx-object-getdef%2Ftrunk:1190

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 893, in run_bzr_catch_errors
  File "bzrlib\commands.pyo", line 839, in run_bzr
  File "bzrlib\commands.pyo", line 539, in run_argv_aliases
  File "bzrlib\commands.pyo", line 853, in ignore_pipe
  File "C:/Programs/Bazaar/plugins\svn\__init__.py", line 281, in run
  File "C:/Programs/Bazaar/plugins\svn\convert.py", line 239, in convert_reposit
ory
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1927, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1727, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 507, in update_revisions
  File "C:/Programs/Bazaar/plugins\svn\branch.py", line 299, in last_revision_in
fo
  File "C:/Programs/Bazaar/plugins\svn\branch.py", line 309, in revision_id_to_r
evno
NoSuchRevision: SvnBranch('file:///G:/Old-Svn-Repo/stx-object-getdef/trunk') has
 no revision svn-v3-trunk1:0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54:stx-object-getde
f%2Ftrunk:1190

bzr 1.9 on python 2.5.2 (win32)
arguments: ['bzr', 'svn-import', 'file:///G:/Old-Svn-Repo', 'imported-svn-repo']

encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Programs\Bazaar\plugins\bzrtools [1.9.1]
  launchpad C:\Programs\Bazaar\plugins\launchpad [unknown]
  qbzr C:\Programs\Bazaar\plugins\qbzr [0.9.5]
  svn C:\Programs\Bazaar\plugins\svn [0.4.14]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

C:\temp\t2>runemacs C:\Programs\Bazaar\plugins\svn\repository.py

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Please try with 0.5.0~rc1. I think this is fixed.

Changed in bzr-svn:
status: Triaged → Incomplete
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
importance: Medium → Undecided
Revision history for this message
Grant Rettke (grettke) wrote :

Will do. When is the installer going to appear?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Probably another month or so, since 0.5 isn't released yet (just a RC).

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

There is an installer available now. Any chance you can try to reproduce this?

Thanks!

Revision history for this message
Grant Rettke (grettke) wrote :

I would love to. I will do it this weekend.

To confirm: you mean 1.12 right?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

yep

Revision history for this message
Grant Rettke (grettke) wrote :

Try #1. The only change I made here was to go directory against the file system. I will start the server next.

C:\Users\grettke\bzr-migration>bzr --version
Bazaar (bzr) 1.12
  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:\Users\grettke\AppData\Roaming\bazaar\2.0
  Bazaar log file: C:\Users\grettke\Documents\.bzr.log

Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

C:\Users\grettke\bzr-migration>bzr svn-import file:///G:/Old-Svn-Repo repo
Using repository layout: trunk1
bzr: ERROR: [Errno 5] Can't open 'C:\Users\grettke\AppData\Local\Temp\report.tmp
': Access is denied.

Revision history for this message
Grant Rettke (grettke) wrote :

Try #2. Ran svnserve first.

C:\Users\grettke\bzr-migration>bzr svn-import svn://stargate repo
Using repository layout: trunk1
bzr: ERROR: [Errno 5] Can't open 'C:\Users\grettke\AppData\Local\Temp\report.tmp
': Access is denied.

Revision history for this message
Grant Rettke (grettke) wrote :

Try #3. I granted permission to everyone rwx on that directory

C:\Users\grettke\bzr-migration>bzr svn-import svn://stargate repo
Using repository layout: trunk1
bzr: ERROR: [Errno 5] Can't open 'C:\Users\grettke\AppData\Local\Temp\report.tmp
': Access is denied.

Revision history for this message
Grant Rettke (grettke) wrote :

Try #4: I ran the command as "Administrator" at the command prompt and also touched that file and confirmed that it accessible rwx to everyone. It failed with the same error.

The repo directory doesn't seem to have much in it.

C:\Users\grettke\bzr-migration\repo>dir/s/b
C:\Users\grettke\bzr-migration\repo\.bzr\branch-format
C:\Users\grettke\bzr-migration\repo\.bzr\branch-lock
C:\Users\grettke\bzr-migration\repo\.bzr\README
C:\Users\grettke\bzr-migration\repo\.bzr\repository
C:\Users\grettke\bzr-migration\repo\.bzr\repository\format
C:\Users\grettke\bzr-migration\repo\.bzr\repository\indices
C:\Users\grettke\bzr-migration\repo\.bzr\repository\lock
C:\Users\grettke\bzr-migration\repo\.bzr\repository\no-working-trees
C:\Users\grettke\bzr-migration\repo\.bzr\repository\obsolete_packs
C:\Users\grettke\bzr-migration\repo\.bzr\repository\pack-names
C:\Users\grettke\bzr-migration\repo\.bzr\repository\packs
C:\Users\grettke\bzr-migration\repo\.bzr\repository\shared-storage
C:\Users\grettke\bzr-migration\repo\.bzr\repository\upload
C:\Users\grettke\bzr-migration\repo\.bzr\repository\indices\0bcfa10776cc260ef5bb
b4b9b1aea14b.iix
C:\Users\grettke\bzr-migration\repo\.bzr\repository\indices\0bcfa10776cc260ef5bb
b4b9b1aea14b.rix
C:\Users\grettke\bzr-migration\repo\.bzr\repository\indices\0bcfa10776cc260ef5bb
b4b9b1aea14b.six
C:\Users\grettke\bzr-migration\repo\.bzr\repository\indices\0bcfa10776cc260ef5bb
b4b9b1aea14b.tix
C:\Users\grettke\bzr-migration\repo\.bzr\repository\packs\0bcfa10776cc260ef5bbb4
b9b1aea14b.pack

Total Files Listed:
         11 File(s) 1,570 bytes
         23 Dir(s) 39,637,704,704 bytes free

I will quit mucking about for now.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Is the repo public ?

Is r1190 the latest revision? Does stx-object-getdef/trunk exist in r1190 ? when/how was stx-object-getdef/trunk deleted?

Revision history for this message
Grant Rettke (grettke) wrote :

Jelmer Vernooij wrote:

> Is the repo public ?

No.

> Is r1190 the latest revision?

No. The latest is 2959.

> Does stx-object-getdef/trunk exist in r1190 ? when/how was stx-object-getdef/trunk deleted?

No. It was renamed in 1190. That is when the delete/add occurred.

r125: Created it
r1190: Renamed it to stx-object-getdef

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Was the branch itself renamed or its parent (stx-object-getdef) ?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Can you perhaps just paste the output of "svn log -v -r1190" ?

Revision history for this message
Grant Rettke (grettke) wrote :

Jelmer wrote: "Was the branch itself renamed or its parent (stx-object-getdef) ?"

The branch itself.

Jelmer wrote: "Can you perhaps just paste the output of "svn log -v -r1190" ?"

C:\Users\grettke>svn log -v -r1190 file:///G:/Old-Svn-Repo
------------------------------------------------------------------------
r1190 | gcr | 2008-01-14 20:11:35 -0600 (Mon, 14 Jan 2008) | 1 line
Changed paths:
   D /getdef
   A /stx-object-getdef (from /getdef:1189)

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 290110] Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Grant Rettke wrote:
> Jelmer wrote: "Was the branch itself renamed or its parent (stx-object-
> getdef) ?"
>
> The branch itself.
>
> Jelmer wrote: "Can you perhaps just paste the output of "svn log -v
> -r1190" ?"
Unfortunately I still can't reproduce this. I'm suspecting the fact that
you're on Windows may be related here.

Please run "bzr selftest bzrlib.plugins.svn" and attach the output here.
The errors from that should hopefully allow us to fix this problem if it
is indeed Windows-specific.

If you have access to a Linux or Mac OS X machine, is there any chance
you can try the svn-import run on that, to confirm this is a Windows
specific issue?

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iJwEAQECAAYFAkmh/sgACgkQDLQl4QYPZuWY0QQAndBEOtHGjOsdWUaEhdaGWMEL
WT4yeq+ULdZTxQYXA64yXioIqu6cLzluyN6AeMOyZ619ZtcLIZswpUY9WIR/C30p
vO7WSGP8/PhPh4kpF+KzqDzofCn3IDio4J/0/x3ZgV0enQkTXehNNHyF1RDshRsb
BIyqRFre+85+1RlXgtM=
=uKte
-----END PGP SIGNATURE-----

Revision history for this message
Grant Rettke (grettke) wrote : Re: [Bug 290110] Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

Hi Jelmer,

On Sun, Feb 22, 2009 at 7:41 PM, Jelmer Vernooij <email address hidden> wrote:
> Please run "bzr selftest bzrlib.plugins.svn" and attach the output here.
> The errors from that should hopefully allow us to fix this problem if it
> is indeed Windows-specific.

It is attached.

> If you have access to a Linux or Mac OS X machine, is there any chance
> you can try the svn-import run on that, to confirm this is a Windows
> specific issue?

Will do.

Best wishes,

Grant Rettke

Revision history for this message
Grant Rettke (grettke) wrote : Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

grettke@stargate:~/bzr-migration$ uname -a
Linux stargate 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686 GNU/Linux
grettke@stargate:~/bzr-migration$ cat /etc/issue
Ubuntu 8.10 \n \l

grettke@stargate:~/bzr-migration$ bzr --version
Bazaar (bzr) 1.12
  Python interpreter: /usr/bin/python 2.5.2
  Python standard library: /usr/lib/python2.5
  bzrlib: /usr/lib/python2.5/site-packages/bzrlib
  Bazaar configuration: /home/grettke/.bazaar
  Bazaar log file: /home/grettke/.bzr.log

Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

bzr-svn v 0.5.0-1

grettke@stargate:~/bzr-migration$ bzr svn-import file:///grant/Old-Svn-Repo repo
Initialising Subversion metadata cache in /home/grettke/.bazaar/svn-cache/0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54
Using repository layout: trunk1
grettke@stargate:~/bzr-migration/repo$ ls
barcamp2mil-scheme-intro getdef project_euler wp-syntax-rettke
drsync grants_things resume
drviz grant-various wp-syntax-cust

grettke@stargate:~/bzr-migration/repo/drsync/trunk$ bzr co
grettke@stargate:~/bzr-migration/repo/drsync/trunk$ bzr tags
1.0 ?
1.1 ?
1.2 ?
1.3 ?
1.31 ?
1.32 ?
1.33 ?
1.34 ?
1.35 ?

Everything looks good, though the last time I imported this all of my tags were associated with revision numbers i believe.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 290110] Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

Thanks!

Unfortunately with all these test failures it's very hard to see what's
actually happening :-( I've fixed the bug in subvertpy that should've
caused most of the test failures:

=== modified file 'subvertpy/tests/__init__.py'
--- subvertpy/tests/__init__.py 2009-02-21 22:11:21 +0000
+++ subvertpy/tests/__init__.py 2009-02-24 02:24:46 +0000
@@ -28,6 +28,7 @@
 import sys
 import tempfile
 from unittest import TestCase
+import urllib

 from subvertpy import delta, ra, repos, delta, client, properties
 from subvertpy.ra import Auth, RemoteAccess
@@ -187,7 +188,7 @@
                 open(revprop_hook, 'w').write("#!/bin/sh\n")
                 os.chmod(revprop_hook, os.stat(revprop_hook).st_mode |
0111)

- return "file://" + abspath
+ return "file://" + urllib.pathname2url(abspath)

     def make_checkout(self, repos_url, relpath):

Is there any chance you can run "bzr selftest bzrlib.plugins.svn" again
with this chance applied to subvertpy locally?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks!

Unfortunately with all these test failures it's very hard to see what's
actually happening :-( I've fixed the bug in subvertpy that should've
caused most of the test failures:

=== modified file 'subvertpy/tests/__init__.py'
--- subvertpy/tests/__init__.py 2009-02-21 22:11:21 +0000
+++ subvertpy/tests/__init__.py 2009-02-24 02:24:46 +0000
@@ -28,6 +28,7 @@
 import sys
 import tempfile
 from unittest import TestCase
+import urllib

 from subvertpy import delta, ra, repos, delta, client, properties
 from subvertpy.ra import Auth, RemoteAccess
@@ -187,7 +188,7 @@
                 open(revprop_hook, 'w').write("#!/bin/sh\n")
                 os.chmod(revprop_hook, os.stat(revprop_hook).st_mode |
0111)

- return "file://" + abspath
+ return "file://" + urllib.pathname2url(abspath)

     def make_checkout(self, repos_url, relpath):

Is there any chance you can run "bzr selftest bzrlib.plugins.svn" again
with this chance applied to subvertpy locally?

Revision history for this message
Grant Rettke (grettke) wrote : Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

Jelmer wrote: "Is there any chance you can run "bzr selftest bzrlib.plugins.svn" again with this chance applied to subvertpy locally?"

Yes definitely, but where does this live in the directory structure of Bazaar?

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 290110] Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

On Tue, 2009-02-24 at 04:46 +0000, Grant Rettke wrote:
> Yes definitely, but where does this live in the directory structure of
> Bazaar?
I'm not quite sure, I think it's somewhere under Bazaar\lib\subvertpy.

Cheers,

Jelmer

--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Grant Rettke (grettke) wrote : Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

Grant wrote:
>> Yes definitely, but where does this live in the directory structure of
>> Bazaar?
Jelmer wrote:
> I'm not quite sure, I think it's somewhere under Bazaar\lib\subvertpy.

That is the strange thing, I don't have a subvertpy in there at all:

C:\Program Files\Bazaar>dir /ad /s | grep sub

C:\Program Files\Bazaar>dir /ad /s | grep svn
02/20/2009 09:51 PM <DIR> svn
 Directory of C:\Program Files\Bazaar\plugins\svn
 Directory of C:\Program Files\Bazaar\plugins\svn\foreign
 Directory of C:\Program Files\Bazaar\plugins\svn\layout
 Directory of C:\Program Files\Bazaar\plugins\svn\mapping3
 Directory of C:\Program Files\Bazaar\plugins\svn\tests
 Directory of C:\Program Files\Bazaar\plugins\svn\tests\mapping3
 Directory of C:\Program Files\Bazaar\plugins\svn\tests\mapping_implementations

C:\Program Files\Bazaar>grep "from unittest import TestCase" * -R
plugins/bzrtools/tests/test_dotgraph.py:from unittest import TestCase
plugins/svn/tests/mapping_implementations/test_branch.py:from unittest import Te
stCase
plugins/svn/tests/test_branch.py:from unittest import TestCase
plugins/svn/tests/test_transport.py:from unittest import TestCase

I don't see an __init__.py with abspath in it, either.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 290110] Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

It should be living inside of the python directory, rather than under
bzrlib.plugins.svn.

Cheers,

Jelmer
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Grant Rettke (grettke) wrote : Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

Should there be a python directory as part of my installation on Windows?

I don't see one.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 290110] Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

On Tue, 2009-02-24 at 18:33 +0000, Grant Rettke wrote:
> Should there be a python directory as part of my installation on
> Windows?
>
> I don't see one.
I'm not sure.

You should be able to find a directory named "subvertpy" somewhere in
the directory created by the bzr installer. I'm not sure where exactly.

--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Grant Rettke (grettke) wrote : Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

Searching for directories, recursively; there don't seem to be any. Check it out:

C:\Program Files\Bazaar>dir /ad/s | grep py

C:\Program Files\Bazaar>dir /ad/s | grep sub

C:\Program Files\Bazaar>dir /ad/s | grep vert

C:\Program Files\Bazaar>dir /ad/s | grep vn
02/24/2009 12:47 PM <DIR> svn
 Directory of C:\Program Files\Bazaar\plugins\svn
 Directory of C:\Program Files\Bazaar\plugins\svn\foreign
 Directory of C:\Program Files\Bazaar\plugins\svn\layout
 Directory of C:\Program Files\Bazaar\plugins\svn\mapping3
 Directory of C:\Program Files\Bazaar\plugins\svn\tests
 Directory of C:\Program Files\Bazaar\plugins\svn\tests\mapping3
 Directory of C:\Program Files\Bazaar\plugins\svn\tests\mapping_implementations

C:\Program Files\Bazaar>dir/ad/s | grep uk
02/24/2009 12:29 PM <DIR> uk
 Directory of C:\Program Files\Bazaar\plugins\qbzr\locale\uk
 Directory of C:\Program Files\Bazaar\plugins\qbzr\locale\uk\LC_MESSAGES

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 290110] Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

I just hear it's in a zip file under the lib/ directory, so it may not
be very easy to modify that file. :-(
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Grant Rettke (grettke) wrote : Re: svn-import crashes on NoSuchRevision when a branch doesn't exist

Is there any way to run with py and not pyo files?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Not that I'm aware of. It might be better to wait until the next installer and try again with that.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Can you try with the 1.14.1 installer perhaps?

Revision history for this message
Grant Rettke (grettke) wrote :

Sure. On Windows:

C:\temp\bzr-1.14>cmd
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\temp\bzr-1.14>bzr svn-import file:///G:/old-svn-repo ./test-import-repo
Initialising Subversion metadata cache in C:\Users\grettke\AppData\Local\svn-cac
he\0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54
Using repository layout: trunk1
bzr: ERROR: [Errno 5] Can't open 'C:\Users\grettke\AppData\Local\Temp\report.2.t
mp': Access is denied.

I will try in Linux.

Revision history for this message
Grant Rettke (grettke) wrote :

grettke@stargate:~/tmp/bzr-1.14.1$ cat /etc/issue
Ubuntu 9.04 \n \l

grettke@stargate:~/tmp/bzr-1.14.1$ bzr --version
Bazaar (bzr) 1.14.1
  Python interpreter: /usr/bin/python 2.6.2
  Python standard library: /usr/lib/python2.6
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
  Bazaar configuration: /home/grettke/.bazaar
  Bazaar log file: /home/grettke/.bzr.log

Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

grettke@stargate:~/tmp/bzr-1.14.1$ bzr svn-import file:///grant/Old-Svn-Repo/ ./test-import-repo
Initialising Subversion metadata cache in /home/grettke/.bazaar/svn-cache/0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54
Using repository layout: trunk1

It seems to have worked fine.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Do you have normal write access to C:\Users\grettke\AppData\Local\Temp? Can you create files there? If that is the case, I'm not sure there's much we can fix in bzr-svn :-(

Revision history for this message
Grant Rettke (grettke) wrote :

I verified that both my user and Administrator have write access to that directory, and also ran it with the "Administrator Command Prompt".

Creating files works fine there.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Some of the git-svn people seem to've run into this problem as well, caused by the fact that svn doesn't generate very unique temporary file names. I guess we'll have to provide a function of our own.

Changed in bzr-svn:
assignee: nobody → Jelmer Vernooij (jelmer)
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I can't actually trigger libsvn to use temporary files here, perhaps the need for them has gone away in newer versions. Can you check if the attached patch fixes the issue for you?

Revision history for this message
Grant Rettke (grettke) wrote :

Patch keeps blowing up in Windows; would you mind just posting the patched file?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

You should be able to make those changes manually in the file, it's a two-line change. I could post my copy of transport.py here, but that would only work if you have the rest of bzr-svn matching as well.

Revision history for this message
Grant Rettke (grettke) wrote :

I see.

C:\tmp>bzr svn-import file:///g:/Old-Svn-Repo ./test-import-repo
Using repository layout: trunk1
bzr: ERROR: [Errno 5] Can't open 'C:\Users\grettke\AppData\Local\Temp\report.2.t
mp': Access is denied.

C:\tmp>rd test-import-repo /s /q

[Here I verified adequate permissions, though I was running as Administrator, I added "Everyone" to that Temp directory, with FULL permissions]

C:\tmp>bzr svn-import file:///g:/Old-Svn-Repo ./test-import-repo
Using repository layout: trunk1
bzr: ERROR: [Errno 5] Can't open 'C:\Users\grettke\AppData\Local\Temp\report.2.t
mp': Access is denied.

Still it complained; I don't understand the means by which access has been denied, it doesn't make sense.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

It looks like it doesn't use the new temporary file handler yet. I'm not sure what I can do about that, it seems to ignore whatever I give to it.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Can you try to reproduce this on a public repository, e.g. http://anonsvn.wireshark.org/wireshark

In the end, this is a Subversion bug but we might be able to work around it in bzr-svn.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

FWIW the post to the subversion development list from the git folks is here:

http://subversion.tigris.org/ds/viewMessage.do?dsMessageId=1942580&dsForumId=462

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
milestone: none → 1.0.0
Revision history for this message
Grant Rettke (grettke) wrote :

At the "Administrator Console"

C:\temp>bzr --version
Bazaar (bzr) 1.16
  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:\Users\grettke\AppData\Roaming\bazaar\2.0
  Bazaar log file: C:\Users\grettke\Documents\.bzr.log

Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

C:\temp>bzr svn-import http://anonsvn.wireshark.org/wireshark ws-import-repo
Initialising Subversion metadata cache in C:\Users\grettke\AppData\Local\svn-cac
he\f5534014-38df-0310-8fa8-9805f1628bb7.
Using repository layout: trunk0
bzr: ERROR: [Errno 5] Can't open 'C:\Users\grettke\AppData\Local\Temp\subvertpy.
tmp': Access is denied.

Revision history for this message
EcLiPsE (softinn72) wrote :

Hello,
I am getting an error like the one above while trying to update an SVN repository checkout:

D:\emc_svn_repository\Interfacing>bzr --version
Bazaar (bzr) 1.16
  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\Administrator\Application Data\bazaar\2.0
  Bazaar log file: D:\My Documents\.bzr.log

Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

D:\emc_svn_repository\Interfacing>bzr update
HTTP emcapp204.erasmusmc.nl, Realm: 'Subversion repository' username:
HTTP @emcapp204.erasmusmc.nl, Realm: 'Subversion repository' password:
bzr: ERROR: [Errno 5] Can't open 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\subvertpy.tmp': Access is denied.

I attach the output of "bzr selftest bzrlib.plugins.svn".

Thanks,
Paolo

Revision history for this message
EcLiPsE (softinn72) wrote :

I also add a snippet from the bzr.log

Jelmer Vernooij (jelmer)
tags: added: win32
Jelmer Vernooij (jelmer)
summary: - svn-import crashes on NoSuchRevision when a branch doesn't exist
+ [win32] names of temporary files not unique enough
Revision history for this message
Jelmer Vernooij (jelmer) wrote :
Revision history for this message
EcLiPsE (softinn72) wrote :

Well, in my case I did have one active and it was the Enterprise version of the McAfee Viruscan...
Thanks for the pointer, but I cannot try it right now.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Can anybody still reproduce this issue?

Changed in bzr-svn:
status: Triaged → Incomplete
milestone: 1.0.0 → none
Revision history for this message
Grant Rettke (grettke) wrote :

Jelmer I can test it out in about two weeks from now.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks Grant.

Changed in bzr-svn:
importance: Medium → Undecided
Revision history for this message
Grant Rettke (grettke) wrote :

After disabling McAfee's "Real Time Scanning", the import on the same repo I've been testing throughout works successfully!

Thanks for sticking with this guys.

Here is the proof.

C:\Temp>date
The current date is: Sun 08/29/2010
Enter the new date: (mm-dd-yy)

C:\Temp>echo "Disabled McAfee's Real-Time Scanning"
"Disabled McAfee's Real-Time Scanning"

C:\Temp>bzr --version
Bazaar (bzr) 2.1.1
  Python interpreter: C:\Apps\Bazaar\python25.dll 2.5.4
  Python standard library: C:\Apps\Bazaar\lib\library.zip
  Platform: Windows-XP-5.1.2600-SP3
  bzrlib: C:\Apps\Bazaar\lib\library.zip\bzrlib
  Bazaar configuration: C:\Documents and Settings\grettke\Application Data\bazaa
r\2.0
  Bazaar log file: C:\Documents and Settings\grettke\My Documents\.bzr.log

Copyright 2005-2010 Canonical Ltd.
http://bazaar-vcs.org/

winver.exe->MS Windows Version 5.1, SP3

C:\Temp\bzr-migration>bzr svn-import file:///O:/EverythingElse/Grant/Old-Svn-Repo
Initialising Subversion metadata cache in C:\Documents and Settings\grettke\Loca
l Settings\Application Data\svn-cache\0ddc1f8c-a0a1-e44c-8b24-8a0e7423ac54.
Using repository layout: trunk1
Use 'bzr checkout' to create a working tree in the newly created branches.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks for verifying! I'll add a note about this to the FAQ.

Changed in bzr-svn:
status: Incomplete → Triaged
importance: Undecided → Medium
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Triaged → Fix Committed
Changed in subversion:
status: New → Invalid
Changed in bzr-svn:
milestone: none → 1.0.4
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → Fix Released
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.