Svn-commit editor error on Mac

2014-10-19 18:37:35

If you are trying to commit the source code in SVN very first time and you see the following error that means You have not set the correct editor for the SVN.

If you look closely the SVN suggests the possible fixes.

svn commit svn: Commit failed (details follow): svn: Could not use external editor to fetch log message; consider setting the $SVNEDITOR environment variable or using the --message (-m) or --file (-F) options svn: None of the environment variables SVNEDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found

Possible fixes

You can use either of the following options.

  • Set the one of the following global variables’ value in ~/.bashrc file. The value can be your favorite editor command e.g vim, emac, nano, gedit etc.

export SVN_EDITOR=vim export VISUAL=vim export EDITOR=vim

Once the above line is set in the ~/.bashrc file, then run the following command.

source ~/.bashrc

Now try to run SVN commit command again. This time SVN will ask you to provide the commit message in the editor. You can provide the commit message, save it, and exit.

  • If you don’t like setting the global variable, you can provide the editor command during the execution of svn commit command like as following. svn commit --editor-cmd vim

In the above command I have specified vim . You can specify your favorite editor command.
- There is another shortcut, you can provide the commit message inline. svn commit -m "Your commit message!"

Hope one of the above solutions will fix your problem. If you have figured out other way to fix it, then please share it in the comment section. If you like this post, please share it using social media buttons given on the left side of this page. Please feel free to leave your comments or suggestions about the above post or the website. Thank you.

Mac下SVN的使用

在Windows环境中,一般使用TortoiseSVN来搭建svn环境。在Mac环境下,由于Mac自带了svn的服务器端和客户端功能,所以我们可以在不装任何第三方软件的前提下使用svn功能,不过还需做一下简单的配置。 如果你有安装XCode,只需要在code > Preferences > download > Command Line Tools > Install即可,速度很快,基本1分钟搞定。 这个Command Line Tools包含最新的SVN。然后如果你没有安装XCode的话,就会很痛苦,采用这种办法就会很痛苦,因为XCode接近于1.5GB了!尤其是对于那些只是需要SVN,而不会用到XCode的朋友来讲。 幸运的是,可以做到在没有安装XCode 的前提下安装SVN,只需要在Apple Developer网站下载一个116MB的https://developer.apple.com/downloads/index.action Command Line Tools(OS X Mountain Lion)独立安装包。当然你需要一个Apple Developer的ID(可以免费注册的)。 安装之后,可以适用Terminal来确认一下你的SVN版本:

document.getElementById("xx").style.xxx中的所有属性

盒子标签和属性对照CSS语法(不区分大小写)JavaScript语法(区分大小写)borderborderborder-bottomborderBottomborder-bottom-colorborderBottomColorborder-bottom-styleborderBottomStyleborder-bottom-widthborderBottomWidthborder-colorborderColorborder-leftborderLeftborder-left-colorborderLeftColorborder-left-styleborderLeftStyleborder-left-widthborderLeftWidthborder-rightborderRightborder-right-colorborderRightColorborder-right-styleborderRightStyleborder-right-widthborderRightWidthborder-styleborderStyleborder-topborderTopborder-top-colorborderTopColorborder-top-styleborderTopStyleborder-top-widthborderTopWidthborder-widthborderWidthclearclearfloatfloatStylemarginmarginmargin-bottommarginBottommargin-leftmarginLeftmargin-rightmarginRightmargin-topmarginToppaddingpaddingpadding-bottompaddingBottompadding-leftpaddingLeftpadding-rightpaddingRightpadding-toppaddingTop颜色和背景标签和属性对照CSS 语法(不区分大小写)JavaScript 语法(区分大小写)backgroundbackgroundbackground-attachmentbackgroundAttachmentbackground-colorbackgroundColorbackground-imagebackgroundImagebackground-positionbackgroundPositionbackground-repeatbackgroundRepeatcolorcolor 样式标签和属性对照CSS语法(不区分大小写)JavaScript 语法(区分大小写)displaydisplaylist-style-typelistStyleTypelist-style-imagelistStyleImagelist-style-positionlistStylePositionlist-stylelistStylewhite-spacewhiteSpace 文字样式标签和属性对照CSS 语法(不区分大小写)JavaScript 语法(区分大小写)fontfontfont-familyfontFamilyfont-sizefontSizefont-stylefontStylefont-variantfontVariantfont-weightfontWeight 文本标签和属性对照CSS 语法(不区分大小写)JavaScript 语法(区分大小写)letter-spacingletterSpacingline-breaklineBreakline-heightlineHeighttext-aligntextAligntext-decorationtextDecorationtext-indenttextIndenttext-justifytextJustifytext-transformtextTransformvertical-alignverticalAlign