-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/hgext/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/hgext/patchbomb.pyc

ó
Ì\,Tc@svdZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZm
Z
mZmZddl	mZddlmZddlmZiZe
jeƒZdZddd	„Zd
„Zdd„Zdd
dedƒfdddedƒfdddedƒfddgedƒfddgedƒfdddedƒfdddedƒfddded ƒfdd!ded"ƒfd#d$ded%ƒfd&d'ded(ƒfd)d*ded+ƒfdd,ged-ƒfd.d/ded0ƒfdd1ded2ƒfdd3ged4ƒfd5d6ged7ƒfgZed8d9d:ded;ƒfdd<ded=ƒfd>d?ded@ƒfdAdBdedCƒfddDdBedEƒedFƒfdGdHgedIƒedJƒfddKdedLƒfddMgedNƒedJƒfddOdedPƒfg	eejedQƒƒdR„ƒZdS(Ssucommand to send changesets as (a series of) patch emails

The series is started off with a "[PATCH 0 of N]" introduction, which
describes the series as a whole.

Each patch email has a Subject line of "[PATCH M of N] ...", using the
first line of the changeset description as the subject text. The
message contains two or three body parts:

- The changeset description.
- [Optional] The result of running diffstat on the patch.
- The patch itself, as generated by :hg:`export`.

Each message refers to the first in the series using the In-Reply-To
and References headers, so they will show up as a sequence in threaded
mail and news readers, and in mail archives.

To configure other defaults, add a section like this to your
configuration file::

  [email]
  from = My Name <my@email>
  to = recipient1, recipient2, ...
  cc = cc1, cc2, ...
  bcc = bcc1, bcc2, ...
  reply-to = address1, address2, ...

Use ``[patchbomb]`` as configuration section name if you need to
override global ``[email]`` address settings.

Then you can use the :hg:`email` command to mail a series of
changesets as a patchbomb.

You can also either configure the method option in the email section
to be a sendmail compatible mailer or fill out the [smtp] section so
that the patchbomb extension can automatically send patchbombs
directly from the commandline. See the [email] and [smtp] sections in
hgrc(5) for details.
iÿÿÿÿN(tcmdutiltcommandsthgtmailtpatchtutil(tscmutil(t_(tbintinternalt:cCs+|r|d|7}n|j|||ƒS(Ns [%s](tprompt(tuiRtdefaulttrest((s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pyR@scCs(|dkp'|jdƒp'|jdƒS(s-is an introductory message apparently wanted?itintrotdesc(tget(toptstnumber((s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pytintrowantedEsc	CsZg}	d}
d}xt|D]l}|jdƒrV|jdƒr|jƒd}
qqn|jdƒst|jdƒrxPn|	j|ƒqW|r |
r t‚n|jdƒrë|jdƒrëd	j|	d
ƒjƒpÛd}|d7}n|jd
ƒrkx*|r&|djdƒr&|jdƒqýW|r=|jdƒnx+|rg|djƒrg|jdƒq@Wnt	j
|d|jdƒƒ}
|jdƒr©||
d7}n|jdƒpÄ|jdƒ}|sÝ|jdƒró|d	j|ƒ7}n|rMtjjƒ}|r9|j
tj||||jdƒƒƒntjd	j|ƒd|jdƒƒ}t|
ƒ}|s
g|j|ƒD]*}|jdƒs¦|jdƒr‚|^q‚}|rÅ|d}q
|d
krõtj|d|d|d|ƒ}q
tj|d|ƒ}nd}|jdƒr+d}n|d||d<|j
|ƒntj|d|jdƒƒ}d j|jd!ƒƒ}|r–d |}n|	djƒjd"ƒ}|s×d#||jd$ƒpÍ|f}n+tt|ƒƒ}d%|||||f}tj||||jdƒƒ|d&<|
|d'<d(||d)<d(||d*<|||
fS(+Ntt#s	# Node IDiÿÿÿÿsdiff -rs
diff --gittattachtbodys
is"Patch subject is complete summary.s


tplainis# tgittdiffstats

tinlinettestsx-patchs.patchs.diffs%b-%n.patchtseqnottotals%b.patcht
attachments; filename=sContent-Dispositiontdisplayt tflags. s[PATCH%s] %stsubjects[PATCH %0*d of %d%s] %stSubjectsX-Mercurial-Nodes%isX-Mercurial-Series-IndexsX-Mercurial-Series-Total(tNonet
startswithtsplittappendt
ValueErrorRtjointstriptpopRRtemailt
MIMEMultipartRRt
mimeencodet
mimetextpatchRtnodetagstendswithRtmakefilenametrstriptlentstrt
headencode(Rtrepot
patchlinesRt	_charsetstidxRtnumberedt	patchnameRtnodeRtlinetdst
addattachmenttmsgtptbinnodettt	patchtagstdispositionR#tsubjttlen((s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pyt	makepatchIs„
	
+*
	
"%
RRs-send patches as inline message text (default)taRssend patches as attachmentstiRs"send patches as inline attachmentstbccs/email addresses of blind carbon copy recipientstctccs"email addresses of copy recipientstconfirms#ask for confirmation before sendingtdRsadd diffstat output to messagestdates&use the given date as the sending dateRs,use the given file as the series descriptiontftfromsemail address of sendertnRs!print messages that would be senttmtmboxs3write messages to mbox file instead of sending themsreply-tos)email addresses replies should be sent totsR$s0subject of first message (intro or single patch)sin-reply-tosmessage identifier to reply toR#s flags to add in subject prefixesRFttosemail addresses of recipientsR.tgRsuse git extended diff formatRsomit hg patch headertotoutgoings/send changes not found in the target repositorytbtbundles-send changes not in target as a binary bundlet
bundlenames"name of the bundle attachment filetNAMEtrtrevsa revision to sendtREVtforces?run even when remote repository is unrelated (with -b/--bundle)tbasesGa base changeset to specify instead of a destination (with -b/--bundle)Rs-send an introduction email for a single patchshg email [OPTION]... [DEST]...c$	sßtjˆƒ‰ˆjdƒ}ˆjdƒ}ˆjdƒ}ˆjdƒ}ˆjdƒ}ˆjdƒ}	‡‡fd†}
‡‡‡fd†}‡‡‡fd	†}ˆjd
ƒp·|sÊtjˆƒn|på|på|på|på|	stjtdƒƒ‚n|r$|r$tjtdƒƒ‚n|s0|ryt|ƒd
krZtjtdƒƒ‚n|rj|dpmdD}
g}n|r¦|rtjtdƒƒ‚n|}n|r¾|
|
|ƒ}n|rÑ|ˆd<n|rétj	|ƒ‰ntj
ƒ‰‡fd†}‡‡‡fd†‰dD‡‡‡‡‡fd†}‡‡‡‡‡fd†‰‡‡‡‡‡fd†}ˆjdƒpµˆjddƒpµˆjddƒpµtˆdˆj
ƒƒ‰|	rÙ||	ˆjdƒƒ}n3|rô|||
ƒƒ}n|t||ƒƒƒ}g‰tdD‡‡‡‡fd†}|ddtƒ}|s`tjtdƒƒ‚n|d dtd!d"ƒp{g}|d#ƒpg}|d$ƒ}ˆjd%ƒsºˆjd&ƒr~ˆjtd'ƒƒˆjd(ˆƒxˆD]}ˆjd)|ƒqåWx>|D]6\}}}ˆjd*|ƒ|rˆj|ƒqqWˆjd+ƒˆjtd,ƒƒr~tjtd-ƒƒ‚q~nˆjd+ƒˆjd.ƒpdD}|dDk	rç|jd/ƒsÈd/|}n|jd0ƒsç|d07}qçntjjˆƒd
}tjˆˆˆˆjd
ƒƒ‰dD}dD}x‚t|ƒD]t\}\}}}y5||d1ƒ|d2<|sv|d2}n||d3<Wn!tk
r¤|dƒ|d2<nX|rÂ||d4<||d5<n|sÕd1|krâ|d2}nd6tjƒ|d7<tjjˆdd8tƒ|d9<ˆdd
ˆd
f‰ˆ|d<d:j|ƒ|d<|rgd:j|ƒ|d <n|rƒd:j|ƒ|d#<n|rŸd:j|ƒ|d$<nˆjd
ƒr’ˆjtd;ƒ|d<ƒˆjƒd=t j!kr	ˆj"ƒr	tj#t j!d=d>ƒ} nˆ} tj$j$| d?tƒ}!y!|!j%|dƒ| jd+ƒWn+t&k
ru}"|"j't'j(krv‚qvnX| ˆk	r«| j)ƒq«q7|sˆjd@dAƒ}#ˆjdBƒrÒˆj*d@dAdCdƒnztj+ˆd|ƒ}WdDˆj*d@dA|#dƒXnˆjtdEƒ|d<ƒˆj,tdFƒ|dG|dHt|ƒƒ|sY|d#=nt-j.ƒ} tj$j$| d?tƒ}!|!j%|dƒ|||||| j/ƒƒq7Wˆj,tdIƒdDƒˆj,tdFƒdDƒdDS(Jsasend changesets by email

    By default, diffs are sent in the format generated by
    :hg:`export`, one per message. The series starts with a "[PATCH 0
    of N]" introduction, which describes the series as a whole.

    Each patch email has a Subject line of "[PATCH M of N] ...", using
    the first line of the changeset description as the subject text.
    The message contains two or three parts. First, the changeset
    description.

    With the -d/--diffstat option, if the diffstat program is
    installed, the result of running diffstat on the patch is inserted.

    Finally, the patch itself, as generated by :hg:`export`.

    With the -d/--diffstat or --confirm options, you will be presented
    with a final summary of all messages and asked for confirmation before
    the messages are sent.

    By default the patch is included as text in the email body for
    easy reviewing. Using the -a/--attach option will instead create
    an attachment for the patch. With -i/--inline an inline attachment
    will be created. You can include a patch both as text in the email
    body and as a regular or an inline attachment by combining the
    -a/--attach or -i/--inline with the --body option.

    With -o/--outgoing, emails will be generated for patches not found
    in the destination repository (or only those which are ancestors
    of the specified revisions if any are provided)

    With -b/--bundle, changesets are selected as for --outgoing, but a
    single email containing a binary Mercurial bundle as an attachment
    will be sent.

    With -m/--mbox, instead of previewing each patchbomb message in a
    pager or sending the messages directly, it will create a UNIX
    mailbox file with the patch emails. This mailbox file can be
    previewed with any mail user agent which supports UNIX mbox
    files.

    With -n/--test, all steps will run, but mail will not be sent.
    You will be prompted for an email recipient address, a subject and
    an introductory message describing the patches of your patchbomb.
    Then when all is done, patchbomb messages are displayed. If the
    PAGER environment variable is set, your pager will be fired up once
    for each patchbomb message, so you can verify everything is alright.

    In case email sending fails, you will find a backup of your series
    introductory message in ``.hg/last-email.txt``.

    Examples::

      hg email -r 3000          # send patch 3000 only
      hg email -r 3000 -r 3001  # send patches 3000 and 3001
      hg email -r 3000:3005     # send patches 3000 through 3005
      hg email 3000             # send patch 3000 (deprecated)

      hg email -o               # send all patches not in default
      hg email -o DEST          # send all patches not in DEST
      hg email -o -r 3000       # send all ancestors of 3000 not in default
      hg email -o -r 3000 DEST  # send all ancestors of 3000 not in DEST

      hg email -b               # send bundle of all patches not in default
      hg email -b DEST          # send bundle of all patches not in DEST
      hg email -b -r 3000       # bundle of all ancestors of 3000 not in default
      hg email -b -r 3000 DEST  # bundle of all ancestors of 3000 not in DEST

      hg email -o -m mbox &&    # generate an mbox file...
        mutt -R -f mbox         # ... and view it with mutt
      hg email -o -m mbox &&    # generate an mbox file ...
        formail -s sendmail \   # ... and use formail to send from the mbox
          -bm -t < mbox         # ... using sendmail

    Before using this command, you will need to enable email in your
    hgrc. See the [email] section in hgrc(5) for details.
    R_RSRXR]Rctpatchescsóˆj|pd|pdƒ}tj|ƒd}ˆjtdƒtj|ƒƒgtjˆ|ƒD]}|dkrd|^qd}|sžt	ˆƒdg}nˆj
d|p°d|ƒ}|sÖˆjtdƒƒgSg|D]}t|ƒ^qÝS(	s4Return the revisions present locally but not in destsdefault-pushR
iscomparing with %s
isoutgoing(%s) and ::%ldRsno changes found
(t
expandpathRtparseurltstatusRRthidepasswordRtrevrangeR6trevsR7(tdestRmturlRb(R9R(s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pytgetoutgoings 1c
3s¾ˆdjƒ}x§tjˆ|ƒD]“}||krkˆdjƒsUˆdjƒrkˆjtdƒƒntj	ƒ}t
jˆ|gd|dtj
ˆˆƒƒ|jƒjdƒVq#WdS(Nt.s3warning: working directory has uncommitted changes
tfpRs
(RcRRlR&tfilestdeletedtwarnRt	cStringIOtStringIORtexportRtdiffoptstgetvalueR((RmtprevRbtoutput(RR9R(s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pyt
getpatches's,cs§tjddƒ}tjj|dƒ}zFtjˆˆ||ˆt|dƒ}|jƒ}|j	ƒ|SWdytj
|ƒWntk
r”nXtj|ƒXdS(Ntprefixshg-email-bundle-R_trb(
ttempfiletmkdtemptostpathR+RR_topentreadtclosetunlinktOSErrortrmdir(RnttmpdirttmpfnRrtdata(RR9R(s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pyt	getbundle2s

Rs,specify at least one changeset with -r or -osE--outgoing mode always on with --bundle; do not re-specify --outgoingistoo many destinationsis)use only one form to specify the revisionRmcs%d|d tˆdƒtjƒfS(Ns
<%s.%s@%s>ii(tinttsockettgetfqdn(tid(t
start_time(s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pytgenmsgidcscsˆjdƒr-tˆjdƒƒjƒ}nNˆjtdƒƒˆj||ƒ}ˆjddƒ}|j|ƒ|jƒ|S(NRs7
Write the introductory message for the patch series.

slast-email.txttwb(RR„R…twriteRtedittopenerR†(Rtsendertmsgfile(RR9R(s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pytgetdescriptionfs

csîg}ˆjtdƒt|ƒƒtˆt|ƒƒr]ˆ|ƒ}|r]|j|ƒq]nt|ƒt|ƒdk}d}xht|ƒD]Z\}}|r«||}ntˆˆ|ˆˆ|dt|ƒ||ƒ	}|j|ƒqŒW|S(Ns+this patch series consists of %d patches.

i(R•RR6RR)R&t	enumerateRK(Rgt
patchnamestmsgsRCR=tnameRMRD(R;t	makeintroRR9R(s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pytgetpatchmsgsss 
csIttt|ƒƒƒ}ˆjdƒp*d}|rIddj|ƒ}nd|dt|ƒ|f}ˆjdƒpŒtˆdd|d	dƒ}|s™dS|d|}d}ˆjd
ƒrátjt|gƒƒ}d|}nd}ˆ|ˆƒ}t	j
ˆ|ˆˆjdƒƒ}t	jˆ|ˆˆjdƒƒ|d
<|||fS(NR#RR"s[PATCH %0*d of %d%s]iR$s(optional) Subject: RR
Rs
RR%(R6R7RR+RR&RRtsumRR0R8(RgRJR#R~RIRRRC(R;RšRR˜R(s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pyRŸs(
!csˆjdƒptˆddƒ}ˆdˆƒ}tjjƒ}|rp|jtjˆ|ˆˆjdƒƒƒntjjddƒ}|j|ƒdˆjd	d
ƒ}|j	ddd
|ƒtj
j|ƒ|j|ƒtjˆ|ˆˆjdƒƒ|d<||dfgS(NR$sSubject:sA bundle for your repositoryRRtapplicationsx-mercurial-bundles%s.hgR`R_sContent-DispositionR tfilenameR%(RRR.R/RRR0tMIMEBasetset_payloadt
add_headertEncoderst
encode_base64R8R&(R_RIRRCtdatapartR`(R;RšRR˜R(s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pyt
getbundlemsgsªs+

%RUR.t	patchbombtFromRœcs|jƒ}|jddƒjƒ}ˆj|ƒ}|rxˆjd|dj|ƒfƒtjˆ|ˆˆjdƒƒSˆjd|ƒpŸˆjd|ƒpŸd}|rÇ|rÇtˆ|d	|ƒ}n|rˆjd||fƒtjˆ|gˆˆjdƒƒS|SdS(
Nt-Rs%s: %ss, RR.R«RR
(	tlowertreplaceRR)R+RtaddrlistencodetconfigR(theadertaskR
t	configkeytopttaddrstaddr(R;Rt	showaddrsR(s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pytgetaddrsÉs 
"tToR³sno recipient addresses providedtCcR
RtBccsReply-ToRRQs
Final summary:

s	From: %s
s%s
sSubject: %s
s
s1are you sure you want to send (yn)?$$ &Yes $$ &Nospatchbomb canceledtin_reply_tot<t>sX-Mercurial-Nodes
Message-IdsX-Mercurial-Series-IdsIn-Reply-Tot
ReferencessMercurial-patchbomb/%ss
User-Agentt	localtimetDates, sdisplaying s ...
tPAGERtwtmangle_from_tsmtpt
verifycerttinsecuretlooseNssending tsendingtitemRtwriting(0RR;RtvalidateconfigRtAbortRR6R&t	parsedatetmakedateR±RtusernametlisttFalsetTrueR•tpromptchoiceR'R3R.tUtilst	parseaddrt
addressencodeR›t	TypeErrortversiont
formatdateR+RjtflushR‚tenvironRtpopent	GeneratortflattentIOErrorterrnotEPIPER†t	setconfigtconnecttprogressRvRwRz($RR9RmRR_RSRXR]RcRgRpR}RRnR“R RªRR¹RZRPRNtreplytoR·RWRIRAtparenttsender_addrtsendmailt
firstpatchRMRrt	generatortinstRÇ((	R;RšRŸRR9R˜R¸R’Rs3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pyR«¯s_		

!



!"




 


(
"(t__doc__R‚RâRR€RvR.temail.Generatortemail.MIMEMultipartt	mercurialRRRRRRRtmercurial.i18nRtmercurial.nodeRtcmdtabletcommandt
testedwithR&RRRKt	emailoptst
remoteoptsR«(((s3/usr/lib/python2.7/dist-packages/hgext/patchbomb.pyt<module>.sD<.	Sæ

Copyright © 2017 || Recoded By Mr.Bumblebee