Show More
@@ -1244,9 +1244,7 b' def update(repo, node, branchmerge, forc' | |||
|
1244 | 1244 | wlock.release() |
|
1245 | 1245 | |
|
1246 | 1246 | if not partial: |
|
1247 |
|
|
|
1248 | repo.hook('update', parent1=parent1, parent2=parent2, error=error) | |
|
1249 | repo._afterlock(updatehook) | |
|
1247 | repo.hook('update', parent1=xp1, parent2=xp2, error=stats[3]) | |
|
1250 | 1248 | return stats |
|
1251 | 1249 | |
|
1252 | 1250 | def graft(repo, ctx, pctx, labels): |
@@ -313,6 +313,41 b' invocation of the hook to be examined)' | |||
|
313 | 313 | > preupdate.visibility = |
|
314 | 314 | > EOF |
|
315 | 315 | |
|
316 | == test visibility to external update hook | |
|
317 | ||
|
318 | $ hg update -q -C 2 | |
|
319 | $ hg --config extensions.strip= strip 3 | |
|
320 | saved backup bundle to * (glob) | |
|
321 | ||
|
322 | $ cat >> .hg/hgrc <<EOF | |
|
323 | > [hooks] | |
|
324 | > update.visibility = sh $TESTTMP/checkvisibility.sh update | |
|
325 | > EOF | |
|
326 | ||
|
327 | $ hg backout --merge -d '3 0' 1 --tool=true -m 'fixed comment' | |
|
328 | ==== update: | |
|
329 | 1:5a50a024c182 | |
|
330 | ==== | |
|
331 | reverting a | |
|
332 | created new head | |
|
333 | changeset 3:d92a3f57f067 backs out changeset 1:5a50a024c182 | |
|
334 | ==== update: | |
|
335 | 2:6ea3f2a197a2 | |
|
336 | ==== | |
|
337 | merging with changeset 3:d92a3f57f067 | |
|
338 | merging a | |
|
339 | ==== update: | |
|
340 | 2:6ea3f2a197a2 | |
|
341 | 3:d92a3f57f067 | |
|
342 | ==== | |
|
343 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
|
344 | (branch merge, don't forget to commit) | |
|
345 | ||
|
346 | $ cat >> .hg/hgrc <<EOF | |
|
347 | > [hooks] | |
|
348 | > update.visibility = | |
|
349 | > EOF | |
|
350 | ||
|
316 | 351 | $ cd .. |
|
317 | 352 | |
|
318 | 353 | backout should not back out subsequent changesets |
@@ -119,8 +119,8 b' extension and python hooks - use the eol' | |||
|
119 | 119 | $ echo '[hooks]' >> .hg/hgrc |
|
120 | 120 | $ echo 'update = echo hooked' >> .hg/hgrc |
|
121 | 121 | $ hg update |
|
122 | hooked | |
|
122 | 123 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
123 | hooked | |
|
124 | 124 | $ hg blackbox -l 5 |
|
125 | 125 | 1970/01/01 00:00:00 bob (*)> update (glob) |
|
126 | 126 | 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 0 tags (glob) |
@@ -223,8 +223,8 b' update hook' | |||
|
223 | 223 | $ echo "update = printenv.py update" >> .hg/hgrc |
|
224 | 224 | $ hg update |
|
225 | 225 | preupdate hook: HG_PARENT1=539e4b31b6dc |
|
226 | update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc | |
|
226 | 227 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
227 | update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc | |
|
228 | 228 | |
|
229 | 229 | pushkey hook |
|
230 | 230 | |
@@ -644,8 +644,8 b' final release (and dirstate flush).' | |||
|
644 | 644 | $ hg ci -ma |
|
645 | 645 | 223eafe2750c tip |
|
646 | 646 | $ hg up 0 --config extensions.largefiles= |
|
647 | cb9a9f314b8b | |
|
647 | 648 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
648 | cb9a9f314b8b | |
|
649 | 649 | |
|
650 | 650 | make sure --verbose (and --quiet/--debug etc.) are propagated to the local ui |
|
651 | 651 | that is passed to pre/post hooks |
@@ -1087,6 +1087,52 b' Test visibility of in-memory changes ins' | |||
|
1087 | 1087 | ACTUAL 5:703117a2acfb |
|
1088 | 1088 | ==== |
|
1089 | 1089 | |
|
1090 | == test visibility to external update hook | |
|
1091 | ||
|
1092 | $ hg update -q -C 5 | |
|
1093 | ||
|
1094 | $ cat >> .hg/hgrc <<EOF | |
|
1095 | > [hooks] | |
|
1096 | > update.visibility = sh $TESTTMP/checkvisibility.sh update | |
|
1097 | > EOF | |
|
1098 | ||
|
1099 | $ echo nnnn >> n | |
|
1100 | ||
|
1101 | $ sh $TESTTMP/checkvisibility.sh before-unshelving | |
|
1102 | ==== before-unshelving: | |
|
1103 | VISIBLE 5:703117a2acfb | |
|
1104 | ACTUAL 5:703117a2acfb | |
|
1105 | ==== | |
|
1106 | ||
|
1107 | $ hg unshelve --keep default | |
|
1108 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
|
1109 | rebasing shelved changes | |
|
1110 | rebasing 7:fcbb97608399 "changes to 'create conflict'" (tip) | |
|
1111 | ==== update: | |
|
1112 | VISIBLE 6:66b86db80ee4 | |
|
1113 | VISIBLE 7:fcbb97608399 | |
|
1114 | ACTUAL 5:703117a2acfb | |
|
1115 | ==== | |
|
1116 | ==== update: | |
|
1117 | VISIBLE 6:66b86db80ee4 | |
|
1118 | ACTUAL 5:703117a2acfb | |
|
1119 | ==== | |
|
1120 | ==== update: | |
|
1121 | VISIBLE 5:703117a2acfb | |
|
1122 | ACTUAL 5:703117a2acfb | |
|
1123 | ==== | |
|
1124 | ||
|
1125 | $ cat >> .hg/hgrc <<EOF | |
|
1126 | > [hooks] | |
|
1127 | > update.visibility = | |
|
1128 | > EOF | |
|
1129 | ||
|
1130 | $ sh $TESTTMP/checkvisibility.sh after-unshelving | |
|
1131 | ==== after-unshelving: | |
|
1132 | VISIBLE 5:703117a2acfb | |
|
1133 | ACTUAL 5:703117a2acfb | |
|
1134 | ==== | |
|
1135 | ||
|
1090 | 1136 | $ cd .. |
|
1091 | 1137 | |
|
1092 | 1138 | test Abort unshelve always gets user out of the unshelved state |
General Comments 0
You need to be logged in to leave comments.
Login now