[RFC] make _parse_revision_str a first class function
John Arbash Meinel
john at arbash-meinel.com
Tue Jan 16 15:54:34 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
James Westby wrote:
> Hi all,
>
> I have another request for something I would like to do with builddeb.
>
> I would like to be able to refer to revisions on another branch with an
> option, but reserve the -r for later implementing building a revision.
> This means that I am currently using
>
> type=_parse_revision_str
>
> in an option.
>
> Obviously this isn't great. I would like it if something could be done
> to provide a way to pass something to type that I can rely upon with the
> normal deprecation rules.
>
> Apologies if this is too disgusting to contemplate, or the interface is
> already there and I missed it.
>
> Thanks,
>
> James
I would be okay with making '_parse_revision_str' a public function.
Though it might make more sense to put it in bzrlib/revisionspec.py,
since it always returns a RevisionSpec object.
However, I have to wonder why:
bzrlib.revisionspec.RevisionSpec.from_string() is insufficient for what
you need.
The only difference is that _parse_revision_spec handles ranges. So you
can do "X..Y", rather than only supporting a single "X".
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFrPU6JdeBCYSNAAMRAszEAKCd/vim/X9hWgW5sELt6reL39VAigCfUUww
PfOJiFylSKJ7eW20wEEW8nw=
=pgNg
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list