~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_foreign.py

  • Committer: Jelmer Vernooij
  • Date: 2009-10-19 00:54:12 UTC
  • mto: This revision was merged to the branch mainline in revision 4759.
  • Revision ID: jelmer@samba.org-20091019005412-9q5fgdh1sf2o3238
Allow specifying an abbreviation for foreign vcs'es and an optional function to serialize foreign revision ids.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        self.mapping_registry = DummyForeignVcsMappingRegistry()
75
75
        self.mapping_registry.register("v1", DummyForeignVcsMapping(self),
76
76
                                       "Version 1")
 
77
        self.abbreviation = "dummy"
77
78
 
78
79
    def show_foreign_revid(self, foreign_revid):
79
80
        return { "dummy ding": "%s/%s\\%s" % foreign_revid }
80
81
 
 
82
    def serialize_foreign_revid(self, foreign_revid):
 
83
        return "%s|%s|%s" % foreign_revid
 
84
 
81
85
 
82
86
class DummyForeignVcsBranch(branch.BzrBranch6,foreign.ForeignBranch):
83
87
    """A Dummy VCS Branch."""