File: //usr/lib/python3/dist-packages/hgext/__pycache__/keyword.cpython-310.pyc
o
�]Lbw � @ s� d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z ddl
mZ ddlm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ ddlmZm Z dd l!m"Z" i Z#e�$e#�Z$d
Z%dZ&dZ'd
Z(dZ)dddddd�Z*e�+� Z+i Z,e�-e,�Z-e-dddd� e+dej.d�dd� �Z/e+dej.d�dd� �Z0e+d ej.d�d!d"� �Z1d#d$iZ2d%d&� Z3d'd(� Z4d)d*� Z5G d+d,� d,e6�Z7G d-d.� d.ej�Z8d/d0� Z9d1d2� Z:e$d3d4d5ded6�fd7d8d$ed9�ed:�fged;�d<d=�d>d?� �Z;e$d@e
j<edA�d<dB�dCdD� �Z=e$dEdFdGdedH�fdIdJdedK�fdLdMdedN�fge
j< edO�d<dB�dPdQ� �Z>e$dRe
j<edS�d<dB�dTdU� �Z?dhdVdW�Z@dXdY� ZAdZd[� ZBd\d]� ZCdid^d_�ZDd`da� ZEdbdc� ZFddde� ZGdfdg� ZHdS )jaC expand keywords in tracked files
This extension expands RCS/CVS-like or self-customized $Keywords$ in
tracked text files selected by your configuration.
Keywords are only expanded in local repositories and not stored in the
change history. The mechanism can be regarded as a convenience for the
current user or for archive distribution.
Keywords expand to the changeset data pertaining to the latest change
relative to the working directory parent of each file.
Configuration is done in the [keyword], [keywordset] and [keywordmaps]
sections of hgrc files.
Example::
[keyword]
# expand keywords in every python file except those matching "x*"
**.py =
x* = ignore
[keywordset]
# prefer svn- over cvs-like default keywordmaps
svn = True
.. note::
The more specific you are in your filename patterns the less you
lose speed in huge repositories.
For [keywordmaps] template mapping and expansion demonstration and
control run :hg:`kwdemo`. See :hg:`help templates` for a list of
available templates and filters.
Three additional date template filters are provided:
:``utcdate``: "2006/09/18 15:13:13"
:``svnutcdate``: "2006-09-18 15:13:13Z"
:``svnisodate``: "2006-09-18 08:13:13 -700 (Mon, 18 Sep 2006)"
The default template mappings (view with :hg:`kwdemo -d`) can be
replaced with customized keywords and templates. Again, run
:hg:`kwdemo` to control the results of your configuration changes.
Before changing/disabling active keywords, you must run :hg:`kwshrink`
to avoid storing expanded keywords in the change history.
To force expansion after enabling it, or a configuration change, run
:hg:`kwexpand`.
Expansions spanning more than one line and incremental expansions,
like CVS' $Log$, are not supported. A keyword template map "Log =
{desc}" expands to the first line of the changeset description.
� )�absolute_importN)�_)�getattr)�webcommands)�cmdutil�context�dispatch�error�
extensions�filelog� localrepo�
logcmdutil�match�patch�pathutil�pycompat� registrar�scmutil�templatefilters�templateutil�util)�dateutil�
stringutil)� timestamps ships-with-hg-coresg add addremove annotate bundle export grep incoming init log outgoing push tip verify convert email glogs/ annotate changeset rev filediff diff comparisonsf merge kwexpand kwshrink record qrecord resolve transplant unshelve rebase graft backout histedit fetchs records
green bolds cyan bold underlines greens bolds none)s kwfiles.enableds kwfiles.deleteds kwfiles.enabledunknowns kwfiles.ignoreds kwfiles.ignoredunknown�
keywordset� svnF)�defaults utcdate)�intypec C � d}t �| d df|�S )z?Date. Returns a UTC-date in this format: "2009/08/18 11:00:13".s %Y/%m/%d %H:%M:%Sr �r �datestr��date�
dateformat� r$ �//usr/lib/python3/dist-packages/hgext/keyword.py�utcdate� s r&