Problem with 'rbt diff' and empty files in RBTools 0.6.2

42 views
Skip to first unread message

Bruce Cran

unread,
Jul 22, 2014, 1:26:38 PM7/22/14
to revie...@googlegroups.com
There's a problem with the empty files detection code in at least the Mercurial client of RBTools 0.6.2: it's adding all the empty files that exist in the repository.  The relevant code is in Mercurial.py, _handle_empty_files():

        tip_empty_files = self._get_files_in_changeset(tip, get_empty=True)
        added_empty_files = tip_empty_files - base_files

        base_empty_files = self._get_files_in_changeset(base, get_empty=True)
        deleted_empty_files = base_empty_files - tip_files

        if not (added_empty_files or deleted_empty_files):
            return diff

--
Bruce

Anselina Chia

unread,
Jul 22, 2014, 7:25:11 PM7/22/14
to revie...@googlegroups.com
Can you give more details on how to reproduce this? (E.g., What rbt diff options did you pass, if any? Were there only modified files or were there also added/deleted files?)

Thanks!
Anselina

Bruce Cran

unread,
Jul 22, 2014, 7:33:28 PM7/22/14
to revie...@googlegroups.com
There were some non-empty added files, along with modifications; I just ran 'rbt post -o' to create the review - it used the branch, server and repository from the .reviewboardrc file.

--
Bruce

Anselina Chia

unread,
Jul 22, 2014, 7:53:39 PM7/22/14
to revie...@googlegroups.com
Hm, I just tried it with several non-empty added files and modified files, but things seem fine here. Can you maybe add some debug statements to verify if the files in the sets base_files, tip_files, tip_empty_files, base_empty_files, added_empty_files, and deleted_empty_files are as expected?

--
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 a topic in the Google Groups "reviewboard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/RhTej0Tc3vU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bruce Cran

unread,
Jul 22, 2014, 8:29:31 PM7/22/14
to revie...@googlegroups.com
From debugging earlier today, added_empty_files and deleted_empty_files were both the same, and contained the list of empty files that were already in the repository.
base_files and tip_files looked correct - I'll go back and do some more debugging tomorrow.

--
Bruce

Bruce Cran

unread,
Aug 26, 2014, 12:15:13 AM8/26/14
to revie...@googlegroups.com, Anselina Chia
Sorry, I never got around to debugging this and haven't had any more reports of problems from users, so I think we can ignore it for now and investigate further if other people bump into it.

--
Bruce

Bruce Cran

unread,
Sep 6, 2014, 11:03:19 PM9/6/14
to revie...@googlegroups.com
I spoke too soon! Another user has reported the same problem and asked me how to "get rid of the garbage files".   I'll file a bug report and debug this next week.

--
Bruce
Reply all
Reply to author
Forward
0 new messages