Another great advantage of Yetus is we can check files from it’s URL.
I have explained how to use Apache Yetus for checking local patch files in my previous article.
(https://goo.gl/7ZxrNA).
I have explained how to use Apache Yetus for checking local patch files in my previous article.
(https://goo.gl/7ZxrNA).
For example we have a patch file in https://patch-diff.githubusercontent.com/raw/apache/incubator-rya/pull/45.patch and we can check it directly with Yetus.
In this article I’m going to explain how to how to use URLs with Apache Yetus.
First we have to set-up Yetus in our pc (as explained in my previous article).
For Yetus we have to use Github projects always. Otherwise we get an error message,
“ERROR: /your/project/location is not a git repo.”
So when we check patch files, we have to download/clone the particular project from Github. Here I’m using Apache Rya project.
After this checking process some text files and log files automatically get saved in our pc. So we have to specify a location for this. Otherwise they will be saved in our our home directory and look like a mess.
Now ,
- the github project is in “/home/amila/rya/new-rya-builds3/incubator-rya/”
It is not safe to test the files from your working repository. So i recommend that you use another project location for testing.
- patch file url- https://patch-diff.githubusercontent.com/raw/apache/incubator-rya/pull/45.patch
- The extracted Yetus files are in “/home/Installs/yetus-0.4.0/”
- The directory for outputs “/home/amila/incubator-rya”
Now all is set for testing the first patch file.
- Open the terminal
- cd /home/Installs/yetus-0.4.0/bin
- Run the command
“./test-patch --basedir=/home/amila/rya/new-rya-builds3/incubator-rya --patch-dir=/home/amila/incubator-rya https://patch-diff.githubusercontent.com/raw/apache/incubator-rya/pull/45.patch”
Here --basedir refers to the directory of github project and after that the directory of the patch file.
--patch-dir refers to the directory of output files.
In this the program checks only the compilation of the patch file. No xml issues or whitespace issues are indicated. So the output will be Success.
But if we check the patch fill with --plugins=all the program will check the patch file with it’s xml issues as well.
So we need to add the --plugins=all option to the previous command.
New command is
“./test-patch --basedir=/home/amila/rya/new-rya-builds3/incubator-rya --patch-dir=/home/amila/incubator-rya --plugins=all https://patch-diff.githubusercontent.com/raw/apache/incubator-rya/pull/45.patch”
The output is as follows. It specifies all the areas of the patch file.
Great work. Keep it up.
ReplyDeleteThank You
Delete