ok

Mini Shell

Direktori : /proc/thread-self/root/lib64/python2.7/Tools/scripts/
Upload File :
Current File : //proc/thread-self/root/lib64/python2.7/Tools/scripts/logmerge.pyc

�
�fc@s�dZddlZddlZddlZddlZdddZdddZd�Zd	�Zdd
�Z
d�Zedkr�ye�Wq�e
k
r�Zejejkr��q�q�XndS(
s�Consolidate a bunch of CVS or RCS logs read from stdin.

Input should be the output of a CVS or RCS logging command, e.g.

    cvs log -rrelease14:

which dumps all log messages from release1.4 upwards (assuming that
release 1.4 was tagged with tag 'release14').  Note the trailing
colon!

This collects all the revision records and outputs them sorted by date
rather than by file, collapsing duplicate revision record, i.e.,
records with the same message for different files.

The -t option causes it to truncate (discard) the last revision log
entry; this is useful when using something like the above cvs log
command, which shows the revisions including the given tag, while you
probably want everything *since* that tag.

The -r option reverses the output (oldest first; the default is oldest
last).

The -b tag option restricts the output to *only* checkin messages
belonging to the given branch tag.  The form -b HEAD restricts the
output to checkin messages belonging to the CVS head (trunk).  (It
produces some output if tag is a non-branch tag, but this output is
not very useful.)

-h prints this message and exits.

XXX This code was created by reverse engineering CVS 1.9 and RCS 5.7
from their output.
i����Nt=iMs
t-ic
Cs(d}d}d	}tjtjdd�\}}xt|D]l\}}|dkrYd}q8|dkrnd}q8|dkr�|}q8|dkr8tGHtjd�q8q8Wg}xLttj�}|s�Pnt||�}	|r�|	d=n|	|t	|�)q�W|j
�|s|j�nt|�d	S(
sMain programiistrb:hs-ts-rs-bs-hi����N(
tNonetgetopttsystargvt__doc__texitt
read_chunktstdintdigest_chunktlentsorttreverset
format_output(
t
truncate_lastR
tbranchtoptstargstotatdatabasetchunktrecords((s./usr/lib64/python2.7/Tools/scripts/logmerge.pytmain*s6			


cCs�g}g}xx|j�}|s%Pn|tkrK|rG|j|�nPn|tkrv|r�|j|�g}q�q|j|�qW|S(skRead a chunk -- data for one file, ending with sep1.

    Split the chunk in parts separated by sep2.

    (treadlinetsep1tappendtsep2(tfpRtlinestline((s./usr/lib64/python2.7/Tools/scripts/logmerge.pyRHs 
cCs5|d}d}t|�}x8|D]*}|| |kr#||j�}Pq#q#Wd}|dkrfn"|dkr�tjd�}ni}d}d}x~|D]v}||kr�d}q�|r�|ddkr
|j�\}	}
|	dd	kr�|	d }	n|
||	<qd}q�q�W|j|�}
tjd
�}|
r�|
jd�dkr�|
jdd�}
tjd
tj	|
�d�}q�ng}x�|dD]�}|d}|d}
|d}|
j�}d}t|�dkr|ddkr|d}|d}|ddkr"|d }n|d|}t|�dkr�|ddkr�|d}|ddkr||d }q|q�nd}|j
d|�|j�}t|�dkr�|ddkr�|d}
nd}
|j
d|�|r|
dks�|j|
�rq�qn|j|||
||f�q�W|S(s9Digest a chunk -- extract working file name and revisionsis
Working file:tHEADs
^\d+\.\d+$ssymbolic names:
is	 i����t:s^<>$s.0.t.t^s\.\d+$iisdate:t;t isauthor:itrevisionN(
RtstripRtretcompiletsplittgettfindtreplacetescapetinserttmatchR(RRRtkeytkeylenRtworking_filet	revisionstfoundttagtrevRtrevlinetdatelinettexttwordstauthortdatewordttimewordtdate((s./usr/lib64/python2.7/Tools/scripts/logmerge.pyR
`sx


	


&


"


"
"
	 cCs�d}g}|jd�x�|D]�\}}}}}||kr�|r�tGx+|D]#\}}	}
}|G|G|	G|
GHqRWtjj|�ng}n|j||||f�|}q WdS(N(NNNNN(RRRRtstdoutt
writelines(RtprevtexttprevR?R3R7R<R:tp_datetp_working_filetp_revtp_author((s./usr/lib64/python2.7/Tools/scripts/logmerge.pyR�s
	t__main__(RRterrnoRR(RRRRRR
Rt__name__tIOErrortetEPIPE(((s./usr/lib64/python2.7/Tools/scripts/logmerge.pyt<module>#s0		E	

Zerion Mini Shell 1.0