svn2github icon indicating copy to clipboard operation
svn2github copied to clipboard

Crash on updating Bochs repo

Open countingpine opened this issue 6 years ago • 2 comments

~/svn2github/svn2github.py --cache-dir ~/svn2github/bochs/ update countingpine/bochs
Cloning [email protected]:countingpine/bochs.git
Checking for SVN updates
Last upstream revision: 13547
Last mirrored revision: 13541
Fetching from SVN, revision 8547/13547
Rebasing SVN changes
Traceback (most recent call last):
  File "/home/matthew/svn2github/svn2github.py", line 178, in <module>
    main()
  File "/home/matthew/svn2github/svn2github.py", line 173, in main
    sync_github_mirror(args.github_repo, args.cache_dir, new_svn_url=new_svn_url)
  File "/home/matthew/svn2github/svn2github.py", line 149, in sync_github_mirror
    git_svn_rebase(git_dir)
  File "/home/matthew/svn2github/svn2github.py", line 65, in git_svn_rebase
    run_git_cmd(["svn", "rebase"], git_dir)
  File "/home/matthew/svn2github/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 "/usr/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'svn', 'rebase']' returned non-zero exit status 1.

I observed that it created a git repo in /tmp/svn2github-..., which vanished without being tarred to the cache folder. I reran the process while rsyncing to another folder, so I can provide a .git tar file if that would be helpful.

(Either way, it's worth grabbing the temp folder before it vanishes, since it takes an hour or few to pull the revisions down from SVN.)

Note: I have had success with the dosbox repo, so it's perhaps not an inherent problem in the script or the tools I'm using.

countingpine avatar Feb 07 '19 13:02 countingpine

I'm not fluent in Python, but I guess that I can retain the output from git svn rebase by removing stderr=DEVNULL from https://github.com/gabrys/svn2github/blob/4f74fff/svn2github.py#L35. So hopefully I will have a more helpful error soon.

countingpine avatar Feb 08 '19 20:02 countingpine

I reran the script, and it completed successfully. This time it said Fetching from SVN, revision 13549/13549, so perhaps on previous runs I lost connection during this step or something, and it didn't return an error that was picked up. Possibly that's a problem with git svn and not this script. If you don't think your script is at fault, feel free to close this issue.

countingpine avatar Feb 09 '19 00:02 countingpine