I think the following should fix the problem: if we can't fetch a file using the revision recorded in the diff, try using the base commit id instead:
diff --git a/reviewboard/scmtools/models.py b/reviewboard/scmtools/models.py index 7f1dd43..820814b 100644 --- a/reviewboard/scmtools/models.py +++ b/reviewboard/scmtools/models.py @@ -17,6 +17,7 @@ from reviewboard.scmtools.managers import RepositoryManager, ToolManager from reviewboard.scmtools.signals import (checked_file_exists, checking_file_exists, fetched_file, fetching_file) +from reviewboard.scmtools.core import FileNotFoundError from reviewboard.site.models import LocalSite @@ -367,7 +368,10 @@ class Repository(models.Model): revision, base_commit_id=base_commit_id) else: - data = self.get_scmtool().get_file(path, revision) + try: + data = self.get_scmtool().get_file(path, revision) + except FileNotFoundError: + data = self.get_scmtool().get_file(path, base_commit_id) log_timer.done() On Thu, Jun 5, 2014 at 2:50 PM, Bruce Cran <bruce.c...@gmail.com> wrote: > I don't know if it used to work with RBTools, but people have said it used > to work with 'hg postreview -m qparent'. > Running 'rbt post tip' or 'rbt post --parent=qparent tip' results in > Review Board saying it can't display the diff where there are changes in a > file which also has changes in other patches (which, since they haven't > been pushed yet, are unknown to RB). > > -- > Bruce > > > > On Thu, Jun 5, 2014 at 2:37 PM, Christian Hammond < > christ...@beanbaginc.com> wrote: > > I don’t know of anything on the RB side that would have changed here. It >> should just accept what’s given by the client. Were you able to do it >> before with RBTools? >> >> If you’re just trying to post the top-most commit, then (at least with >> Git) you’d do: >> >> $ rbt post HEAD >> >> Replace HEAD with whatever you need to identify the particular commit you >> care about. RBTools should take care of calculating the parent for you. >> >> >> -- Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/ --- Sign up for Review Board hosting at RBCommons: https://rbcommons.com/ --- Happy user? Let us know at http://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.