0

I'm the sole developer on a project that needs to be code reviewed using Phabricator. I've been using Git the whole time and everything is checked in and pushed.

I want to do the reviews one module at a time, reviewing the entire project would be too much. But I can't figure out how to do this. A few years ago I recall I did some updates on a project that did not use Git and I did the 'arc diff's using the output of a diff, but I can't seem to get that to work. arc diff --only --raw-command "diff -u empty.c process_adc.c" But that returns "Error #1". I also recall that when I did an 'arc diff' I would always do it with '--preview' so I could look at the result before I sent it on to a review, but that does not seem to work anymore and some site said that '--only' is the same.

So, some points:

  • The code-change is from nothing to something.
  • all the code is checked in and pushed
  • I want to review 1 file (c and h) at a time

I did find the instructions on how to install arcanist and that seems to be working well. I have also installed the certificate.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
MattR
  • 85
  • 3
  • 1
    I don't understand what is preventing you from reviewing one file at a time. – mkrieger1 Jan 18 '21 at 21:15
  • Can you tell me what I would type in to do that? – MattR Jan 19 '21 at 16:30
  • I'm not sure what you mean. In order to review code you don't have to type anything, you just have to look at the code. – mkrieger1 Jan 19 '21 at 16:31
  • By "review" I mean a phabricator review. [link](https://secure.phabricator.com/) not just viewing the code. Phabricator will not display anything unless arcanist (arc) pushed the code to it. – MattR Jan 19 '21 at 16:38

1 Answers1

1

I found the answer on the [https://discourse.phabricator-community.org] site after posting the question. This is not really what phabricator is meant for, but there is a hack to get around it. The hack works because of a trick with git. Here is the command line: git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 file1.c ../Inc/file1.h | arc diff --raw --only It works because 4b825dc642cb6eb9a060e54bf8d69288fbee4904 is a special number, I forget the details. But this produced exactly what I needed.

MattR
  • 85
  • 3
  • This works because 4b825dc642cb6eb9a060e54bf8d69288fbee4904 is the empty tree and you basically diff from empty to your current status. – mnagel Apr 12 '21 at 20:04