Async review process with intellij and git?

Answered

We have tooling around a synchronous(developer posts a git branch for review but it's not submitted to CI to land on master yet) AND tooling around asynchronous reviews where developers runs a command that posts 2 git branches...

  • branch 1 is processed by CI which merges master, builds, success-> push to master and delete branch 1 (branch name is submit_{devname}/{workdone})
  • branch 2 is posted for async review called (branch name is asyncreview_{devname}/{workdone}

Is there a command I can run that will take TWO git hashes(or lightweight tags may be better tbh and our tooling can pretag with branch names to be removed by review done tooling) and compare them in the nice intellij diff GUI and popup the review window?  We would prefer reviews to be done in intellij (it locks us in to intellij a bit more as some do use eclipse but the review tool is just so nice).

Any way to launch that?  We have a prepareForAsyncReview.sh script people run so adding a one line to open up intellij would rock!!!

thanks,

Dean

0
3 comments

In IDEA, you can select any 2 commits in the Log view and call Compare Versions from the context menu.

 

This is not possible via command line though, as IDEA command-line launcher does not support diffing git revisions.

As a workaround, you can configure IDE as a gits difftool and call diff between arbitrary hashes or tags via git.

See https://www.git-scm.com/docs/git-difftool

This, however, will only allow comparing individual file, and not the entire changeset.

0

The git graph was VERY nasty in intellij log view @... BUT recently we figured out it was because CI was not squashing commits.  once we go there, our log view went completely linear making that easier.  We were also hoping to do some things and then open Intellij but that's fine.

 

I do however wish the compare window was not modal as it blocks me working/fixing changes on an async review that was put into the code which is sort of frustrating.  IS there a way to make the window not modal? so I can put it on one screen and be making changes in the main intellij in another?

0

> IS there a way to make the window not modal?

No, unfortunately. https://youtrack.jetbrains.com/issue/IDEA-140925

0

Please sign in to leave a comment.