I have set up subclipse for SVN on eclipse. Sometimes, we forget to remove console.logs() in the JavaScript source files and these are causing some errors on IE
So I was thinking if there could be an alert message that can be shown if subclipse detects any console.logs() during SVN Commit or it would be better if it could completely erase those console.logs() all together!(I Know I’m Asking For More Here!).
Thanks in advance guys.
Your best option is to perform a check at the server via a
pre-commithook script. Inspect the content coming in; if any JS file contains uncommentedconsole.logs()statements (or any instances ofconsole.logs(), period), reject the commit & inform the user why.You may have to maintain a working copy on the server to apply the diffs to, to perform this check properly.
If you try to do any checking at the client end, you will have to configure each client separately and trust that users only use the client that you’ve configured. Assuming you have any SVN clients that offer this functionality (I’m only aware of TortoiseSVN allowing for anything remotely like this).
Your Subversion client and server should never automatically “purge” lines as you suggest in that last paragraph. You’ll inevitably lose content you don’t want to lose, and break your builds.