Code review comment for lp:~spiv/bzr/repo-refresh-data-574236

Revision history for this message
Robert Collins (lifeless) wrote :

@@ -1310,12 +1310,10 @@

         This method is intended to be called after another repository instance
         (such as one used by a smart server) has inserted data into the
- repository. It may not be called during a write group, but may be
+ repository. If called during a write group it may raise
+ IsInWriteGroupError (depending on repository format), but it may be
         called at any other time.

This could be clearer - I suggested
+ repository. On all repositories this will work outside of write groups.
+ Some repository formats (pack and newer for bzrlib native formats) support
+ refresh_data inside write groups. If called inside a write group on a
+ repository that does not support refreshing in a write group
+ IsInWriteGroupError will be raised.

(this just avoids a deeply conditional clause). Note that there are a couple of copies of the docstring.

I'd like the test to include the call to 'repo.all_revision_ids()' I suggested in the bug report, because that will exercise more code :)

so - tweak.

review: Needs Fixing

« Back to merge proposal