[MERGE] Add base classes for foreign branches.
Martin Pool
mbp at canonical.com
Mon Nov 24 23:45:22 GMT 2008
Martin Pool has voted tweak.
Status is now: Resubmit
Comment:
This seems reasonable to me.
There should be two blank lines between top-level declarations -- like
before
the module docstring, and after the imports.
+class VcsMappingRegistry(registry.Registry):
+ """Registry for Bazaar<->foreign VCS mappings.
+
+ There should be one instance of this registry for every foreign
VCS.
+ """
What key do you use to look things up in this? Why do you need a
registry, rather than just one mapping per foreign vcs? (I guess to
allow
different revision id mappings over time, but it would be good to say
so.)
+ def dpull(self, source, stop_revision=None):
+ """Pull deltas from another branch.
+
+ :note: This does not, like pull, retain the revision ids from
+ the source branch and will, rather than adding bzr-specific
metadata,
+ push only those semantics of the revision that can be natively
+ represented in this branch.
+
+ :param source: Source branch
+ :param stop_revision: Revision to pull, defaults to last
revision.
+ """
+ raise NotImplementedError(self.pull)
The last line should be dpull?
+ self.outf.write("Using saved location: %s\n" %
display_url)
In passing, it'd be good to change this to "Pushing to saved
location..."
I don't think you register the dpush command?
This seems reasonable to me, if you find it useful for bzr-svn and
bzr-git
I have no objection to it.
--
Martin
For details, see:
http://bundlebuggy.aaronbentley.com/project/bzr/request/%3C20081112171444.GA14729%40charis.vernstok.nl%3E
Project: Bazaar
More information about the bazaar
mailing list