changeset 18672:b2b4ddc55caa

blackbox: log incoming changes via ui.log() Logs incoming changes to a repo to ui.log(). Includes the number of changes and the hashes of the heads after the new changes. Example log line: 2013/02/09 08:35:19 durham> 1 incoming changes - new heads: cb9a9f314b8b Currently the blackbox logs the unix user that is performing the push/pull. It would be nice to log the http authorized user as well so it works with hgweb, but that's outside the scope of this commit.
author Durham Goode <durham@fb.com>
date Sat, 09 Feb 2013 09:04:48 -0800
parents 1c305128e5b9
children f27598902007
files mercurial/localrepo.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sat Feb 09 09:04:32 2013 -0800
+++ b/mercurial/localrepo.py	Sat Feb 09 09:04:48 2013 -0800
@@ -2399,6 +2399,12 @@
                     for n in added:
                         self.hook("incoming", node=hex(n), source=srctype,
                                   url=url)
+
+                    heads = self.heads()
+                    self.ui.log("incoming",
+                                _("%s incoming changes - new heads: %s\n"),
+                                len(added),
+                                ', '.join([hex(c[:6]) for c in heads]))
                 self._afterlock(runhooks)
 
         finally: