##// END OF EJS Templates
pull: call the `b2x-transactionclose` hook when closing the transaction...
Pierre-Yves David -
r23000:90c425f8 default
parent child Browse files
Show More
@@ -834,7 +834,14 b' class pulloperation(object):'
834 def closetransaction(self):
834 def closetransaction(self):
835 """close transaction if created"""
835 """close transaction if created"""
836 if self._tr is not None:
836 if self._tr is not None:
837 repo = self.repo
838 cl = repo.unfiltered().changelog
839 p = cl.writepending() and repo.root or ""
840 p = cl.writepending() and repo.root or ""
841 repo.hook('b2x-pretransactionclose', throw=True, pending=p,
842 **self._tr.hookargs)
837 self._tr.close()
843 self._tr.close()
844 repo.hook('b2x-transactionclose', **self._tr.hookargs)
838
845
839 def releasetransaction(self):
846 def releasetransaction(self):
840 """release transaction if created"""
847 """release transaction if created"""
@@ -59,6 +59,7 b' clone --pull'
59 adding file changes
59 adding file changes
60 added 2 changesets with 2 changes to 2 files
60 added 2 changesets with 2 changes to 2 files
61 1 new obsolescence markers
61 1 new obsolescence markers
62 b2x-transactionclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
62 changegroup hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
63 changegroup hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
63 updating to branch default
64 updating to branch default
64 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
65 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -81,6 +82,7 b' pull'
81 adding file changes
82 adding file changes
82 added 1 changesets with 1 changes to 1 files (+1 heads)
83 added 1 changesets with 1 changes to 1 files (+1 heads)
83 1 new obsolescence markers
84 1 new obsolescence markers
85 b2x-transactionclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
84 changegroup hook: HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
86 changegroup hook: HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
85 (run 'hg heads' to see heads, 'hg merge' to merge)
87 (run 'hg heads' to see heads, 'hg merge' to merge)
86 $ hg -R other log -G
88 $ hg -R other log -G
@@ -100,6 +102,7 b' pull empty (with phase movement)'
100 $ hg -R other pull -r 24b6387c8c8c
102 $ hg -R other pull -r 24b6387c8c8c
101 pulling from $TESTTMP/main (glob)
103 pulling from $TESTTMP/main (glob)
102 no changes found
104 no changes found
105 b2x-transactionclose hook: HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
103 $ hg -R other log -G
106 $ hg -R other log -G
104 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
107 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
105 |
108 |
@@ -116,6 +119,7 b' pull empty'
116 $ hg -R other pull -r 24b6387c8c8c
119 $ hg -R other pull -r 24b6387c8c8c
117 pulling from $TESTTMP/main (glob)
120 pulling from $TESTTMP/main (glob)
118 no changes found
121 no changes found
122 b2x-transactionclose hook: HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_URL=file:$TESTTMP/main
119 $ hg -R other log -G
123 $ hg -R other log -G
120 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
124 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
121 |
125 |
@@ -185,6 +189,7 b' pull over ssh'
185 added 1 changesets with 1 changes to 1 files (+1 heads)
189 added 1 changesets with 1 changes to 1 files (+1 heads)
186 1 new obsolescence markers
190 1 new obsolescence markers
187 updating bookmark book_02de
191 updating bookmark book_02de
192 b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=ssh://user@dummy/main
188 changegroup hook: HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_SOURCE=pull HG_URL=ssh://user@dummy/main
193 changegroup hook: HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_SOURCE=pull HG_URL=ssh://user@dummy/main
189 (run 'hg heads' to see heads, 'hg merge' to merge)
194 (run 'hg heads' to see heads, 'hg merge' to merge)
190 $ hg -R other debugobsolete
195 $ hg -R other debugobsolete
@@ -207,6 +212,7 b' pull over http'
207 added 1 changesets with 1 changes to 1 files (+1 heads)
212 added 1 changesets with 1 changes to 1 files (+1 heads)
208 1 new obsolescence markers
213 1 new obsolescence markers
209 updating bookmark book_42cc
214 updating bookmark book_42cc
215 b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/
210 changegroup hook: HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/
216 changegroup hook: HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/
211 (run 'hg heads .' to see heads, 'hg merge' to merge)
217 (run 'hg heads .' to see heads, 'hg merge' to merge)
212 $ cat main-error.log
218 $ cat main-error.log
General Comments 0
You need to be logged in to leave comments. Login now