Re: Git style mercurial diffs with file renames don't work
I submitted the patch that enabled Mercurial rename support a few years ago. For the most part it works well but there are definitely cases where it doesn't and I haven't been able to pin them all down. I think it may be something to do with whether the original file was added or changed in the parent diff, in which case the master repo may not know about it. I also know there's a bug where if a file has been renamed but there is no change to its content, the diff doesn't display correctly. Colin On 9/16/2014 6:39 AM, Sara Rayburn wrote: Hi, We have a problem where the diff viewer for diffs with rename operations. We use mercurial, and output the diff in git style. Here's a trivial example diff file: diff --git a/include/CCvideo/configUI.H b/include/CCvideo/configUITest.H rename from include/CCvideo/configUI.H rename to include/CCvideo/configUITest.H In the Diff summary section is: include/CCvideo/configUITest.H http://reviewboard.cctechnol.com/r/4112/diff/#0 Was include/CCvideo/configUI.H So I guess the rename works up to a point, but this is the error in the view diff page: The file 'include/CCvideo/configUI.H' (rUNKNOWN) could not be found in the repository This may be a bug in the software, a temporary outage, or an issue with the format of your diff. Please try again, and if you still have trouble, contact support http://reviewboard.cctechnol.com/support/. With traceback as follows: Traceback (most recent call last): File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 236, in get renderer = self.create_renderer(context, *args, **kwargs) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/reviews/views.py, line 1088, in create_renderer *args, **kwargs) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 328, in create_renderer self.diff_file = self._get_requested_diff_file() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 369, in _get_requested_diff_file request=self.request) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/diffutils.py, line 383, in populate_diff_chunks chunks = generator.get_chunks() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 153, in get_chunks large_data=True) File /usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/backend.py, line 111, in cache_memoize data = lookup_callable() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 152, in lambda lambda: list(self._get_chunks_uncached()), File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 159, in _get_chunks_uncached old = get_original_file(self.filediff, self.request, encoding_list) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/diffutils.py, line 169, in get_original_file request=request) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 291, in get_file large_data=True)[0] File /usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/backend.py, line 111, in cache_memoize data = lookup_callable() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 290, in lambda request)], File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 456, in _get_file_uncached data = self.get_scmtool().get_file(path, revision) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/hg.py, line 43, in get_file return self.client.cat_file(path, six.text_type(revision)) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/hg.py, line 264, in cat_file raise FileNotFoundError(path, rev) FileNotFoundError: The file 'include/CCvideo/configUI.H' (rUNKNOWN) could not be found in the repository -- 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 mailto:reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/ --- Sign up for Review Board hosting at RBCommons:
Re: Git style mercurial diffs with file renames don't work
Hi Sara, Definitely looks like a bug in how we're representing the revisions. Would you be able to file a bug and provide a full diff (of a trivial file or something) that we can use to reproduce the problem? Thanks, Christian -- Christian Hammond - christ...@beanbaginc.com Review Board - https://www.reviewboard.org Beanbag, Inc. - https://www.beanbaginc.com On September 16, 2014 at 6:39:26 AM, Sara Rayburn (sararayb...@gmail.com) wrote: Hi, We have a problem where the diff viewer for diffs with rename operations. We use mercurial, and output the diff in git style. Here's a trivial example diff file: diff --git a/include/CCvideo/configUI.H b/include/CCvideo/configUITest.H rename from include/CCvideo/configUI.H rename to include/CCvideo/configUITest.H In the Diff summary section is: include/CCvideo/configUITest.H Was include/CCvideo/configUI.H So I guess the rename works up to a point, but this is the error in the view diff page: The file 'include/CCvideo/configUI.H' (rUNKNOWN) could not be found in the repository This may be a bug in the software, a temporary outage, or an issue with the format of your diff. Please try again, and if you still have trouble, contact support . With traceback as follows: Traceback (most recent call last): File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 236, in get renderer = self.create_renderer(context, *args, **kwargs) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/reviews/views.py, line 1088, in create_renderer *args, **kwargs) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 328, in create_renderer self.diff_file = self._get_requested_diff_file() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 369, in _get_requested_diff_file request=self.request) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/diffutils.py, line 383, in populate_diff_chunks chunks = generator.get_chunks() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 153, in get_chunks large_data=True) File /usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/backend.py, line 111, in cache_memoize data = lookup_callable() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 152, in lambda: list(self._get_chunks_uncached()), File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 159, in _get_chunks_uncached old = get_original_file(self.filediff, self.request, encoding_list) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/diffutils.py, line 169, in get_original_file request=request) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 291, in get_file large_data=True)[0] File /usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/backend.py, line 111, in cache_memoize data = lookup_callable() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 290, in request)], File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 456, in _get_file_uncached data = self.get_scmtool().get_file(path, revision) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/hg.py, line 43, in get_file return self.client.cat_file(path, six.text_type(revision)) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/hg.py, line 264, in cat_file raise FileNotFoundError(path, rev) FileNotFoundError: The file 'include/CCvideo/configUI.H' (rUNKNOWN) could not be found in the repository -- 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. -- 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,
Re: Git style mercurial diffs with file renames don't work
Done. Note that I was unable to attach the diffs to the bug as Issue attachment quota exceeded but they are very short, and I included the contents. https://code.google.com/p/reviewboard/issues/detail?id=3573thanks=3573ts=1411132852 Thanks. Sara On Friday, September 19, 2014 1:10:12 AM UTC-5, Christian Hammond wrote: Hi Sara, Definitely looks like a bug in how we're representing the revisions. Would you be able to file a bug and provide a full diff (of a trivial file or something) that we can use to reproduce the problem? Thanks, Christian -- Christian Hammond - chri...@beanbaginc.com javascript: Review Board - https://www.reviewboard.org Beanbag, Inc. - https://www.beanbaginc.com On September 16, 2014 at 6:39:26 AM, Sara Rayburn (sarar...@gmail.com javascript:) wrote: Hi, We have a problem where the diff viewer for diffs with rename operations. We use mercurial, and output the diff in git style. Here's a trivial example diff file: diff --git a/include/CCvideo/configUI.H b/include/CCvideo/configUITest.H rename from include/CCvideo/configUI.H rename to include/CCvideo/configUITest.H In the Diff summary section is: include/CCvideo/configUITest.H Was include/CCvideo/configUI.H So I guess the rename works up to a point, but this is the error in the view diff page: The file 'include/CCvideo/configUI.H' (rUNKNOWN) could not be found in the repository This may be a bug in the software, a temporary outage, or an issue with the format of your diff. Please try again, and if you still have trouble, contact support . With traceback as follows: Traceback (most recent call last): File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 236, in get renderer = self.create_renderer(context, *args, **kwargs) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/reviews/views.py, line 1088, in create_renderer *args, **kwargs) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 328, in create_renderer self.diff_file = self._get_requested_diff_file() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 369, in _get_requested_diff_file request=self.request) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/diffutils.py, line 383, in populate_diff_chunks chunks = generator.get_chunks() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 153, in get_chunks large_data=True) File /usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/backend.py, line 111, in cache_memoize data = lookup_callable() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 152, in lambda: list(self._get_chunks_uncached()), File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 159, in _get_chunks_uncached old = get_original_file(self.filediff, self.request, encoding_list) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/diffutils.py, line 169, in get_original_file request=request) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 291, in get_file large_data=True)[0] File /usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/backend.py, line 111, in cache_memoize data = lookup_callable() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 290, in request)], File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 456, in _get_file_uncached data = self.get_scmtool().get_file(path, revision) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/hg.py, line 43, in get_file return self.client.cat_file(path, six.text_type(revision)) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/hg.py, line 264, in cat_file raise FileNotFoundError(path, rev) FileNotFoundError: The file 'include/CCvideo/configUI.H' (rUNKNOWN) could not be found in the repository -- 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
Re: Git style mercurial diffs with file renames don't work
Yeah... we're having a lot of trouble getting Google to bump up our very limited attachment quota. We might be switching bug trackers in the future. Thanks for the bug! Christian -- Christian Hammond - christ...@beanbaginc.com Review Board - https://www.reviewboard.org Beanbag, Inc. - https://www.beanbaginc.com On September 19, 2014 at 6:23:32 AM, Sara Rayburn (sararayb...@gmail.com) wrote: Done. Note that I was unable to attach the diffs to the bug as Issue attachment quota exceeded but they are very short, and I included the contents. https://code.google.com/p/reviewboard/issues/detail?id=3573thanks=3573ts=1411132852 Thanks. Sara On Friday, September 19, 2014 1:10:12 AM UTC-5, Christian Hammond wrote: Hi Sara, Definitely looks like a bug in how we're representing the revisions. Would you be able to file a bug and provide a full diff (of a trivial file or something) that we can use to reproduce the problem? Thanks, Christian -- Christian Hammond - chri...@beanbaginc.com Review Board - https://www.reviewboard.org Beanbag, Inc. - https://www.beanbaginc.com On September 16, 2014 at 6:39:26 AM, Sara Rayburn (sarar...@gmail.com ) wrote: Hi, We have a problem where the diff viewer for diffs with rename operations. We use mercurial, and output the diff in git style. Here's a trivial example diff file: diff --git a/include/CCvideo/configUI.H b/include/CCvideo/configUITest.H rename from include/CCvideo/configUI.H rename to include/CCvideo/configUITest.H In the Diff summary section is: include/CCvideo/configUITest.H Was include/CCvideo/configUI.H So I guess the rename works up to a point, but this is the error in the view diff page: The file 'include/CCvideo/configUI.H' (rUNKNOWN) could not be found in the repository This may be a bug in the software, a temporary outage, or an issue with the format of your diff. Please try again, and if you still have trouble, contact support . With traceback as follows: Traceback (most recent call last): File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 236, in get renderer = self.create_renderer(context, *args, **kwargs) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/reviews/views.py, line 1088, in create_renderer *args, **kwargs) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 328, in create_renderer self.diff_file = self._get_requested_diff_file() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/views.py, line 369, in _get_requested_diff_file request=self.request) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/diffutils.py, line 383, in populate_diff_chunks chunks = generator.get_chunks() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 153, in get_chunks large_data=True) File /usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/backend.py, line 111, in cache_memoize data = lookup_callable() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 152, in lambda: list(self._get_chunks_uncached()), File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/chunk_generator.py, line 159, in _get_chunks_uncached old = get_original_file(self.filediff, self.request, encoding_list) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/diffviewer/diffutils.py, line 169, in get_original_file request=request) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 291, in get_file large_data=True)[0] File /usr/lib/python2.6/site-packages/Djblets-0.8.10-py2.6.egg/djblets/cache/backend.py, line 111, in cache_memoize data = lookup_callable() File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 290, in request)], File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/models.py, line 456, in _get_file_uncached data = self.get_scmtool().get_file(path, revision) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/hg.py, line 43, in get_file return self.client.cat_file(path, six.text_type(revision)) File /usr/lib/python2.6/site-packages/ReviewBoard-2.0.7-py2.6.egg/reviewboard/scmtools/hg.py, line 264, in cat_file raise FileNotFoundError(path, rev) FileNotFoundError: The file