Retry fetching a file using the base commit id if fetching it using the original rev fails

Review Request #5965 — Created June 10, 2014 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x

Reviewers

When developing with Mercurial, a common workflow is to be working on a series of patches at any one time, and push/pop them as required. So, "hg log" might list something like:

5 qtip [mq] patch3
4 [mq] patch2
3 [mq] patch1
2 qparent second checkin
1 first checkin

When creating a review request, 'rbt post qtip' creates two diffs: from 2-4 (the parent diff) and 4-5 (diff in review). The problem occurs when a file is changed in patch3 that's not in any of the previous patches. In this case, the diff in review is relative to changeset 4, but "hg cat -r 4 path/to/a/file" fails because the file isn't in the parent diff.

Work around this problem by trying to get a file from the base commit id if fetching it via the revision recorded in the diff fails.

Pushed 4 patches and ran 'rbt post qtip'; verified that the diff viewer showed all of the changes.

    Loading...