##// END OF EJS Templates
changelog: fix readpending if no pending data exist (issue4609)...
Pierre-Yves David -
r24822:8678b1ea stable
parent child Browse files
Show More
@@ -267,6 +267,8 b' class changelog(revlog.revlog):'
267 self.checkinlinesize(tr)
267 self.checkinlinesize(tr)
268
268
269 def readpending(self, file):
269 def readpending(self, file):
270 if not self.opener.exists(file):
271 return # no pending data for changelog
270 r = revlog.revlog(self.opener, file)
272 r = revlog.revlog(self.opener, file)
271 self.index = r.index
273 self.index = r.index
272 self.nodemap = r.nodemap
274 self.nodemap = r.nodemap
@@ -72,7 +72,7 b' Add more obsolescence information'
72 clone --pull
72 clone --pull
73
73
74 $ hg -R main phase --public cd010b8cd998
74 $ hg -R main phase --public cd010b8cd998
75 pre-close-tip:000000000000 public
75 pre-close-tip:02de42196ebe draft
76 postclose-tip:02de42196ebe draft
76 postclose-tip:02de42196ebe draft
77 txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob)
77 txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob)
78 $ hg clone main other --pull --rev 9520eea781bc
78 $ hg clone main other --pull --rev 9520eea781bc
@@ -98,7 +98,7 b' clone --pull'
98 pull
98 pull
99
99
100 $ hg -R main phase --public 9520eea781bc
100 $ hg -R main phase --public 9520eea781bc
101 pre-close-tip:000000000000 public
101 pre-close-tip:02de42196ebe draft
102 postclose-tip:02de42196ebe draft
102 postclose-tip:02de42196ebe draft
103 txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob)
103 txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob)
104 $ hg -R other pull -r 24b6387c8c8c
104 $ hg -R other pull -r 24b6387c8c8c
@@ -128,13 +128,13 b' pull'
128 pull empty (with phase movement)
128 pull empty (with phase movement)
129
129
130 $ hg -R main phase --public 24b6387c8c8c
130 $ hg -R main phase --public 24b6387c8c8c
131 pre-close-tip:000000000000 public
131 pre-close-tip:02de42196ebe draft
132 postclose-tip:02de42196ebe draft
132 postclose-tip:02de42196ebe draft
133 txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob)
133 txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob)
134 $ hg -R other pull -r 24b6387c8c8c
134 $ hg -R other pull -r 24b6387c8c8c
135 pulling from $TESTTMP/main (glob)
135 pulling from $TESTTMP/main (glob)
136 no changes found
136 no changes found
137 pre-close-tip:000000000000 public
137 pre-close-tip:24b6387c8c8c public
138 postclose-tip:24b6387c8c8c public
138 postclose-tip:24b6387c8c8c public
139 txnclose hook: HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob)
139 txnclose hook: HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob)
140 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
140 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
@@ -204,7 +204,7 b' add extra data to test their exchange du'
204 $ hg -R other bookmark --rev cd010b8cd998 book_32af
204 $ hg -R other bookmark --rev cd010b8cd998 book_32af
205
205
206 $ hg -R main phase --public eea13746799a
206 $ hg -R main phase --public eea13746799a
207 pre-close-tip:000000000000 public
207 pre-close-tip:02de42196ebe draft book_02de
208 postclose-tip:02de42196ebe draft book_02de
208 postclose-tip:02de42196ebe draft book_02de
209 txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob)
209 txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob)
210
210
@@ -344,7 +344,7 b' push over http'
344 $ cat other.pid >> $DAEMON_PIDS
344 $ cat other.pid >> $DAEMON_PIDS
345
345
346 $ hg -R main phase --public 32af7686d403
346 $ hg -R main phase --public 32af7686d403
347 pre-close-tip:000000000000 public
347 pre-close-tip:02de42196ebe draft book_02de
348 postclose-tip:02de42196ebe draft book_02de
348 postclose-tip:02de42196ebe draft book_02de
349 txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob)
349 txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob)
350 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
350 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
@@ -113,3 +113,27 b' test external hook'
113 rollback completed
113 rollback completed
114 abort: pretxnchangegroup hook exited with status 1
114 abort: pretxnchangegroup hook exited with status 1
115 pull 0000000000000000000000000000000000000000
115 pull 0000000000000000000000000000000000000000
116
117 Test that pending on transaction without changegroup see the normal changegroup(
118 (issue4609)
119
120 $ cat <<EOF > parent/.hg/hgrc
121 > [hooks]
122 > pretxnchangegroup=
123 > pretxnclose = hg tip -T 'tip: {node|short}\n'
124 > [phases]
125 > publishing=False
126 > EOF
127
128 setup
129
130 $ cd parent
131 $ echo a > a
132 $ hg add a
133 $ hg commit -m a
134 tip: cb9a9f314b8b
135
136 actual test
137
138 $ hg phase --public .
139 tip: cb9a9f314b8b
General Comments 0
You need to be logged in to leave comments. Login now