|
1 | | -=== About Version Control |
| 1 | +=== About Version Control (حول التحكم في الإصدارات) |
2 | 2 |
|
3 | 3 | (((version control))) |
4 | | -What is "`version control`", and why should you care? |
5 | | -Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. |
6 | | -For the examples in this book, you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer. |
| 4 | +ما هو "`version control`" (نظام التحكم في الإصدارات)، ولماذا يجب أن تهتم به؟ |
| 5 | +Version control (نظام التحكم في الإصدارات) هو نظام يقوم بتسجيل التغييرات على ملف أو مجموعة من الملفات بمرور الوقت بحيث يمكنك استدعاء إصدارات محددة لاحقاً. |
| 6 | +بالنسبة للأمثلة في هذا الكتاب، ستستخدم كود المصدر البرمجي (software source code) كملفات يتم التحكم في إصداراتها، على الرغم من أنه في الواقع يمكنك القيام بذلك مع أي نوع من الملفات تقريباً على الكمبيوتر. |
7 | 7 |
|
8 | | -If you are a graphic or web designer and want to keep every version of an image or layout (which you would most certainly want to), a Version Control System (VCS) is a very wise thing to use. |
9 | | -It allows you to revert selected files back to a previous state, revert the entire project back to a previous state, compare changes over time, see who last modified something that might be causing a problem, who introduced an issue and when, and more. |
10 | | -Using a VCS also generally means that if you screw things up or lose files, you can easily recover. |
11 | | -In addition, you get all this for very little overhead. |
| 8 | +إذا كنت مصمم جرافيك أو ويب وترغب في الاحتفاظ بكل إصدار من صورة أو تخطيط (وهو ما سترغب به بالتأكيد)، فإن استخدام Version Control System (VCS) (نظام التحكم في الإصدارات) هو أمر حكيم جداً. |
| 9 | +إنه يتيح لك إعادة الملفات المحددة إلى حالة سابقة (revert)، وإعادة المشروع بأكمله إلى حالة سابقة، ومقارنة التغييرات بمرور الوقت، ومعرفة من قام بتعديل شيء ما قد يتسبب في مشكلة، ومن أدخل مشكلة ومتى، والمزيد. |
| 10 | +استخدام VCS (نظام التحكم في الإصدارات) يعني أيضاً بشكل عام أنه إذا أفسدت الأمور أو فقدت ملفات، يمكنك بسهولة الاسترداد (recover). |
| 11 | +بالإضافة إلى ذلك، يمكنك الحصول على كل هذا مقابل القليل جداً من العبء الإضافي (overhead). |
12 | 12 |
|
13 | | -==== Local Version Control Systems |
| 13 | +==== Local Version Control Systems (أنظمة التحكم في الإصدارات المحلية) |
14 | 14 |
|
15 | 15 | (((version control,local))) |
16 | | -Many people's version-control method of choice is to copy files into another directory (perhaps a time-stamped directory, if they're clever). |
17 | | -This approach is very common because it is so simple, but it is also incredibly error prone. |
18 | | -It is easy to forget which directory you're in and accidentally write to the wrong file or copy over files you don't mean to. |
| 16 | +طريقة Version-control (التحكم في الإصدارات) المفضلة لدى الكثير من الناس هي نسخ الملفات إلى دليل آخر (ربما دليل يحمل طابعاً زمنياً، إذا كانوا أذكياء). |
| 17 | +هذا النهج شائع جداً لأنه بسيط للغاية، ولكنه أيضاً عرضة للخطأ بشكل لا يصدق. |
| 18 | +من السهل أن تنسى الدليل الذي تتواجد فيه وتكتب عن طريق الخطأ في الملف الخاطئ أو تنسخ فوق ملفات لا تقصدها. |
19 | 19 |
|
20 | | -To deal with this issue, programmers long ago developed local VCSs that had a simple database that kept all the changes to files under revision control. |
| 20 | +للتعامل مع هذه المشكلة، قام المبرمجون منذ فترة طويلة بتطوير أنظمة VCS (أنظمة التحكم في الإصدارات) محلية تحتوي على قاعدة بيانات بسيطة تحتفظ بجميع التغييرات التي تطرأ على الملفات تحت Revision control (نظام التحكم في المراجعة). |
21 | 21 |
|
22 | | -.Local version control diagram |
| 22 | +.Local version control diagram (مخطط نظام التحكم في الإصدارات المحلي) |
23 | 23 | image::images/local.png[Local version control diagram] |
24 | 24 |
|
25 | | -One of the most popular VCS tools was a system called RCS, which is still distributed with many computers today. |
26 | | -https://www.gnu.org/software/rcs/[RCS^] works by keeping patch sets (that is, the differences between files) in a special format on disk; it can then re-create what any file looked like at any point in time by adding up all the patches. |
| 25 | +أحد أكثر أدوات VCS (أنظمة التحكم في الإصدارات) شيوعاً كان نظاماً يسمى RCS، والذي لا يزال يتم توزيعه مع العديد من أجهزة الكمبيوتر اليوم. |
| 26 | +يعمل https://www.gnu.org/software/rcs/[RCS^] عن طريق الاحتفاظ بمجموعات التصحيح (patch sets) (أي الاختلافات بين الملفات) بتنسيق خاص على القرص؛ يمكنه بعد ذلك إعادة إنشاء شكل أي ملف في أي وقت عن طريق جمع جميع التصحيحات (patches). |
27 | 27 |
|
28 | | -==== Centralized Version Control Systems |
| 28 | +==== Centralized Version Control Systems (أنظمة التحكم في الإصدارات المركزية) |
29 | 29 |
|
30 | 30 | (((version control,centralized))) |
31 | | -The next major issue that people encounter is that they need to collaborate with developers on other systems. |
32 | | -To deal with this problem, Centralized Version Control Systems (CVCSs) were developed. |
33 | | -These systems (such as CVS, Subversion, and Perforce) have a single server that contains all the versioned files, and a number of clients that check out files from that central place.(((CVS)))(((Subversion)))(((Perforce))) |
34 | | -For many years, this has been the standard for version control. |
| 31 | +المشكلة الرئيسية التالية التي يواجهها الأشخاص هي أنهم بحاجة إلى التعاون مع مطورين على أنظمة أخرى. |
| 32 | +للتعامل مع هذه المشكلة، تم تطوير Centralized Version Control Systems (CVCSs) (أنظمة التحكم في الإصدارات المركزية). |
| 33 | +تحتوي هذه الأنظمة (مثل CVS و Subversion و Perforce) على خادم واحد (single server) يحتوي على جميع الملفات ذات الإصدارات، وعدد من العملاء (clients) الذين يقومون بسحب (check out) الملفات من ذلك المكان المركزي.(((CVS)))(((Subversion)))(((Perforce))) |
| 34 | +لسنوات عديدة، كان هذا هو المعيار للتحكم في الإصدارات. |
35 | 35 |
|
36 | | -.Centralized version control diagram |
| 36 | +.Centralized version control diagram (مخطط نظام التحكم في الإصدارات المركزي) |
37 | 37 | image::images/centralized.png[Centralized version control diagram] |
38 | 38 |
|
39 | | -This setup offers many advantages, especially over local VCSs. |
40 | | -For example, everyone knows to a certain degree what everyone else on the project is doing. |
41 | | -Administrators have fine-grained control over who can do what, and it's far easier to administer a CVCS than it is to deal with local databases on every client. |
| 39 | +يوفر هذا الإعداد العديد من المزايا، خاصة على أنظمة VCS (أنظمة التحكم في الإصدارات) المحلية. |
| 40 | +على سبيل المثال، يعرف الجميع إلى حد معين ما يفعله كل شخص آخر في المشروع. |
| 41 | +يتمتع المسؤولون (Administrators) بتحكم دقيق في من يمكنه فعل ماذا، ومن الأسهل بكثير إدارة نظام CVCS (نظام تحكم في الإصدارات مركزي) بدلاً من التعامل مع قواعد البيانات المحلية على كل عميل (client). |
42 | 42 |
|
43 | | -However, this setup also has some serious downsides. |
44 | | -The most obvious is the single point of failure that the centralized server represents. |
45 | | -If that server goes down for an hour, then during that hour nobody can collaborate at all or save versioned changes to anything they're working on. |
46 | | -If the hard disk the central database is on becomes corrupted, and proper backups haven't been kept, you lose absolutely everything -- the entire history of the project except whatever single snapshots people happen to have on their local machines. |
47 | | -Local VCSs suffer from this same problem -- whenever you have the entire history of the project in a single place, you risk losing everything. |
| 43 | +ومع ذلك، فإن هذا الإعداد يحتوي أيضاً على بعض السلبيات الخطيرة. |
| 44 | +الأكثر وضوحاً هو نقطة الفشل الوحيدة (single point of failure) التي يمثلها الخادم المركزي (centralized server). |
| 45 | +إذا تعطل ذلك الخادم لمدة ساعة، فخلال تلك الساعة لا يمكن لأي شخص التعاون على الإطلاق أو حفظ التغييرات ذات الإصدارات لأي شيء يعملون عليه. |
| 46 | +إذا تلف القرص الصلب الموجود عليه قاعدة البيانات المركزية (central database)، ولم يتم الاحتفاظ بنسخ احتياطية (backups) مناسبة، فإنك تفقد كل شيء تماماً -- السجل الكامل (entire history) للمشروع باستثناء أي لقطات (snapshots) فردية قد يمتلكها الأشخاص على أجهزتهم المحلية. |
| 47 | +تعاني أنظمة VCS (أنظمة التحكم في الإصدارات) المحلية من نفس هذه المشكلة -- متى ما كان لديك السجل الكامل للمشروع في مكان واحد، فإنك تخاطر بفقدان كل شيء. |
48 | 48 |
|
49 | | -==== Distributed Version Control Systems |
| 49 | +==== Distributed Version Control Systems (أنظمة التحكم في الإصدارات الموزعة) |
50 | 50 |
|
51 | 51 | (((version control,distributed))) |
52 | | -This is where Distributed Version Control Systems (DVCSs) step in. |
53 | | -In a DVCS (such as Git, Mercurial or Darcs), clients don't just check out the latest snapshot of the files; rather, they fully mirror the repository, including its full history. |
54 | | -Thus, if any server dies, and these systems were collaborating via that server, any of the client repositories can be copied back up to the server to restore it. |
55 | | -Every clone is really a full backup of all the data. |
| 52 | +هنا تتدخل Distributed Version Control Systems (DVCSs) (أنظمة التحكم في الإصدارات الموزعة). |
| 53 | +في نظام DVCS (مثل Git أو Mercurial أو Darcs)، لا يكتفي العملاء (clients) بسحب أحدث لقطة (snapshot) للملفات فحسب؛ بل إنهم يعكسون (mirror) المستودع (repository) بالكامل، بما في ذلك سجله الكامل (full history). |
| 54 | +وبالتالي، إذا تعطل أي خادم، وكانت هذه الأنظمة تتعاون عبر ذلك الخادم، يمكن نسخ أي من مستودعات العملاء مرة أخرى إلى الخادم لاستعادته (restore it). |
| 55 | +كل نسخة (clone) هي في الواقع نسخة احتياطية كاملة (full backup) من جميع البيانات. |
56 | 56 |
|
57 | | -.Distributed version control diagram |
| 57 | +.Distributed version control diagram (مخطط نظام التحكم في الإصدارات الموزع) |
58 | 58 | image::images/distributed.png[Distributed version control diagram] |
59 | 59 |
|
60 | | -Furthermore, many of these systems deal pretty well with having several remote repositories they can work with, so you can collaborate with different groups of people in different ways simultaneously within the same project. |
61 | | -This allows you to set up several types of workflows that aren't possible in centralized systems, such as hierarchical models. |
| 60 | +علاوة على ذلك، فإن العديد من هذه الأنظمة تتعامل بشكل جيد مع وجود العديد من Remote repositories (المستودعات البعيدة) التي يمكنهم العمل معها، بحيث يمكنك التعاون مع مجموعات مختلفة من الأشخاص بطرق مختلفة في وقت واحد داخل نفس المشروع. |
| 61 | +يتيح لك ذلك إعداد عدة أنواع من مسارات العمل (workflows) غير الممكنة في الأنظمة المركزية، مثل النماذج الهرمية (hierarchical models). |
0 commit comments