6hpArSrSSKJr SSKrSSKrSSKJr SSKJrJ r J r J r J r JrJrJrJr SSKJr Sr0r\R,"\5r\"SS S S 9 \"SS \R.S 9 \"SS SS 9 \R0"S5rSrSrSrSr\\\\\S.r"SS5rSr Sr!Sr"Sr#Sr$\$r%Sr&Sr'Sr(Sr)g) a6automatically manage newlines in repository files This extension allows you to manage the type of line endings (CRLF or LF) that are used in the repository and in the local working directory. That way you can get CRLF line endings on Windows and LF on Unix/Mac, thereby letting everybody use their OS native line endings. The extension reads its configuration from a versioned ``.hgeol`` configuration file found in the root of the working directory. The ``.hgeol`` file use the same syntax as all other Mercurial configuration files. It uses two sections, ``[patterns]`` and ``[repository]``. The ``[patterns]`` section specifies how line endings should be converted between the working directory and the repository. The format is specified by a file pattern. The first match is used, so put more specific patterns first. The available line endings are ``LF``, ``CRLF``, and ``BIN``. Files with the declared format of ``CRLF`` or ``LF`` are always checked out and stored in the repository in that format and files declared to be binary (``BIN``) are left unchanged. Additionally, ``native`` is an alias for checking out in the platform's default line ending: ``LF`` on Unix (including Mac OS X) and ``CRLF`` on Windows. Note that ``BIN`` (do nothing to line endings) is Mercurial's default behavior; it is only needed if you need to override a later, more general pattern. The optional ``[repository]`` section specifies the line endings to use for files stored in the repository. It has a single setting, ``native``, which determines the storage line endings for files declared as ``native`` in the ``[patterns]`` section. It can be set to ``LF`` or ``CRLF``. The default is ``LF``. For example, this means that on Windows, files configured as ``native`` (``CRLF`` by default) will be converted to ``LF`` when stored in the repository. Files declared as ``LF``, ``CRLF``, or ``BIN`` in the ``[patterns]`` section are always stored as-is in the repository. Example versioned ``.hgeol`` file:: [patterns] **.py = native **.vcproj = CRLF **.txt = native Makefile = LF **.jpg = BIN [repository] native = LF .. note:: The rules will first apply when files are touched in the working directory, e.g. by updating to null and back to tip to touch all files. The extension uses an optional ``[eol]`` section read from both the normal Mercurial configuration files and the ``.hgeol`` file, with the latter overriding the former. You can use that section to control the overall behavior. There are three settings: - ``eol.native`` (default ``os.linesep``) can be set to ``LF`` or ``CRLF`` to override the default interpretation of ``native`` for checkout. This can be used with :hg:`archive` on Unix, say, to generate an archive where files have line endings for Windows. - ``eol.only-consistent`` (default True) can be set to False to make the extension convert files with inconsistent EOLs. Inconsistent means that there is both ``CRLF`` and ``LF`` present in the file. Such files are normally not touched under the assumption that they have mixed EOLs on purpose. - ``eol.fix-trailing-newline`` (default False) can be set to True to ensure that converted files end with a EOL character (either ``\n`` or ``\r\n`` as per the configured patterns). The extension provides ``cleverencode:`` and ``cleverdecode:`` filters like the deprecated win32text extension does. This means that you can disable win32text and enable eol and your filters will still work. You only need to these filters until you have prepared a ``.hgeol`` file. The ``win32text.forbid*`` hooks provided by the win32text extension have been unified into a single hook named ``eol.checkheadshook``. The hook will lookup the expected line endings from the ``.hgeol`` file, which means you must migrate to a ``.hgeol`` file first before using the hook. ``eol.checkheadshook`` only checks heads, intermediate invalid revisions will be pushed. To forbid them completely, use the ``eol.checkallhook`` hook. These hooks are best used as ``pretxnchangegroup`` hooks. See :hg:`help patterns` for more information about the glob patterns used. ) annotationsN)_) configerror extensionsmatchmergepycompat registrarscmutilutil) stringutilsships-with-hg-coreeolfix-trailing-newlineF)defaultnativeonly-consistentTs (^|[^ ]) cDSU;=(a [RU5$)N )singlelfsearch)datas +/usr/lib/python3/dist-packages/hgext/eol.pyinconsistenteolrs d? 4xt44c ,[R"U5(aU$URSS5(a[U5(aU$URSS5(a"U(aUR S5(dUS-n[ R "U5$)zFilter to convert to LF EOLs.rrr )rbinary configboolrendswithr tolfsparamsuikwargss rr!r!st }}V/00_Q5G5G f566  5!! I 99Q<rc ,[R"U5(aU$URSS5(a[U5(aU$URSS5(a"U(aUR S5(dUS-n[ R "U5$)zFilter to convert to CRLF EOLs.rrrr)rrrrr r tocrlfr"s rr(r(st }}V/00_Q5G5G f566  5!! I ;;q>rc U$)z#Filter to do nothing with the file.r"s risbinaryr+s Hr)to-lfto-crlf is-binarys cleverencode:s cleverdecode:c&\rSrSrSrSrSrSrg)eolfilec<SSSS.UlSSSS.Ul[R"5UlURR SSSS5 URR S U5 URR S S 5S :gnU=(a S=(d SURS 'URSS 5S;nU=(a S=(d SURS '/n/n/UlURRS5HtupU R5n U S:XaURU5 OURU5 [R"USU/5n URRXU 45 Mv [R"US/Xg5Ul g)Nr,r-r.)LFCRLFBINpatternss.hg*r5r.hgeols repositoryrr4sNATIVE)r3rr) _decode_encodercfgsetparsegetpatternsitemsupperappendr) selfr%rootrisrepolfiswdlfincludeexcludepatternstylekeyms r__init__eolfile.__init__sV      ==?  ['66: y$'88<< y9WD"*"7x"E: Y69-?"("5X"C Y "hhnn[9NG++-Cf}w'w' D#y1A MM '!2 3:[[sBA rc URVVVs1sHup#oBiM nnnnSHNnURU5H6upxXu;dM URXg5S:XdM#URXgSS5 M8 MP URHGup#nURSX RUS5 URSX R US5 MI URRS5HupURSXS5 M gs snnnf![ a< UR[S5X0RRSU54-5 Mf=f)N)decodeencoder!rOrPs(ignoring unknown EOL style '%s' from %s r6) r> configitems configsource setconfigr8r9KeyErrorwarnrr:sourcer?) rBr%rHrJrK newpatternssection oldpattern_filterkvs rcopytouieolfile.copytouis"6:mmDm?7wm D-G')~~g'># 0w;vE W$G(?. $}}OG!  Yc1BFK Yc1BFK -HHNN6*DA LLv .+!E BCHHOOKABC sD AD  AEEc v/nU=(d UR5HnXR;aM URHupgnU"U5(dMURUn X%R5n U S:XaSU ;d U S:Xa6[R U 5(aUR XY[U545 M M U$)Nr,rr-)filesr>r9rrrrAbytes) rBrepoctxrafailedfrHrJrKtargetrs rcheckreveolfile.checkrevs%#))+%A|#'==attc*v{{}h&4+ --MM1eCj"9:$1&  r)r8r9r:rr>N)__name__ __module__ __qualname____firstlineno__rLr^rh__static_attributes__r*rrr0r0s%BN/(rr0cUHRnUc URS5R5nOXSR5n[XRU5s $ g![ [ 4a Mjf=f![Ra=nUR[S5URUR4-5 SnAgSnAff=f)Nr7s;warning: ignoring .hgeol file due to parse error at %s: %s ) wvfsreadrr0rCOSError LookupErrorerrormod ConfigErrorrVrlocationmessage)r%rcnodesnoderinsts rparseeolr{s D < 99Y/446D:i0557Dr99d33& [)         }}dll+  ,    sAA2A AA2A2A/+A2.A//A22C3B>>CczSUR;agURSSSSS9 [R"US/5 g)amake sure the extension is enabled when used as hook When eol is used through hooks, the extension is never formally loaded and enabled. This has some side effect, for example the config declaration is never loaded. This function ensure the extension is enabled when running hooks. rNs extensionsrsinternal)rW) _knownconfigrTrloadallr%s r ensureenabledr's9 LLKL@rF8$rc[U5 [5n[5n[XR5[ U55HvnUR U5 U(dMXnUR UR55 UR5H"nURUR55 M$ Mx /n UHLnXn[XUR5/5n U (dM+U RU RXU55 MN U (anSSS.n /n [U 5H'upnU R[!S5XX4-5 M) ["R$"[!S5SR'U 5-5eg)Nr4r3)r,r-s* %s in %s should not have %s line endingssend-of-line check failed: r)rr;rangerevlenaddupdateraparentsdiscardr{ryextendrhsortedrArrtAbortjoin)r%rcry headsonlyrarevsrrdpctxreeoleolsmsgsrfrgs r _checkhookr5sB" EE 5DTZ^^%s4y1  9)C LL %  TXXZ(& 2Fir#((*. 3 MM#,,t%8 9  !u5%f~OAt KK?@DL)*  . nn , - 40@ @  rc [XUS5 g)$verify that files have expected EOLsFNrr%rcryhooktyper&s r checkallhookrUsru%rc [XUS5 g)rTNrrs rcheckheadshookrZsrt$rcT[R"X5nURU/5 g)NF)r resolvehexnodeidprefixloadeol)r%rcrparent1parent2p1nodes r preupdatercs#  + +D :FLL& rc4URSS[S5 g)Nshookss preupdate.eolr)rTrrs ruisetuprisLL+Y?rc[R"S5 UR[S55 g![a gf=f)Ns win32texts?the eol extension is incompatible with the win32text extension )rfindrVrrUrs rextsetuprms@   %  )     s03 AAcJ[UR5 S[lUR 5(dg[ R 5Hup#URX#5 M URSSSS5 "SSUR5nXAl UR5 g)NFspatchrsautoc8^\rSrSrSrSrSU4SjjrSrU=r$)reposetup..eolrepoic[URX5nUcgURUR5 UR$)N)r{r%r^r)rBrxrs rr"reposetup..eolrepo.loadeols4477D0C{ LL !99 rcRURS/5UlUR(d[RUlgSn[R R URRS55nURRS5nU(a![URURU5n[R R URS55nXB:GaUS:GaURRS5 UR RS5n[URURU5nSnUR#5nUR$R'U5 UR$HnUR$R)U5R*(dM/UbUR-U5(dUR-U5(dM`Sn UR.Hupn U "U5(dMU n O Sn UR.Hupn U "U5(dMU n O X:XaMUR$R1U5 M URSS5nUR3U5 SSS5 SSS5 UbUR95 gggg![a SnGNf=f![a SnGNf=f!,(df  NS=f!,(df  N\=f![4R6a Nuf=f!UbUR95 ff=f)Ns eol.cacherr7seol: detected change in .hgeol w)r _eolmatchr neverospathgetmtimevfsrrqr0r%rCrrwjoindebugrpwlockdirstatechanging_files get_entry maybe_cleanrr>set_possibly_dirtywritertLockUnavailablerelease)rBoldeol cachemtimeolddataeolmtime hgeoldataneweolrrfoldkeyrHrJrKnewkeys r_hgcleardirstate+reposetup..eolrepo._hgcleardirstates!\\4&1DN>>!%F BWW--dhhmmL.IJ ((-- 5$TWWdiiAF 77++DJJy,AB%(Q, AB IINN95  $))Y?$( JJLE55d;!%A#'==#:#:1#=#I#I (%1'-||Av||A$,)-7=OG!'(tt14(-8G*.7=OG!'(tt14(-8G$*#3$,!MM<.K+K6>B K%%K%7>K%5KK%K6. J>=J> KK K" K%% K3/K62L3K66L  L L  LL&c>[UR5UR5-5HnURU5(dMXnUcM$UR 5n[ R "U5(aMQ[U5(dMc[R"[S5U-5e [TU]1XU5$)Ns!inconsistent newline style in %s ) raddedmodifiedrrrrrrtrrsuper commitctx)rBrdrorigctxrffctxr __class__s rr$reposetup..eolrepo.commitctxsCIIK#,,.89~~a((v<yy{$$T**"4(("..?@1D: 7$S9 9r)r)FN) rjrkrlrmrrrrn __classcell__)rs@reolrepors @ (D : :rr) rr%r MAYBE_USE_RUST_UPDATElocalfiltersr? adddatafilterrTrr)r%rcnamefnrs r reposetuprzs~ DGG"'E ::<<MMO 4$$LL67F3[:$..[:zNr)*__doc__ __future__rrremercurial.i18nr mercurialrrrtrrr r r r r mercurial.utilsr testedwith configtable configitem oslinesepcompilerrr!r(r+rr0r{rrrrhookrrrrr*rrrs[z#    ' #   ! !+ .              ::n %5     NNb0 % @& %  @  ir