Merge lp:~spiv/bzr/repo-refresh-data-574236 into lp:bzr

Proposed by Andrew Bennetts
Status: Merged
Merge reported by: Gary van der Merwe
Merged at revision: not available
Proposed branch: lp:~spiv/bzr/repo-refresh-data-574236
Merge into: lp:bzr
Diff against target: 0 lines
To merge this branch: bzr merge lp:~spiv/bzr/repo-refresh-data-574236
Reviewer Review Type Date Requested Status
Robert Collins (community) Needs Fixing
Review via email: mp+24653@code.launchpad.net

Description of the change

Relax the limitations of refresh_data. See the linked bug and NEWS entry for details.

To post a comment you must log in.
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
Revision history for this message
Andrew Bennetts (spiv) wrote :

Thanks. I've made the suggested changes, and am sending to PQM now.

Preview Diff

Empty