How To Add Revision Number, ID Automatically To Subversion Files in Two Simple Steps كيف تضيف رقم المراجعه ، معرف تلقائيا الى ملفات التخريب في اثنين خطوات بسيطة
Revision number of a file is an important information. اعادة النظر في عدد من ملف معلومات هامة. Two most common uses are in serialization and in making version specific database upgrades for an application. اثنين الاستخدامات الاكثر شيوعا في التسلسل وجعل صيغة محددة في قاعدة البيانات لرفع مستوى الطلب. I am using it for the later. وانني لاستخدامها في وقت لاحق. Here is a simple way how you can add revision number (Id, Date, Author and HeadURL) automatically to your source files. هنا طريقة بسيطة كيف يمكنك اضافة رقم المراجعه (الهوية ، وحتى الآن ، والمؤلف headurl) تلقائيا الى ملفات المصدر الخاص بك.
First you need to add the keyword anchor at the desired location in the file. أولا تحتاج الى اضافة الكلمه الرئيسية راسيه في الموقع المطلوب في الملف. For example to get Revision information you must add $Rev$ or $Revision$ to your chosen location. على سبيل المثال للحصول على تنقيح المعلومات التي يجب ان اضيف مراجعة دولار دولار دولار او دولار لاعادة النظر في الموقع الذي تختاره.
Note: The keywords are case sensitive. ملاحظه : الكلمات الرئيسية هي القضية الحساسة.
Then you need to inform Subversion that these keyword(s) need to be substituted in your chosen file. ثم أنت بحاجة الى ابلاغ التخريب ان هذه الكلمه (الكلمات) الرئيسية على الحاجة الى ان تكون بديلا في الملف الذي تختاره. For example if you have added the $Rev$ keyword to translator.php. فعلى سبيل المثال اذا كان لديك دولار واضاف مراجعة الكلمات الرئيسية لtranslator.php دولار. Then you run propset command as follows: ثم قمت بتشغيل propset القيادة على النحو التالي :
svn propset svn:keywords “Revision” translator.php propset SVN SVN : الكلمات الرئيسية "تنقيح" translator.php
You are done! انت القيام به!
Now, after commit, your $Rev$ keyword will be automatically replaced with something like: والآن ، وبعد ارتكاب $ دولار مراجعة الكلمات الرئيسية تلقائيا سيتم الاستعاضه عن شيء مثل :
$Rev: 130 $ مراجعة دولار : 130 دولار
Note: The number will be automatically updated whenever anyone commits a new revision. ملاحظه : الرقم الذي سيتم تحديثها تلقائيا كلما اي شخص يرتكب تنقيح جديد.
The list of keywords (from Subversion documentation) along with their alternatives are: قائمة من الكلمات الرئيسية (التخريب من الوثائق) الى جانب بدائلها هي :
Date تاريخ
This keyword describes the last time the file was known to have been changed in the repository, and looks something like $Date: 2002-07-22 21:42:37 -0700 (Mon, 22 Jul 2002) $. ويصف هذه الكلمه الرئيسية في آخر مرة كان الملف من المعروف انها كانت في مستودع للتغيير ، ويتطلع الى ما يشبه دولار التاريخ : 2002-07-22 21:42:37 -0700 (الإثنين ، 22 يوليو 2002) دولار. It may also be specified as LastChangedDate . كما قد يكون على النحو المحدد lastchangeddate.
Revision مراجعة
This keyword describes the last known revision in which this file changed in the repository, and looks something like $Revision: 144 $ . ويصف هذه الكلمه الرئيسية الاخيرة التي تعرف باسم اعادة النظر في هذا الملف تغيير في المستودع ، ويتطلع الى ما يشبه مراجعة دولار : 144 دولار. It may also be specified as LastChangedRevision or Rev . كما قد يكون على النحو المحدد lastchangedrevision او مراجعة.
Author المؤلف
This keyword describes the last known user to change this file in the repository, and looks something like $Author: harry $ . ويصف هذه الكلمه الرئيسية للمستخدم آخر يعرف باسم لتغيير هذا الملف في المستودع ، ويتطلع الى ما يشبه دولار المؤلف : هاري دولار. It may also be specified as LastChangedBy . كما قد يكون على النحو المحدد lastchangedby.
HeadURL Headurl
This keyword describes the full URL to the latest version of the file in the repository, and looks something like $HeadURL: http://svn.collab.net/repos/trunk/README $ . ويصف هذه الكلمه الرئيسية لموقع كامل أحدث نسخة من الملف في المستودع ، ويتطلع الى ما يشبه دولار headurl : http://svn.collab.net/repos/trunk/readme دولار. It may be abbreviated as URL . قد يكون عنوان مختصر النحو.
Id الهوية
This keyword is a compressed combination of the other keywords. هذا هو المفتاح مضغوط مزيج من الكلمات الرئيسية الاخرى. Its substitution looks something like $Id: calc.c 148 2002-07-28 21:30:43Z sally $, and is interpreted to mean that the file calc.c was last changed in revision 148 on the evening of July 28, 2002 by the user sally. الاستعاضه عن تبدو شيئا كهذا دولار المستخدم : calc.c 148 سالي 2002-07-28 21:30:43 ض دولار ، ويفسر على انه يعني ان الملف calc.c آخر مرة تغير في تنقيح 148 مساء يوم 28 يوليو ، 2002 سالي من قبل المستخدم.
Filed under المقدم بمقتضى Headline News أهم الانباء , ، How To كيف , ، Open Source Software برامج المصدر المفتوح , ، Tech Note ملاحظه تقنيه , ، Technology التقنيه | |
| |
RSS 2.0 ار اس اس 2،0 | |
Trackback this Article | هذه المادة |
Email this Article ارسل هذه المادة
You may also like to read ويمكنك ايضا ان تقرأ |




