--- a/mercurial/changegroup.py Tue Oct 14 00:03:03 2014 -0700
+++ b/mercurial/changegroup.py Tue Oct 14 00:09:25 2014 -0700
@@ -592,8 +592,6 @@
if not source:
return 0
- repo.hook('prechangegroup', throw=True, source=srctype, url=url)
-
changesets = files = revisions = 0
efiles = set()
@@ -605,6 +603,8 @@
tr = repo.transaction("\n".join([srctype, util.hidepassword(url)]))
try:
+ repo.hook('prechangegroup', throw=True, source=srctype, url=url)
+
trp = weakref.proxy(tr)
# pull off the changeset group
repo.ui.status(_("adding changesets\n"))