Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 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 | 4fb92f14a97a |
children | 539210ed2069 |
comparison
equal
deleted
inserted
replaced
18671:1c305128e5b9 | 18672:b2b4ddc55caa |
---|---|
2397 source=srctype, url=url) | 2397 source=srctype, url=url) |
2398 | 2398 |
2399 for n in added: | 2399 for n in added: |
2400 self.hook("incoming", node=hex(n), source=srctype, | 2400 self.hook("incoming", node=hex(n), source=srctype, |
2401 url=url) | 2401 url=url) |
2402 | |
2403 heads = self.heads() | |
2404 self.ui.log("incoming", | |
2405 _("%s incoming changes - new heads: %s\n"), | |
2406 len(added), | |
2407 ', '.join([hex(c[:6]) for c in heads])) | |
2402 self._afterlock(runhooks) | 2408 self._afterlock(runhooks) |
2403 | 2409 |
2404 finally: | 2410 finally: |
2405 tr.release() | 2411 tr.release() |
2406 # never return 0 here: | 2412 # never return 0 here: |