[PATCH] Latest bzr.dev fails to merge with revision spec

Lalo Martins lalo at exoweb.net
Sun Sep 18 01:57:45 BST 2005


And so says John A Meinel on 17/09/05 23:27...
> Specifically, trying to instantiate a RevisionSpec object when you
> already have one causes a weird error (it actually tries to int() the
> object, which throws a TypeError instead of ValueError, and is not handled).

Yeah... I have pondered RevisionSpec accepting a RevisionSpec as the
spec argument.  I decided I didn't see a case for that, any code that
needs it can probably be simplified.

But if this is wanted:
--- bzrlib/revisionspec.py
+++ bzrlib/revisionspec.py
@@ -109,6 +109,9 @@
         """
         if spec is None:
             return object.__new__(RevisionSpec, spec)
+
+        if isinstance(spec, RevisionSpec):
+            return spec

         try:
             spec = int(spec)



best,
                                               Lalo Martins
--
      So many of our dreams at first seem impossible,
       then they seem improbable, and then, when we
       summon the will, they soon become inevitable.
--
http://www.exoweb.net/                  mailto:lalo at exoweb.net
GNU: never give up freedom                 http://www.gnu.org/





More information about the bazaar mailing list