Substitution de mot-clés

Si un fichier source et un fichier de destination sont fournis, SubWCRev copie la source à la destination, en exécutant la substitution de mots-clé comme suit :

Tableau 5.2. Liste des commutateurs de ligne de commande disponibles

Mot-cléDescription
$WCREV$Remplacé par la plus haute révision livrée dans la copie de travail.
$WCDATE$, $WCDATEUTC$Replaced with the commit date/time of the highest commit revision. By default, international format is used: yyyy-mm-dd hh:mm:ss. Alternatively, you can specify a custom format which will be used with strftime(), for example: $WCDATE=%a %b %d %I:%M:%S %p$. For a list of available formatting characters, look at the Aide en ligne.
$WCNOW$, $WCNOWUTC$Remplacé par la date/heure actuelle du système. Cela peut être utile pour indiquer l'heure de compilation. Le format de l'heure est décrit comme ceci $WCDATE$.
$WCRANGE$Replaced with the update revision range in the working copy. If the working copy is in a consistent state, this will be a single revision. If the working copy contains mixed revisions, either due to being out of date, or due to a deliberate update-to-revision, then the range will be shown in the form 100:200.
$WCMIXED$$WCMIXED?VTexte:FTexte$ est remplacé par TText s'il y a des révisions avec des mises à jour mélangées, ou FText sinon.
$WCMODS$$WCMODS?VTexte:FTexte$ est remplacé par TText s'il y a des modifications locales, ou FText sinon.
$WCURL$Remplacé par l'URL du dépôt du chemin de la copie de travail passée à SubWCRev.
$WCINSVN$$WCINSVN?TText:FText$ est remplacé par TText si l'élément est versionné, ou FText sinon.
$WCNEEDSLOCK$$WCNEEDSLOCK?TText:FText$ est remplacé par TText si l'élément à la propriété svn:needs-lock activée, ou FText sinon.
$WCISLOCKED$$WCISLOCKED?TText:FText$ est remplacé par TText si l'élément est verrouillé, ou FText sinon.
$WCLOCKDATE$, $WCLOCKDATEUTC$Remplacé par la date de verrouillage. La mise en forme de l'heure peut être utilisée comme décrit pour $WCDATE$.
$WCLOCKOWNER$Remplacer par le nom du propriétaire du verrou
$WCLOCKCOMMENT$Remplacé par le commentaire du verrou


SubWCRev does not directly support nesting of expressions, so for example you cannot use an expression like:

#define SVN_REVISION    "$WCMIXED?$WCRANGE$:$WCREV$$"

But you can usually work around it by other means, for example:

#define SVN_RANGE       $WCRANGE$
#define SVN_REV         $WCREV$
#define SVN_REVISION    "$WCMIXED?SVN_RANGE:SVN_REV$"

Astuce

Some of these keywords apply to single files rather than to an entire working copy, so it only makes sense to use these when SubWCRev is called to scan a single file. This applies to $WCINSVN$, $WCNEEDSLOCK$, $WCISLOCKED$, $WCLOCKDATE$, $WCLOCKOWNER$ and $WCLOCKCOMMENT$.