pear / pear-svn-git

tool to move pear svn repositories to git
5 stars 8 forks source link

On windows where no SVN_EDITOR is set often, 3-svn-remove.sh will fail #12

Closed CloCkWeRX closed 12 years ago

CloCkWeRX commented 12 years ago

Either this one should check for SVN_EDITOR, VISUAL or EDITOR, or it should be able to continue if the original repo has been removed and this is a second execution

doconnor@L00061 /c/pear-svn-git/Image_Puzzle (master)
$ ../3-svn-remove.sh Image_Puzzle

Committed revision 319023.

When you hit ENTER, an editor will open svn:externals for packages-all.
Please delete the line referring to Image_Puzzle.
Then save and close the editor.
(Press any key to continue.)

svn: E205007: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are
 set, and no 'editor-cmd' run-time configuration option was found
ERROR: could not edit properties of package-all.

doconnor@L00061 /c/pear-svn-git/Image_Puzzle (master)
$ export svn_editor=notepad.exe

doconnor@L00061 /c/pear-svn-git/Image_Puzzle (master)
$ ../3-svn-remove.sh Image_Puzzle
svn: E160013: URL 'https://svn.php.net/repository/pear/packages/Image_Puzzle' do
es not exist
ERROR: could not remove Image_Puzzle from svn.php.net.

doconnor@L00061 /c/pear-svn-git/Image_Puzzle (master)
$
till commented 12 years ago

Hmm... -m "super cool message"?

convissor commented 12 years ago

Till: the externals file itself is being edited.

till commented 12 years ago

At "work", we have a script to update vendor libs and modules which we include using svn:externals. We scripted it up and do something like this:

$current = `exec svn propget svn:externals $path`;
// parse current >> $new
file_put_contents('./file', $new);
`exec svn propset svn:externals $path -F file`
unlink('./file');
`svn ci -m 'externals updated, blah blub' $path

(In a nutshell, pseudo-code.)

I'd probably make sure the $path is clean so you don't happen to commit other things.

convissor commented 12 years ago

Good idea Till. Script now manipulates the svn:externals locally.