In this post, I am trying to share an implementation to get Growl kind of message notifications in ZK based application. In summary, Idea is to have JQuery for notifications and make javascript calls from java code in ZK. I chose jquery plug-in developed by Eric from his blog hereġ) Download jquery and plugin available hereĢ) Include plugin in. I kept this in my template file header area of applicationģ) Create two div tags, one for regular notifications and one for error messages in zul file. One for success messages and another one for both warning and error message. You can create as many as you want to display messages in different styles.Ĥ) Added code to call notify() method on page load (as explained for jquery)ĥ) Added below javascript code to one of js filesįunction displayNotificationMessage(messageTitle, message) else if (message.getSeverity() = ZKMessage.It opens a GUI that steps you through each conflict, and you get to choose how to merge. Sometimes it requires a bit of hand editing afterwards, but usually it's enough by itself. It is much better than doing the whole thing by hand certainly. doesn't necessarily open a GUI unless you install one. Running git mergetool for me resulted in vimdiff being used. Step 1: Run following commands in your terminal git config merge.tool vimdiff git config nflictstyle diff3 git config mergetool.prompt false You can install one of the following tools to use it instead: meld, opendiff, kdiff3, tkdiff, xxdiff, tortoisemerge, gvimdiff, diffuse, ecmerge, p4merge, araxis, vimdiff, emerge.īelow is a sample procedure using vimdiff to resolve merge conflicts, based on this link. MERGED – merge result, this is what gets saved in the repo REMOTE – file you are merging into your branch LOCAL – this is file from the current branchīASE – common ancestor, how file looked before both changes Step 2: Run following command in terminal git mergetool This will set vimdiff as the default merge tool. You can navigate among these views using ctrl+ w. You can directly reach MERGED view using ctrl+ w followed by j. Here's a probable use case, from the top: If you want to get changes from LOCAL :diffg LO If you want to get changes from BASE :diffg BA If you want to get changes from REMOTE :diffg RE You could edit the MERGED view the following way More information about vimdiff navigation is here and here. You're going to pull some changes, but oops, you're not up to date: git fetch origin git pull origin master From ssh:// :22/projectname * branch master -> FETCH_HEAD Updating a030c3a.ee25213 error: Entry 'filename.c' not uptodate. So you decide to take a look at the changes: git mergetool So you get up-to-date and try again, but have a conflict: git add filename.c git commit -m "made some wild and crazy changes" git pull origin master From ssh:// :22/projectname * branch master -> FETCH_HEAD Auto-merging filename.c CONFLICT (content): Merge conflict in filename.c Automatic merge failed fix conflicts and then commit the result. Oh my, oh my, upstream changed some things, but just to use my changes.no.their changes. Git checkout -ours filename.c git checkout -theirs filename.c git add filename.c git commit -m "using theirs"Īnd then we try a final time git pull origin master From ssh:// :22/projectname * branch master -> FETCH_HEAD Already up-to-date.
0 Comments
Leave a Reply. |