How to use node to get SVN user information

Source: Internet
Author: User

How to use node to get SVN user information

We still use SVN for versioning, sometimes we have to monitor a person's code, and the SVN username is the best user tag.
So how do we get some svn information?

Assuming that everyone is using mac as the development machine.
below, I provide some code.

/** * [user information via SVN] * @param {[type]} host [address of the SVN repository, e.g. 192.168.1.1:80] * @param {functi on} CB [callback after get] */var GetUserInfo = function (HOST,CB) {var cmd = ' cd ~/.subversion/auth/svn.simple/&& ls |        Xargs cat $ ' 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 bit simpler, but in node as the development environment, SVN is the version control that works.

If you are using Windows as your development machine, use子进程的方式is not possible. But you can pass somefsTo replace the operation.
If there is time behind, I will put somesvnTools to solve some code-building problems.

But aside from that, the number of companies that are now using SVN is getting smaller, with the exception of some of the oldest and most important codes in SVN, all of which turn to git.

Let's go to git.

You can look at my blog Http://hirra.cn/2015/01/03/node There are not many things in the present, but the follow-up will slowly add.

How to use node to get SVN user information

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.