How to use Node to get svn user information and nodesvn user information

Source: Internet
Author: User

How to use Node to get svn user information and nodesvn user information
How to use Node to get svn user information

Currently, we still use svn for version control. Sometimes we need to monitor a person's code, while svn username is the best user tag.
So how do we get some svn information?

Assume that you are usingmacAs a development machine.
Below, I provide some code.

/*** [Obtain user information through svn] * @ param {[type]} host [svn repository host address, for example, 192.168.1.1: 80] * @ param {Function} cb [callback after obtaining] */var getUserInfo = function (host, cb) {var cmd = 'CD ~ /. Subversion/auth/svn. simple/& ls | xargs cat $1 'child_process.exec (cmd, function (err, data) {var fragment = data. split (host) [1]; fragment. replace (/username \ n. + \ n (\ w +) \ n/, function () {cb & cb (arguments [1]) ;});}

The Code is a little simple, but in node as the development environment and svn as the version control, this method has been tried and tested.

If windows is used as the development machineSub-Process MethodYes. However, you can usefs.
If there is time later, I willsvnOpen-source tools to solve some code building problems.

However, there are currently fewer and fewer companies using svn. In addition to some older and important code that is still in svn, others have switched to git.

Let's continue with git.

You can see my blog http://hirra.cn/2015/01/03/node at present there are not many, but will be slowly added in the future.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.