[MERGE] Add a smart method method that can pull a set of revisions in a single request
Andrew Bennetts
andrew at canonical.com
Thu Aug 16 02:34:17 BST 2007
Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Andrew Bennetts wrote:
> > The attached bundle adds a 'Repository.fetch_revisions' smart request that can
> > transfer many revisions in a single request, and uses it for fetching from a
> > RemoteRepository.
>
> I'm kinda disappointed not to see support for converting data from one
> repo format to another.
One thing at a time :)
> Also, you appear to be using the naïve approach to determining what file
> versions need to be shipped: fileids_altered_by_revision_ids. This
> won't work with bzr.dev due to bogus old data. But Bundle Format 4 does
> solve this. See BundleWriteOperation.iter_file_revisions_aggressive.
Yeah, something needs to be done about the bogus data in bzr.dev. Thanks for
telling me about iter_file_revisions_aggressive, I'll take a look.
> Maybe you should use Bundle 4 instead of writing your own data stream.
> It would be smaller, too.
This is an interesting idea. I'll look into this. It would be nice to reuse
code.
> > I've attached a bundle and a diff. The bundle is the complete branch that can
> > apply to bzr.dev, including the dependent branches. The diff shows just the
> > changes introduced by this branch that aren't in the already submitted branches.
>
> Specifying -r no longer creates unmergeable bundles. So I think you
> could have just done that. On the other hand, it's the first time I've
> seen someone send a bundle without a preview patch, so that's kinda
> cool. On the gripping hand, your patch doesn't show up in Bundle Buggy
> (which only shows the first patch).
"bzr send --help" doesn't tell me what "-r" actually does. It changes the
human-readable patch, but not the bundle?
(We really should fix our help; "See 'help revisionspec' for details." is rarely
adequate help for understanding what "-r" will do on a particular command, nor
does "bzr help revisionspec" actually directly describe the syntax of the
argument to "-r", instead it describes the syntax of the various "foo:"
revisionspecs, without explaining e.g. how revision ranges work. I'll file bugs
about this.)
Another drawback to submitting that bundle is that it appears Bundle Buggy
considers it to have superseded the two bundles it depended on (because it
includes their revisions). It would be nice to have an obvious way to submit
branches that depend on other branches that Just Worked without thinking, the
way "bzr send" now Just Works for a single branch off bzr.dev. A hack might be
to use a dependent branch as the target branch, but in this case this branch
depended on two others...
Anyway, I'm about to land the dependent branches, so I shouldn't worry too
much. :)
> > + def insert_data_stream(self, stream):
> > + self._ensure_real()
> > + self._real_repository.insert_data_stream(stream)
>
> I do hope you're planning on fixing push...
Definitely!
-Andrew.
More information about the bazaar
mailing list