Source

hgbook-ja / ja / branch.tex

Full commit
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
\chapter{Managing releases and branchy development}
\label{chap:branch}

Mercurial $B$O!"(B
$BF1;~JB9TE*$K3+H/$r?J$a$k$h$&$J%W%m%8%'%/%H$r4IM}$G$-$k;EAH$_$r;}$C$F$$$^$9!#(B
$B$3$l$i$N;EAH$_$rM}2r$9$k$?$a$K!"(B
$B$^$:$O0lHLE*$J%=%U%H%&%'%"3+H/$N;EAH$_$rD/$a$F$_$^$7$g$&!#(B

$BB?$/$N%=%U%H%&%'%"%W%m%8%'%/%H$G$O!"(B
$B=EMW$J?75,5!G=$r4^$`(B``$B%a%8%c!<(B''$B%j%j!<%9$r4V7gE*$KH/9T$7$^$9!#(B
$B$=$l$HJ?9T$7$F(B``$B%^%$%J!<(B''$B%j%j!<%9$bH/9T$9$k$3$H$,$"$j$^$9!#(B
$BB?$/$N>l9g!"(B
$B%^%$%J!<%j%j!<%9$O85$K$7$?%a%8%c!<%j%j!<%9$HF10l$G$9$,!"(B
$B%P%0$N=$@5$,$J$5$l$F$$$^$9!#(B

$B$3$N>O$G$O!"(B
$B!V%j%j!<%9!W$N$h$&$J%W%m%8%'%/%H$N%^%$%k%9%H!<%s$N!"(B
$B5-O?$rJ];}$9$kJ}K!$+$i@bL@$r;O$a$?$$$H;W$$$^$9!#(B
$B$=$N8e$G!"(B
$B%W%m%8%'%/%H$K$*$1$k%U%'!<%:0\9T$G$N:n6H$NN.$l$d!"(B
$B$=$N:]$N:n6H$d@.2LJ*$r(B
Mercurial $B$K$h$C$FJ,N%!?4IM}$9$kJ}K!$r@bL@$7$^$9!#(B

\section{Giving a persistent name to a revision}

$BFCDj$N%j%S%8%g%s$r(B``$B%j%j!<%9(B''$B$H8F$V$3$H$K7hDj$7$?$J$i!"(B
$B$=$N%j%S%8%g%s$N(B ID $B$r5-O?$9$k$Y$-$G$9!#(B
$B%j%S%8%g%s$N(B ID $B$r5-O?$9$k$3$H$G!"(B
$B8eF|2?$i$+$NM}M3!JNc$($P%P%0$N:F8=$d!"?75,%W%i%C%H%U%)!<%`$X$N0\?"Ey!K(B
$B$GI,MW$K$J$C$?:]$K%j%j!<%9$r:F8=$9$k$3$H$,$G$-$^$9!#(B

\interaction{tag.init}

\hgcmd{tag} $B%3%^%s%I$rMxMQ$9$k$3$H$G!"(B
Mercurial $B$OG$0U$N%j%S%8%g%s$K1JB3E*$JL>A0$rIUM?$7$^$9!#(B
$BFI<T$NM=A[DL$j!"$3$NL>A0$N$3$H$r(B``$B%?%0(B''$B$H8F$S$^$9!#(B

\interaction{tag.tag}

$B%j%S%8%g%s$K$H$C$F!"(B
$B%?%0$O(B``$B>]D'E*$JL>A0(B''(symbolic name) $B0J30$N2?<T$G$b$"$j$^$;$s!#(B
$B%?%0$O=c?h$KMxJX@-$N$?$a$KB8:_$9$k$b$N$G!"(B
$B%j%S%8%g%s$r;2>H$9$k:]$N<j7Z$G1JB3E*$J<jCJ$H$J$j$^$9!#(B
Mercurial $B$O!"(B
$BMxMQ<T$NMQ$$$k%?%0L>$N0UL#$r2r<a$7$?$j$7$^$;$s!#(B
$B[#Kf$5$,L5$/2r@O$G$-$k$3$H$rJ]>Z$9$k$?$a$KI,MW$J>/!9$N@)Ls$r=|$$$F$O!"(B
$B%?%0L>$K2?$i$+$N@)Ls$r$D$1$?$j$9$k$3$H$b$"$j$^$;$s!#(B
$B0J2<$N$$$:$l$NJ8;z$b%?%0L>$K$O;HMQ$G$-$^$;$s!#(B

\begin{itemize}
\item $B%3%m%s(B(ASCII 58, ``\texttt{:}'')
\item $B9TF,0\F0(B\footnote{carriage return} (ASCII 13, ``\Verb+\r+'')
\item $B2~9T(B (ASCII 10, ``\Verb+\n+'')
\end{itemize}

\hgcmd{tags} $B%3%^%s%I$r;HMQ$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d{log} $B%3%^%s%I$N=PNO$G8+$k$3$H$,$G$-$k!"(B
$B$H$$$&$3$H$r0UL#$7$F$$$^$9!#(B

\interaction{tag.tip}

\subsection{Handling tag conflicts during a merge}

\sfilename{.hgtags} $B%U%!%$%k$r5$$K$9$kI,MW$OKX$I$"$j$^$;$s$,!"(B
$B;~$K$O%^!<%8$N:]$K$=$NB8:_$,0U<1$5$l$k$3$H$,$"$j$^$9!#(B
$B$3$N%U%!%$%k$N7A<0$OC1=c$G!"O"B3$7$?9T$+$i9=@.$5$l$F$$$^$9!#(B
$B3F9T$O%A%'%s%8%;%C%H$N%O%C%7%eCM$G;O$^$j!"6uGr$H%?%0L>$,B3$-$^$9!#(B

$B%^!<%8$K$*$1$k(B
\sfilename{.hgtags} $B%U%!%$%k$N>WFM$r2r>C$9$k:]$K$O!"(B
\sfilename{.hgtags} $B%U%!%$%k=$@5$K$R$M$j$,I,MW$G$9!#(B
$B%j%]%8%H%jCf$N%?%0$r2r@O$9$k>l9g!"(B
Mercurial $B$O(B\emph{$B7h$7$F(B} 
\sfilename{.hgtags} $B%U%!%$%k$N%o!<%-%s%0%3%T!<$r;2>H$9$k$3$H$O$"$j$^$;$s!#(B
$B$=$NBe$o$j$K!"(BMercurial 
$B$O(B\emph{$B:G$b:G6a%3%_%C%H$5$l$?(B}$B%U%!%$%k$N%j%S%8%g%s$rD4$Y$^$9!#(B

$B$3$N$h$&$J@_7W$N;DG0$J7k2L$H$7$F!"(B
$B%^!<%8$7$?(B \sfilename{.hgtags} $B%U%!%$%k$,!"(B
$B$=$NJQ99$r%3%_%C%H$7$?(B\emph{$B8e$b(B}$B@5$7$$>uBV$G$"$k$3$H$r!"(B
$B<B:]$K8!>Z$9$k$3$H$,$G$-$^$;$s!#(B
$B%^!<%8$N:]$K(B \sfilename{.hgtags} $B%U%!%$%k$N>WFM$r2r>C$9$k:]$K$O!"(B
$B%3%_%C%H8e$K(B \hgcmd{tags} $B%3%^%s%I$N<B9T$rK:$l$:$K9T$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0$H!"JQ99%^!<%8$N@.2L$G$9!#(B
  $B$3$N%V%i%s%A$O!"%3!<%I$,$I$N$h$&$K3+H/$5$l$F$$$C$?$N$+$rJ*8l$j$^$9!#(B

\end{itemize}

\section{Managing big-picture branches in repositories}

Mercurial $B$K$*$$$F(B``$B5p;kE*$J(B''$B%V%i%s%A$r3VN%$9$k:G$b4JC1$JJ}K!$O!"(B
$B3VN%MQ$N%j%]%8%H%j$rMQ0U$9$k$3$H$G$9!#(B
$BNc$($P!"4{$K$"$k6&M-%j%]%8%H%j(B---$B$3$l$r(B \texttt{myproject} $B$H8F>N$7$^$9(B
---$B$,(B ``1.0'' $B$H$$$&%^%$%k%9%H!<%s$KE~C#$7$F$$$k>l9g!"(B
1.0 $B%j%j!<%9$N$?$a$K;HMQ$7$?%j%S%8%g%s$K%?%0$rIUM?$9$k$3$H$G!"(B
1.0 $BHG$KBP$9$kMh$k$Y$-J]<i%j%j!<%9$N=`Hw$r9T$$$^$9!#(B

\interaction{branch-repo.tag}

$B%?%0IU$1$7$?;~E@$HF1$8FbMF$N(B
\texttt{myproject-1.0.1} 
$B$H$$$&L>$N?7$7$$6&M-%j%]%8%H%j$rJ#@=$7$^$9!#(B

\interaction{branch-repo.clone}

$B$=$N8e!"(B
$BMh$k(B 1.0.1 $B%^%$%J!<%j%j!<%9$K4^$a$k$Y$-%P%0=$@5$N:n6H$,I,MW$K$J$C$?$J$i!"(B
\texttt{myproject-1.0.1} $B%j%]%8%H%j$rJ#@=$7JQ99$r9T$C$F!"(B
$B$=$N@.2L$rH?1G$7$^$9!#(B

\interaction{branch-repo.bugfix}

$B$=$N4V!"<!$N%a%8%c!<%j%j!<%9$X8~$1$?3+H/:n6H$O!"(B
$B%^%$%J!<%j%j!<%9$K4X$9$k:n6H$H$O3VN%$5$l$?>uBV$G!"(B
\texttt{myproject} $B%j%]%8%H%j$K$*$$$F3hH/$KB3$1$i$l$^$9!#(B

\interaction{branch-repo.new}

\section{Don't repeat yourself: merging across branches}

$B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6&F1:n6H<T$b!K(B
``$B%Q%o!<%f!<%6!<(B''$B$h$j$b9b$$%l%Y%k$K$"$k$N$G$"$l$P!"(B
$B%V%i%s%A(B(that you can consider XXXX)$B$r07$&JL$JJ}K!$,$"$j$^$9!#(B
$BA0$N@a$G$O!"(B
``$BHy;kE*(B''$B%V%i%s%A$H(B``$B5p;kE*(B''$B%V%i%s%A$N!"(B
$BMxMQ<T%l%Y%k$G$N6hJL$K$D$$$F8@5Z$7$^$7$?!#(B
$BC10l$N%j%]%8%H%jCf$G!"(B
$B>o$KJ#?t$N(B``$BHy;kE*$J(B''$B%V%i%s%A(B
$B!JNc$($P!"JQ99$N(B pull $B8e$K%^!<%8$7$F$$$J$$>uBV!K$r07$C$F$$$k0lJ}$G!"(B
Mercurial $B$OJ#?t$N(B``$B5p;kE*$J(B''$B%V%i%s%A$r07$&$3$H(B\emph{$B$b(B}$B$G$-$^$9!#(B

Mercurial $B$,(B``$B5p;kE*$J(B''$B%V%i%s%A$r07$&:]$NMWE@$O!"(B
$B%V%i%s%A$K1JB3E*$J(B\emph{$BL>A0(B}$B$rIU$1$k$H$3$m$K$"$j$^$9!#(B
$BA0=R$N$h$&$K(B \texttt{default} $B$H$$$&L>A0$N%V%i%s%A$,>o$KB8:_$7$^$9$N$G!"(B
$B%V%i%s%A$X$NL?L>$r9T$&A0$G$"$C$F$b!"(B
$BC5$;$P(B \texttt{default} $B%V%i%s%A$N@W$r8+$D$1$k$3$H$,$G$-$^$9!#(B

$BNc$($P!"(B
\hgcmd{commit} $B%3%^%s%I$r<B9T$9$k$H!"(B
$B%(%G%#%?$,5/F0$5$l$F%3%_%C%H%a%C%;!<%8$rF~NO$G$-$^$9(B
\footnote{$BLuCm(B: Emacs $B$N(B hg-mode.el $B$r;HMQ$7$F$$$k>l9g$O8+$i$l$^$;$s(B}$B$,!"(B
$BKvHx$N(B ``\texttt{HG: branch default}'' $B$r4^$`9T$r8+$F$/$@$5$$!#(B
$B$3$l$O!"(B\texttt{default} $B$H$$$&L>A0$N%V%i%s%A$KBP$7$F%3%_%C%H$7$F$$$k!"(B
$B$H$$$&$3$H$rI=$7$F$$$^$9!#(B

$B%V%i%s%A$KL>A0$r$D$1$k$K$O!"(B
$B$^$:$O(B \hgcmd{branches} $B$r;HMQ$7$^$9!#(B
$B$3$N%3%^%s%I$O!"%j%]%8%H%jCf$K4{$KB8:_$9$kL>A0IU$-%V%i%s%A$H!"(B
$B8D!9$N%V%i%s%A$K$*$1$k@hF,!J(Btip$B!K%j%S%8%g%s$,$I$l$+$rNs5s$7$^$9!#(B

\interaction{branch-named.branches}

$B<B9TNc$G$O!"(B
$BL>A0IU$-%V%i%s%A$r@8@.$9$kA0$G$9$+$i!"(B
$BM#0lB8:_$9$k(B \texttt{default} $B$@$1$,I=<($5$l$^$9!#(B

$B$I$l$,(B``$B8=:_$N(B''$B%V%i%s%A$+$rCN$k$K$O!"(B
$B0z?tL5$7$G(B \hgcmd{branch} $B%3%^%s%I$r<B9T$7$^$9!#(B
$B$3$N%3%^%s%I$O!"(B
$B8=:_$N%A%'%s%8%;%C%H$N?F%A%'%s%8%;%C%H$,!"(B
$B$I$N%V%i%s%A>e$K$"$k$b$N$+$rI=<($7$^$9!#(B

\interaction{branch-named.branch}

$B?7$7$$%V%i%s%A$r:n@.$9$k$K$O!"(B
$B:FEY(B \hgcmd{branch} $B%3%^%s%I$r<B9T$7$^$9$,!"(B
$B:#2s$O@8@.$9$k%V%i%s%AL>$r0z?t$H$7$F;XDj$7$^$9!#(B

\interaction{branch-named.create}

$B%V%i%s%A@8@.8e!"(B
\hgcmd{branch} $B%3%^%s%I$K$h$j$I$N$h$&$JI{:nMQ$r@8$8$?$N$+!"(B
$B2x$7$`$+$b$7$l$^$;$s!#(B
\hgcmd{status} $B$d(B \hgcmd{tip} $B$N=PNO$O$I$&$J$C$F$$$k$G$7$g$&$+!)(B

\interaction{branch-named.status}

$B:n6HNN0h$KJQ99$O2C$($i$l$F$$$^$;$s$7!"(B
$BMzNr$K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B%V%i%s%AL>$O$+$J$jD9$$<wL?$r;}$D$?$a!"(B
$B<B:]$K$O$3$N$h$&$J%V%i%s%AL>$NJQ99$O$=$l$[$IIQHK$K<B9T$9$k$3$H$OL5$$$G$7$g$&(B
$B!J$3$N$3$H$O5,Ls$G$O$J$/!"$"$/$^$G46A[$G$9!K!#(B

\section{Dealing with multiple named branches in a repository}

$B%j%]%8%H%j$KJ#?t$NL>A0IU$-%V%i%s%A$,$"$k>l9g!"(B
\hgcmd{update} $B$d(B \hgcmdargs{pull}{-u} $B$H$$$C$?%3%^%s%I<B9T$N:]$K!"(B
Mercurial $B$O:n6HNN0h%G%#%l%/%H%j$,B0$9$k%V%i%s%A$r3P$($F$$$F!"(B
``$B%j%]%8%H%jA4BN(B''$B$N(B tip $B%j%S%8%g%s$G$O$J$/!"(B
$B$=$N%V%i%s%A$N(B tip $B%j%S%8%g%s$G:n6HNN0h%G%#%l%/%H%j$r99?7$7$^$9!#(B
$BJL$JL>A0IU$-%V%i%s%A$N%j%S%8%g%s$G99?7$7$?$$>l9g$O!"(B
\hgcmd{update} $B%3%^%s%I$K(B
\hgopt{update}{-C} $B%*%W%7%g%s$r;XDj$7$J$1$l$P$J$j$^$;$s!#(B

$B$3$N?6$kIq$$$O>/!9HyL/$G$9$+$i!"<BNc$G8+$F$_$^$7$g$&!#(B
$B;O$a$K!"(B
$B$I$N%V%i%s%A>e$G:n6H$7$F$$$k$N$+$H!"(B
$B$I$s$J%V%i%s%A$,%j%]%8%H%jCf$KM-$k$N$+$r3NG'$7$^$9!#(B

\interaction{branch-named.parents}

$B8=:_(B \texttt{bar} $B%V%i%s%A>e$K$$$^$9$,!"(B
$B8E$$(B \hgcmd{foo} $B%V%i%s%A$bB8:_$7$^$9!#(B

\texttt{foo} $B%V%i%s%A$*$h$S(B \texttt{bar} $B%V%i%s%A$N(B
tip $B%j%S%8%g%s$X$N0\F0$O!"(B
$BJQ99MzNr>e$rD>@~E*$KA08e$9$k$3$H$7$+I,MW$H$7$J$$$?$a!"(B
\hgcmd{update} $B%3%^%s%I$K(B
\hgopt{update}{-C} $B%*%W%7%g%s$r;XDj$9$k$3$HL5$7$K!"(B
$B$=$l$>$l$N(B tip $B%j%S%8%g%s$X$N99?7$r9T$&$3$H$,$G$-$^$9!#(B

\interaction{branch-named.update-switchy}

\texttt{foo} $B%V%i%s%A$KLa$k$?$a$K(B
\hgcmd{update} $B%3%^%s%I$r<B9T$9$k$H!"(B
\texttt{foo} $B%V%i%s%A>e$KN1$^$C$?$^$^$G(B
\texttt{bar} $B%V%i%s%A$N(B tip $B%j%S%8%g%s$K$O0\F0$7$^$;$s!#(B

\interaction{branch-named.update-nothing}

\texttt{foo} $B%V%i%s%A$G$NJQ99$N%3%_%C%H$K$h$j!"(B
$B?7$?$J%X%C%I$,@8@.$5$l$^$9!#(B

\interaction{branch-named.foo-commit}

\texttt{foo} $B%V%i%s%A$+$i(B \texttt{bar} $B%V%i%s%A$X$N99?7$O!"(B
$BMzNr$r(B``$B2#$CHt$S(B''$B$7$J$$$H$G$-$^$;$s$+$i!"(B
Mercurial $B$O(B
\hgcmd{update} $B%3%^%s%I$X$N(B \hgopt{update}{-C}
$B%*%W%7%g%s$N;XDj$rI,MW$H$7$^$9!#(B

\interaction{branch-named.update-bar}

\section{Branch names and merging}

$B$*5$$E$-$N;v$H$O;W$$$^$9$,!"(B
Mercurial $B$K$*$1$k%^!<%8=hM}$OBP>NE*$G$O$"$j$^$;$s!#(B
$B%j%S%8%g%sHV9f(B 17 $B$N$b$N$H(B 23 $B$N$b$N!"(B
$B#2$D$N%X%C%I$r%j%]%8%H%j$,;}$C$F$$$k$b$N$H$7$^$7$g$&!#(B
$B%j%S%8%g%s(B 17 $B$X$H(B \hgcmd{update} 
$B$7$F$+$i%j%S%8%g%s(B 23 $B$H(B \hgcmd{merge} $B$7$?>l9g!"(B
Mercurial $B$O%j%S%8%g%s(B 17 $B$r%^!<%8$NBh#1?F!"(B
$B%j%S%8%g%s(B 23 $B$rBh#2?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s%A$N@.2L$r%^!<%8$7$?>l9g!"(B
$B%^!<%8$N7k2L$O(B \texttt{bar} $B%V%i%s%A>e$KN1$^$j$^$9!#(B

\interaction{branch-named.merge}

$B$h$j6qBNE*$JNc$H$7$F!"(B
\texttt{bleeding-edge} $B%V%i%s%A$G:n6H$7$F$$$F!"(B
$B:G?7$N@.2L$r(B \texttt{stable} $B%V%i%s%A$+$i;}$A9~$_$?$$$H;W$C$?$H$7$^$9!#(B
$B$3$N>l9g!"(B
\texttt{stable} $B%V%i%s%A$N@.2L$r(B pull $B$7$F%^!<%8$7$?CJ3,$G!"(B
Mercurial $B$O(B``$BE,@Z$J(B''$B%V%i%s%AL>(B(\texttt{bleeding-edge})$B$rA*Br$7$^$9!#(B

\section{Branch naming is generally useful}

$B<wL?$ND9$$J#?t$N%V%i%s%A$,C10l%j%]%8%H%j$G6&B8$7$F$$$k>u67$@$1$,!"(B
$BL>A0IU$-%V%i%s%A$NMxMQ$G$-$k>u67$@$H$O9M$($J$$$G$/$@$5$$!#(B
$B%j%]%8%H%j#1$D$K%V%i%s%A#1$D$N>u67$G$"$C$F$b!"(B
$BL>A0IU$-%V%i%s%A$OM-MQ$G$9!#(B

$BC1=c$JNc$H$7$F$O!"(B
$B%V%i%s%A$KL>A0$rIUM?$9$k$3$H$G!"(B
$B%A%'%s%8%;%C%H$,$I$N%V%i%s%A$KM3Mh$9$k$+$N915WE*$J5-O?$rF@$k$3$H$,$G$-$^$9!#(B
$B$3$N5-O?$O!"(B
$B<wL?$ND9$$%V%i%s%A$r;}$D%W%m%8%'%/%H$NMzNr$rC)$k:]$K!"(B
$BB?$/$N>pJs$r$b$?$i$9$3$H$G$7$g$&!#(B

$B%j%]%8%H%j$r6&M-$7$F:n6H$7$F$$$k>l9g!"(B
\hook{pretxnchangegroup}  $B%U%C%/$r$=$l$>$l$N%j%]%8%H%j$KBP$7$F@_Dj$9$k$3$H$G!"(B
``$BIT@5$J(B''$B%V%i%s%AL>$r;}$DJQ99$,;}$A9~$^$l$k$N$rKI$0$3$H$,$G$-$^$9!#(B
$B$3$N<jK!$OC1=c$G$9$,!"(B
``$B7l$NE)$k?O(B''$B$H$G$b8@$&$Y$-!JIT0BDj$J!K%V%i%s%A$N@.2L$r!"(B
$B8m$C$F(B``$B0BDj$7$?(B''$B%V%i%s%A$X$H;}$A9~$`$3$H$rKI$0$K$O8z2LE*$G$9!#(B
$B$3$N$h$&$J%U%C%/$O!"(B
$B6&M-%j%]%8%H%j$N(B \hgrc $B%U%!%$%k$K0J2<$N$h$&$K5-=R$7$^$9!#(B

\begin{codesample2}
  [hooks]
  pretxnchangegroup.branch = hg heads --template '{branches} ' | grep mybranch
\end{codesample2}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "00book"
%%% End: