Get original file before changes

9 views
Skip to first unread message

rafid

unread,
May 22, 2018, 6:49:47 AM5/22/18
to Repo and Gerrit Discussion
Hi all
is there any easy way (REST API etc.) to get original fies before changes after commit?
For example, when I have to review code changes i want to compare changes in external tool which does not support current diff format.  can I get the changed files before and after so i can compare them each other on external tool?

Sven Selberg

unread,
May 22, 2018, 7:48:16 AM5/22/18
to rafid, Repo and Gerrit Discussion

From the change you get the patchset and parent sha-1 and then use this endpoint:

https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#get-content-from-commit

To get the file before (parent) and after (patchset).


/Sven


From: repo-d...@googlegroups.com <repo-d...@googlegroups.com> on behalf of rafid <rafiD...@gmail.com>
Sent: Tuesday, May 22, 2018 12:36 PM
To: Repo and Gerrit Discussion
Subject: Get original file before changes
 
Hi all
is there any easy way (REST API etc.) to get original fies before changes after commit?
For example, when I have to review code changes i want to compare changes in external tool which does not support current diff format.  can I get the changed files before and after so i can compare them each other on external tool?

--
--
To unsubscribe, email repo-discuss...@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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages