[ditrack commit] r2310 - src/trunk/DITrack/DB

Vlad Skvortsov vss at 73rus.com
Thu Nov 1 15:11:56 PST 2007


oleg at ditrack.org wrote:
> Author: oleg
> Date: 2007-10-29 05:25:48 -0800 (Mon, 29 Oct 2007)
> New Revision: 2310
>
> Modified:
>    src/trunk/DITrack/DB/Common.py
>    src/trunk/DITrack/DB/Issue.py
> Log:
> using the second parameter of DEBUG() instead of direct using get_caller()
>   

Hmm, by looking at this, does it makes sense to get rid of the second 
parameter of DEBUG altogether? So that printing caller information is 
controlled solely by the environment variable?


>
> Modified: src/trunk/DITrack/DB/Common.py
> ===================================================================
> --- src/trunk/DITrack/DB/Common.py	2007-10-29 13:14:17 UTC (rev 2309)
> +++ src/trunk/DITrack/DB/Common.py	2007-10-29 13:25:48 UTC (rev 2310)
> @@ -42,7 +42,7 @@
>  import DITrack.DB.Exceptions
>  import DITrack.DB.LMA
>  import DITrack.DB.WC
> -from DITrack.Logging import DEBUG, get_caller
> +from DITrack.Logging import DEBUG
>  import DITrack.SVN
>  import DITrack.ThirdParty.Python.string
>  import DITrack.Util.Locking
> @@ -180,7 +180,7 @@
>  
>          # XXX: make sure the key is a string.
>  
> -        DEBUG("Retrieving issue '%s' (called from %s)" % (key, get_caller()))
> +        DEBUG("Retrieving issue '%s'" % key, True)
>  
>          try:
>              issue = self.wc[key]
> @@ -213,8 +213,8 @@
>          simple newly assigned comment number as a string.
>          """
>  
> -        DEBUG("Committing comment '%s' of issue '%s' (called from %s)" %
> -            (comment_name, issue_number, get_caller()))
> +        DEBUG("Committing comment '%s' of issue '%s'" %
> +            (comment_name, issue_number), True)
>  
>          # XXX: use is_valid_*()
>          assert issue_number.isdigit()
> @@ -239,7 +239,7 @@
>          Commits issue NAME from LMA. Returns newly assigned issue number.
>          """
>  
> -        DEBUG("Committing issue '%s' (called from %s)" % (name, get_caller()))
> +        DEBUG("Committing issue '%s'" % name, True)
>  
>          for x in name:
>              assert(x in string.uppercase)
>
> Modified: src/trunk/DITrack/DB/Issue.py
> ===================================================================
> --- src/trunk/DITrack/DB/Issue.py	2007-10-29 13:14:17 UTC (rev 2309)
> +++ src/trunk/DITrack/DB/Issue.py	2007-10-29 13:25:48 UTC (rev 2310)
> @@ -36,7 +36,7 @@
>  
>  # DITrack modules
>  import DITrack.Common
> -from DITrack.Logging import DEBUG, get_caller
> +from DITrack.Logging import DEBUG
>  
>  # Comment file name regular expression.
>  comment_fname_re = re.compile("^comment(\\d+)$")
> @@ -209,8 +209,8 @@
>          Returns simple comment id as a string.
>          """
>  
> -        DEBUG("Adding comment: is_local=%s, update_info=%s (called from %s)" %
> -            (is_local, update_info, get_caller()))
> +        DEBUG("Adding comment: is_local=%s, update_info=%s" %
> +            (is_local, update_info), True)
>  
>          # XXX
>          assert(is_local)
> @@ -403,8 +403,7 @@
>          Load an issue from path PATH (should point to a directory).
>          """
>  
> -        DEBUG("Loading an issue from '%s' (called from %s)" %
> -            (path, get_caller()))
> +        DEBUG("Loading an issue from '%s'" % path, True)
>  
>          issue = cls()
>  
> @@ -460,9 +459,7 @@
>  
>          for name in local.local_names:
>  
> -            DEBUG("Merging local comment '%s' (called from %s)" %
> -                (name, get_caller())
> -            )
> +            DEBUG("Merging local comment '%s'" % name, True)
>              assert name not in self.local_names, name
>  
>              self.comment[name] = local.comment[name]
> @@ -553,7 +550,7 @@
>  
>          names = self.firm_names + names
>  
> -        DEBUG("Updating the info (called from %s)" % get_caller())
> +        DEBUG("Updating the info", True)
>  
>          for name in names:
>              DEBUG("Processing comment '%s'" % name)
>
> _______________________________________________
> Commit mailing list
> Commit at lists.ditrack.org
> http://lists.ditrack.org/mailman/listinfo/commit
>   


-- 
Vlad Skvortsov, vss at 73rus.com, http://vss.73rus.com



More information about the Dev mailing list