You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2014/11/24 21:00:29 UTC

qpid-proton git commit: NO-JIRA: Fix protocol tracing for transactional states.

Repository: qpid-proton
Updated Branches:
  refs/heads/master 3ac2e3bd3 -> 061da30be


NO-JIRA: Fix protocol tracing for transactional states.

Add transactions.xml to the set of files processed by protocol.py.
Logs "state=@transactional-state(52)" instead of just "state=52"
'


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/061da30b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/061da30b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/061da30b

Branch: refs/heads/master
Commit: 061da30be815467217ecb365cfc1d7581367ba32
Parents: 3ac2e3b
Author: Alan Conway <ac...@redhat.com>
Authored: Wed Nov 19 20:31:29 2014 -0500
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Nov 24 14:58:48 2014 -0500

----------------------------------------------------------------------
 proton-c/src/protocol.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/061da30b/proton-c/src/protocol.py
----------------------------------------------------------------------
diff --git a/proton-c/src/protocol.py b/proton-c/src/protocol.py
index 685e63b..ae65150 100644
--- a/proton-c/src/protocol.py
+++ b/proton-c/src/protocol.py
@@ -22,6 +22,7 @@ doc = mllib.xml_parse(os.path.join(os.path.dirname(__file__), "transport.xml"))
 mdoc = mllib.xml_parse(os.path.join(os.path.dirname(__file__), "messaging.xml"))
 tdoc = mllib.xml_parse(os.path.join(os.path.dirname(__file__), "transactions.xml"))
 sdoc = mllib.xml_parse(os.path.join(os.path.dirname(__file__), "security.xml"))
+tdoc = mllib.xml_parse(os.path.join(os.path.dirname(__file__), "transactions.xml"))
 
 def eq(attr, value):
   return lambda nd: nd[attr] == value
@@ -30,12 +31,14 @@ TYPES = doc.query["amqp/section/type", eq("@class", "composite")] + \
     mdoc.query["amqp/section/type", eq("@class", "composite")] + \
     tdoc.query["amqp/section/type", eq("@class", "composite")] + \
     sdoc.query["amqp/section/type", eq("@class", "composite")] + \
-    mdoc.query["amqp/section/type", eq("@provides", "section")]
+    mdoc.query["amqp/section/type", eq("@provides", "section")] + \
+    tdoc.query["amqp/section/type", eq("@class", "composite")]
+
 RESTRICTIONS = {}
 COMPOSITES = {}
 
 for type in doc.query["amqp/section/type"] + mdoc.query["amqp/section/type"] + \
-      sdoc.query["amqp/section/type"]:
+      sdoc.query["amqp/section/type"] + tdoc.query["amqp/section/type"]:
   source = type["@source"]
   if source:
     RESTRICTIONS[type["@name"]] = source


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Re: qpid-proton git commit: NO-JIRA: Fix protocol tracing for transactional states.

Posted by Rafael Schloming <rh...@alum.mit.edu>.
Hi Alan,

See inline for a few minor comments...

On Mon, Nov 24, 2014 at 3:00 PM, <ac...@apache.org> wrote:

> Repository: qpid-proton
> Updated Branches:
>   refs/heads/master 3ac2e3bd3 -> 061da30be
>
>
> NO-JIRA: Fix protocol tracing for transactional states.
>
> Add transactions.xml to the set of files processed by protocol.py.
> Logs "state=@transactional-state(52)" instead of just "state=52"
> '
>
>
> Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
> Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/061da30b
> Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/061da30b
> Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/061da30b
>
> Branch: refs/heads/master
> Commit: 061da30be815467217ecb365cfc1d7581367ba32
> Parents: 3ac2e3b
> Author: Alan Conway <ac...@redhat.com>
> Authored: Wed Nov 19 20:31:29 2014 -0500
> Committer: Alan Conway <ac...@redhat.com>
> Committed: Mon Nov 24 14:58:48 2014 -0500
>
> ----------------------------------------------------------------------
>  proton-c/src/protocol.py | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/061da30b/proton-c/src/protocol.py
> ----------------------------------------------------------------------
> diff --git a/proton-c/src/protocol.py b/proton-c/src/protocol.py
> index 685e63b..ae65150 100644
> --- a/proton-c/src/protocol.py
> +++ b/proton-c/src/protocol.py
> @@ -22,6 +22,7 @@ doc =
> mllib.xml_parse(os.path.join(os.path.dirname(__file__), "transport.xml"))
>  mdoc = mllib.xml_parse(os.path.join(os.path.dirname(__file__),
> "messaging.xml"))
>  tdoc = mllib.xml_parse(os.path.join(os.path.dirname(__file__),
> "transactions.xml"))
>  sdoc = mllib.xml_parse(os.path.join(os.path.dirname(__file__),
> "security.xml"))
> +tdoc = mllib.xml_parse(os.path.join(os.path.dirname(__file__),
> "transactions.xml"))
>

Assuming I'm reading the diff correctly, tdoc is already parsed a few lines
above where you added it.


>
>  def eq(attr, value):
>    return lambda nd: nd[attr] == value
> @@ -30,12 +31,14 @@ TYPES = doc.query["amqp/section/type", eq("@class",
> "composite")] + \
>      mdoc.query["amqp/section/type", eq("@class", "composite")] + \
>      tdoc.query["amqp/section/type", eq("@class", "composite")] + \
>      sdoc.query["amqp/section/type", eq("@class", "composite")] + \
> -    mdoc.query["amqp/section/type", eq("@provides", "section")]
> +    mdoc.query["amqp/section/type", eq("@provides", "section")] + \
> +    tdoc.query["amqp/section/type", eq("@class", "composite")]
> +
>

Likewise, it is already queried a few lines above where you query it.


>  RESTRICTIONS = {}
>  COMPOSITES = {}
>
>  for type in doc.query["amqp/section/type"] +
> mdoc.query["amqp/section/type"] + \
> -      sdoc.query["amqp/section/type"]:
> +      sdoc.query["amqp/section/type"] + tdoc.query["amqp/section/type"]:
>

I'm guessing this is the only part of the change that is necessary.

--Rafael