Command Line for the Beautifier.

Rahul P

Member²
We are implementing Mercurial as our source control solution.

I love it but, unfortunately doesn't have integration with PL/SQL Developer, but, I digress.

One of the things I wanted to see if we have a command line interface for the PL/SQL Developer's beautifier tool. This would help in making sure all the developers are beautifying their code before they commit/push their code into our source control. I can come up with a batch process which gets tagged onto the commit/push command they would be given to use.
 
We are implementing Mercurial as our source control solution.

I love it but, unfortunately doesn't have integration with PL/SQL Developer, but, I digress.
If Mercurial provides a Microsoft SCC interface option then it can be used with the VCS Plug-In.

One of the things I wanted to see if we have a command line interface for the PL/SQL Developer's beautifier tool.
In the Command Window you can use the BEAUTIFY command (see chapter 8.3) to beautify objects and files. To run such a script from the Windows command-line, you can use the COMMANDFILE parameter. For example:

plsqldev.exe userid=scott/tiger@chicago commandfile=c:\tmp\beaut_cmd.pdc
 
Marco,

I have a real issue right now. I tried the beautifier from the command line in plsql command window and it wiped out the whole file contents. Anyway I can get it back? I don't have a backup of this file.

SQL> beaut C:\Users\Fill1\om_*****.bdy
Beautifying file: C:\Users\Fill1\om_****.bdy
Failed: PL/SQL Beautifier could not parse text

SQL> show beaut
SQL> set beaut W:\IT\PL_SQL\focus.br
SQL> beaut C:\Users\Fill1\om_***.bdy
Beautifying file: C:\Users\Fill1\om_**.bdy

PS: The stars are not regular expressions, but, what I used to obfuscate the actual name of the file.
 
Last edited:
Also, if I remember it right, the file contents were gone in the first command itself. When I got this error message:

Failed: PL/SQL Beautifier could not parse text
 
In case of an error the PL/SQL Beautifier should not update the file contents. We will check it out.

The file contents can perhaps be recovered from the database? All the sources will be there if they were previously compiled.
 
Yes, that is what I did. Luckily the compiled code was in the database and the production backup was taken yet.

Serves me right to not have synctoy setup on that folder. Thank you for your inputs.

Once and when it works, I will incorporate the command line interface for our developers to use. Thank you.
 
Back
Top