Commits

Marcin Kasperski committed 50858ab

Further debug messages patching

Comments (0)

Files changed (1)

mercurial_keyring.py

 ############################################################
 
 def _debug(ui, msg):
-    ui.debug("[HgKeyring] " + msg)
+    ui.debug("[HgKeyring] " + msg + "\n")
 
 def _debug_reply(ui, msg, url, user, pwd):
-    _debug(ui, "%s. Url: %s, user: %s, passwd: %s\n" % (
+    _debug(ui, "%s. Url: %s, user: %s, passwd: %s" % (
             msg, url, user, pwd and '*' * len(pwd) or 'not set'))
 
 
         after_bad_auth = (self.last_reply \
                           and (self.last_reply['realm'] == realm) \
                           and (self.last_reply['authuri'] == authuri))
+        _debug(ui, _("Working after bad authentication, cached passwords not used"))
 
         # Strip arguments to get actual remote repository url.
         base_url = self.canonical_url(authuri)
             keyring_url = prefix_url
         else:
             keyring_url = base_url
-        _debug(ui, _("Keyring URL: %s\n") % keyring_url)
+        _debug(ui, _("Keyring URL: %s") % keyring_url)
 
         # Checking the memory cache (there may be many http calls per command)
         cache_key = (realm, keyring_url)
                 self.last_reply = dict(realm=realm,authuri=authuri,user=user)
                 return user, pwd
             else:
-                _debug(ui, _("Username found in .hg/hgrc: %s\n") % user)
+                _debug(ui, _("Username found in .hg/hgrc: %s") % user)
 
         # Loading password from keyring.
         # Only if username is known (so we know the key) and we are
                 self.last_reply = dict(realm=realm,authuri=authuri,user=user)
                 return user, pwd
             else:
-                _debug(ui, _("Password not present in the keyring\n"))
+                _debug(ui, _("Password not present in the keyring"))
 
         # Is the username permanently set?
         fixed_user = (user and True or False)
             # It is done only if username is permanently set.
             # Otherwise we won't be able to find the password so it
             # does not make much sense to preserve it
-            _debug(ui, _("Saving password for %s to keyring\n") % user)
+            _debug(ui, _("Saving password for %s to keyring") % user)
             password_store.set_http_password(keyring_url, user, pwd)
 
         # Saving password to the memory cache