Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access is denied in Temp #6

Open
cryham opened this issue Mar 8, 2019 · 3 comments
Open

Access is denied in Temp #6

cryham opened this issue Mar 8, 2019 · 3 comments

Comments

@cryham
Copy link

cryham commented Mar 8, 2019

Hi, I got some exceptions, while doing:
python ../svn2github.py --cache-dir ../DC_cache/ import cryham/doublecmd https://svn.code.sf.net/p/doublecmd/code/trunk
If I see this right, it seems to be during "git svn rebase", caused by "Access is denied" in my Temp dir (which was used fine so far).
Any idea why, or what to do with this?

Here is my log from Git Bash, I'm on Windows 7 (and all commands work there):
(At start there is like 5300 other messages looking like the one below "Fetching from SVN, revision):

Fetching from SVN, revision 5300/svn info https://svn.code.sf.net/p/doublecmd/code/trunk output did not specify the current revision
Rebasing SVN changes
Traceback (most recent call last):
File "../svn2github.py", line 149, in sync_github_mirror
git_svn_rebase(git_dir)
File "../svn2github.py", line 65, in git_svn_rebase
run_git_cmd(["svn", "rebase"], git_dir)
File "../svn2github.py", line 35, in run_git_cmd
return proc.run(["git"] + args, check=True, cwd=git_dir, stderr=DEVNULL, stdin=DEVNULL, stdout=PIPE)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'svn', 'rebase']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "../svn2github.py", line 178, in
main()
File "../svn2github.py", line 173, in main
sync_github_mirror(args.github_repo, args.cache_dir, new_svn_url=new_svn_url)
File "../svn2github.py", line 156, in sync_github_mirror
save_cache(cache_path, os.path.join(tmp_dir, "cache.tar"), git_dir)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\tempfile.py", line 805, in exit
self.cleanup()
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\tempfile.py", line 809, in cleanup
_shutil.rmtree(self.name)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 513, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
[Previous line repeated 1 more time]
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 397, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 395, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\Users\aaa\AppData\Local\Temp\svn2github-u13aghfg\repo\.git\objects\05\29174db568c98cadabe02d892ea402b50da6b4'

@cryham
Copy link
Author

cryham commented Mar 9, 2019

I tried again and it got almost to last revision but failed with similar error:

Fetching from SVN, revision 8724/svn info https://svn.code.sf.net/p/doublecmd/code/trunk output did not specify the current revision
Rebasing SVN changes
Pushing to GitHub
Saving Git directory to cache
Traceback (most recent call last):
File "../svn2github.py", line 156, in sync_github_mirror
save_cache(cache_path, os.path.join(tmp_dir, "cache.tar"), git_dir)
File "../svn2github.py", line 101, in save_cache
proc.run(["tar", "-cf", tmp_path, "."], check=True, cwd=dot_git_dir, stderr=DEVNULL, stdin=DEVNULL, stdout=DEVNULL)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['tar', '-cf', 'C:\Users\aaa\AppData\Local\Temp\svn2github-26mcadmd\cache.tar', '.']' returned non-zero exit status 128.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "../svn2github.py", line 178, in
main()
File "../svn2github.py", line 173, in main
sync_github_mirror(args.github_repo, args.cache_dir, new_svn_url=new_svn_url)
File "../svn2github.py", line 156, in sync_github_mirror
save_cache(cache_path, os.path.join(tmp_dir, "cache.tar"), git_dir)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\tempfile.py", line 805, in exit
self.cleanup()
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\tempfile.py", line 809, in cleanup
_shutil.rmtree(self.name)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 513, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
[Previous line repeated 1 more time]
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 397, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 395, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\Users\aaa\AppData\Local\Temp\svn2github-26mcadmd\repo\.git\objects\00\95ca19e71539bb5089625f360a304e1ad5e93c'

@cryham cryham changed the title Access is denied in Temp during git svn rebase Access is denied in Temp Mar 9, 2019
@cryham
Copy link
Author

cryham commented Mar 9, 2019

And I also tried doing an update command, which failed similarly:

$ python ../svn2github.py update stuntrally/doublecmd-test
Cloning [email protected]:stuntrally/doublecmd-test.git
Checking for SVN updates
Traceback (most recent call last):
File "../svn2github.py", line 132, in sync_github_mirror
upstream_revision = get_last_revision_from_svn(git_svn_info.svn_url)
File "../svn2github.py", line 22, in get_last_revision_from_svn
result = proc.run(["svn", "info", svn_url], check=True, stderr=DEVNULL, stdin=DEVNULL, stdout=PIPE)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 775, in init
restore_signals, start_new_session)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1119, in _execute_child
args = list2cmdline(args)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 530, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "../svn2github.py", line 178, in
main()
File "../svn2github.py", line 173, in main
sync_github_mirror(args.github_repo, args.cache_dir, new_svn_url=new_svn_url)
File "../svn2github.py", line 156, in sync_github_mirror
save_cache(cache_path, os.path.join(tmp_dir, "cache.tar"), git_dir)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\tempfile.py", line 805, in exit
self.cleanup()
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\tempfile.py", line 809, in cleanup
_shutil.rmtree(self.name)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 513, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 392, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
[Previous line repeated 1 more time]
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 397, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\aaa\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 395, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\Users\aaa\AppData\Local\Temp\svn2github-y1i09020\repo\.git\objects\pack\pack-d33e6308b0b4d309d936477ed890dd447d80cf12.idx'

@cryham
Copy link
Author

cryham commented Mar 10, 2019

Okay I did it with:
git svn clone http://svn.code.sf.net/p/doublecmd/code/trunk .
and then just doing
git svn rebase
updates git master, with new svn revisions only (since last time).

I made a branch for my fork development, and now I don't even see why I'd use svn2github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant