Querying list of files in merge change via gerrit API

1,081 views
Skip to first unread message

Igor

unread,
Oct 23, 2017, 10:51:31 AM10/23/17
to Repo and Gerrit Discussion
Hi all,

we've noticed recently that when querying list of files modified by a gerrit MERGE CHANGE via either REST API or ssh command it produces a list that is not complete.

When viewing files of merge change in Gerrit UI it allows to select parent 1 or parent 2 and naturally lists of files are different. In API it is not possible to select the parent, but I assume by default it compares with parent 1. However the list that we get does not contain all the actual changed files.

Will appreciate any help with this issue.

Thanks,
Igor.


Dave Borowitz

unread,
Oct 23, 2017, 11:07:54 AM10/23/17
to Igor, Repo and Gerrit Discussion
When you pass the {CURRENT,ALL}_FILES option, for a merge commit it lists the files changed relative to the auto-merge base, same as if you choose "Auto Merge" in the "Diff against" dropdown. You're correct that there is not currently an option to specify which parent you prefer when using the Query Changes API. Adding this might be a bit of work, but is a reasonable feature request.

For an individual change, you can choose which parent you want to diff against by passing the ?parent query parameter to the List Files endpoint:

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages