Skip to content

Commit ce1c1d8

Browse files
authored
Merge pull request #1 from dscho/rebase-git-scm.com-pr-1943
Rebase PR 1943 of git/git-scm.com
2 parents 79caeb4 + a991edc commit ce1c1d8

File tree

14 files changed

+960
-919
lines changed

14 files changed

+960
-919
lines changed

book/08-customizing-git/sections/attributes.asc

Lines changed: 162 additions & 130 deletions
Large diffs are not rendered by default.

book/08-customizing-git/sections/config.asc

Lines changed: 210 additions & 153 deletions
Large diffs are not rendered by default.

book/08-customizing-git/sections/hooks.asc

Lines changed: 98 additions & 83 deletions
Large diffs are not rendered by default.

book/08-customizing-git/sections/policy.asc

Lines changed: 120 additions & 110 deletions
Large diffs are not rendered by default.

book/09-git-and-other-scms/sections/client-hg.asc

Lines changed: 60 additions & 96 deletions
Large diffs are not rendered by default.
Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
==== Bazaar
1+
==== Bazaar بازار
22
(((Bazaar)))(((Importing, from Bazaar)))
33

4-
Bazaar is a DVCS tool much like Git, and as a result it's pretty straightforward to convert a Bazaar repository into a Git one.
5-
To accomplish this, you'll need to import the `bzr-fastimport` plugin.
4+
Bazaar یک ابزار کنترل نسخه توزیع‌شده (DVCS) شبیه به Git است، و در نتیجه تبدیل یک مخزن Bazaar به یک مخزن Git نسبتاً ساده است.
5+
برای انجام این کار، باید افزونه `bzr-fastimport` را وارد (import) کنید.
66

7-
===== Getting the bzr-fastimport plugin
7+
===== دریافت افزونه bzr-fastimport
88

9-
The procedure for installing the fastimport plugin is different on UNIX-like operating systems and on Windows.
10-
In the first case, the simplest is to install the `bzr-fastimport` package that will install all the required dependencies.
9+
فرآیند نصب افزونه fastimport در سیستم‌عامل‌های شبه یونیکس و ویندوز متفاوت است.
10+
در سیستم‌عامل‌های شبه یونیکس، ساده‌ترین روش نصب پکیج bzr-fastimport است که تمامی وابستگی‌های مورد نیاز را نیز نصب خواهد کرد.
1111

12-
For example, with Debian and derived, you would do the following:
12+
برای مثال، در Debian و توزیع‌های مشتق‌شده از آن، می‌توانید این کار را به شکل زیر انجام دهید:
1313

1414
[source,console]
1515
----
1616
$ sudo apt-get install bzr-fastimport
1717
----
1818

19-
With RHEL, you would do the following:
19+
با RHEL، شما باید به صورت زیر عمل کنید:
2020

2121
[source,console]
2222
----
2323
$ sudo yum install bzr-fastimport
2424
----
2525

26-
With Fedora, since release 22, the new package manager is dnf:
26+
در Fedora، از نسخه ۲۲ به بعد، مدیر بسته جدید dnf است:
2727

2828
[source,console]
2929
----
3030
$ sudo dnf install bzr-fastimport
3131
----
3232

33-
If the package is not available, you may install it as a plugin:
33+
اگر این پکیج در دسترس نباشد، می‌توانید آن را به صورت یک افزونه (plugin) نصب کنید:
3434

3535
[source,console]
3636
----
37-
$ mkdir --parents ~/.bazaar/plugins # creates the necessary folders for the plugins
37+
$ mkdir --parents ~/.bazaar/plugins # ایجاد پوشه‌های لازم برای پلاگین‌ها
3838
$ cd ~/.bazaar/plugins
39-
$ bzr branch lp:bzr-fastimport fastimport # imports the fastimport plugin
39+
$ bzr branch lp:bzr-fastimport fastimport # وارد کردن پلاگین fastimport
4040
$ cd fastimport
41-
$ sudo python setup.py install --record=files.txt # installs the plugin
41+
$ sudo python setup.py install --record=files.txt # نصب پلاگین
4242
----
4343

44-
For this plugin to work, you'll also need the `fastimport` Python module.
45-
You can check whether it is present or not and install it with the following commands:
44+
برای اینکه این پلاگین کار کند، شما همچنین به ماژول پایتون `fastimport` نیاز دارید.
45+
می‌توانید بررسی کنید که آیا موجود است یا نه و با دستورات زیر آن را نصب کنید:
4646

4747
[source,console]
4848
----
@@ -52,87 +52,89 @@ Traceback (most recent call last):
5252
ImportError: No module named fastimport
5353
$ pip install fastimport
5454
----
55-
If it is not available, you can download it at address https://pypi.python.org/pypi/fastimport/.
55+
اگر در دسترس نیست، می‌توانید آن را از آدرس https://pypi.python.org/pypi/fastimport/.
5656

57-
In the second case (on Windows), `bzr-fastimport` is automatically installed with the standalone version and the default installation (let all the checkboxes checked).
58-
So in this case you have nothing to do.
57+
در حالت دوم (در ویندوز)، افزونه bzr-fastimport به‌صورت خودکار همراه با نسخه مستقل (standalone) و نصب پیش‌فرض (در صورتی که تمام چک‌باکس‌ها تیک‌خورده باقی بمانند) نصب می‌شود.
58+
بنابراین در این حالت، نیازی به انجام کار خاصی ندارید.
5959

60-
At this point, the way to import a Bazaar repository differs according to that you have a single branch or you are working with a repository that has several branches.
60+
در این مرحله، روش وارد کردن یک مخزن Bazaar بسته به این که فقط یک شاخه داشته باشید یا با مخزنی با چندین شاخه کار می‌کنید، متفاوت است.
6161

62-
===== Project with a single branch
62+
===== Project with a single branch (پروژه با یک شاخه واحد)
6363

64-
Now `cd` in the directory that contains your Bazaar repository and initialize the Git repository:
64+
اکنون `cd` در دایرکتوری که مخزن بازار شما در آن قرار دارد و مخزن گیت را راه‌اندازی کنید:
6565

6666
[source,console]
6767
----
6868
$ cd /path/to/the/bzr/repository
6969
$ git init
7070
----
7171

72-
Now, you can simply export your Bazaar repository and convert it into a Git repository using the following command:
72+
اکنون، می‌توانید به سادگی مخزن بازار خود را صادر کرده و آن را به یک مخزن گیت تبدیل کنید با استفاده از دستور
73+
زیر:
7374

7475
[source,console]
7576
----
7677
$ bzr fast-export --plain . | git fast-import
7778
----
7879

79-
Depending on the size of the project, your Git repository is built in a lapse from a few seconds to a few minutes.
80+
بسته به اندازه پروژه، مخزن Git شما در بازه‌ای از چند ثانیه تا چند دقیقه ساخته می‌شود.
8081

81-
===== Case of a project with a main branch and a working branch
82-
83-
You can also import a Bazaar repository that contains branches.
84-
Let us suppose that you have two branches: one represents the main branch (myProject.trunk), the other one is the working branch (myProject.work).
82+
===== Case of a project with a main branch and a working branch (حالت پروژه‌ای با یک شاخه اصلی و یک شاخه کاری)
83+
84+
شما می‌توانید یک مخزن Bazaar را که شامل چند شاخه است نیز وارد (import) کنید.
85+
فرض کنیم که دو شاخه دارید: یکی شاخه اصلی را نمایش می‌دهد (myProject.trunk) و دیگری شاخه کاری است (myProject.work).
8586

8687
[source,console]
8788
----
8889
$ ls
8990
myProject.trunk myProject.work
9091
----
9192

92-
Create the Git repository and `cd` into it:
93+
مخزن گیت را ایجاد کنید و با دستور `cd` به آن بروید:
9394

9495
[source,console]
9596
----
9697
$ git init git-repo
9798
$ cd git-repo
9899
----
99100

100-
Pull the `master` branch into git:
101+
شاخه `master` را به گیت بکشید:
101102

102103
[source,console]
103104
----
104105
$ bzr fast-export --export-marks=../marks.bzr ../myProject.trunk | \
105106
git fast-import --export-marks=../marks.git
106107
----
107108

108-
Pull the working branch into Git:
109+
شاخه کاری را به گیت بکشید:
109110

110111
[source,console]
111112
----
112113
$ bzr fast-export --marks=../marks.bzr --git-branch=work ../myProject.work | \
113114
git fast-import --import-marks=../marks.git --export-marks=../marks.git
114115
----
115116

116-
Now `git branch` shows you the `master` branch as well as the `work` branch.
117-
Check the logs to make sure they're complete and get rid of the `marks.bzr` and `marks.git` files.
117+
اکنون دستور git branch شاخه master و همچنین شاخه work را به شما نشان می‌دهد.
118+
لاگ‌ها (logs) را بررسی کنید تا مطمئن شوید همه چیز به‌طور کامل منتقل شده، و سپس فایل‌های marks.bzr و marks.git را حذف کنید.
118119

119-
===== Synchronizing the staging area
120+
===== Synchronizing the staging area (همگام‌سازی ناحیه موقت)
120121

121-
Whatever the number of branches you had and the import method you used, your staging area is not synchronized with `HEAD`, and with the import of several branches, your working directory is not synchronized either.
122-
This situation is easily solved by the following command:
122+
فارغ از تعداد شاخه‌هایی که داشتید و روشی که برای وارد کردن آن‌ها استفاده کردید، ناحیه staging شما با `HEAD` همگام نیست، و در صورت وارد کردن چند شاخه، دایرکتوری کاری شما نیز همگام نخواهد بود.
123+
این وضعیت به‌سادگی با اجرای دستور زیر حل می‌شود:
123124

124125
[source,console]
125126
----
126127
$ git reset --hard HEAD
127128
----
128129

129-
===== Ignoring the files that were ignored with .bzrignore
130+
===== نادیده گرفتن فایل‌هایی که با .bzrignore نادیده گرفته شده بودند
131+
132+
حالا بیایید نگاهی به فایل‌های نادیده گرفته شده بیندازیم.
133+
اولین کاری که باید انجام دهید این است که فایل .bzrignore را به .gitignore تغییر نام دهید.
130134

131-
Now let's have a look at the files to ignore.
132-
The first thing to do is to rename `.bzrignore` into `.gitignore`.
133-
If the `.bzrignore` file contains one or several lines starting with "!!" or "RE:", you'll have to modify it and perhaps create several `.gitignore` files in order to ignore exactly the same files that Bazaar was ignoring.
135+
اگر فایل .bzrignore شامل یک یا چند خط باشد که با "!!" یا "RE:" شروع می‌شوند، باید آن را ویرایش کرده و شاید نیاز باشد چند فایل .gitignore جداگانه بسازید تا دقیقاً همان فایل‌هایی را نادیده بگیرید که قبلاً توسط Bazaar نادیده گرفته می‌شدند.
134136

135-
Finally, you will have to create a commit that contains this modification for the migration:
137+
در نهایت، باید یک کامیت ایجاد کنید که این تغییرات را برای ثبت فرآیند مهاجرت شامل شود:
136138

137139
[source,console]
138140
----
@@ -141,10 +143,10 @@ $ # modify .gitignore if needed
141143
$ git commit -am 'Migration from Bazaar to Git'
142144
----
143145

144-
===== Sending your repository to the server
146+
===== Sending your repository to the server (ارسال مخزن شما به سرور)
145147

146-
Here we are!
147-
Now you can push the repository onto its new home server:
148+
الان آماده‌ایم!
149+
حالا می‌توانید مخزن را به سرور جدید خانه خود ارسال کنید:
148150

149151
[source,console]
150152
----
@@ -153,4 +155,4 @@ $ git push origin --all
153155
$ git push origin --tags
154156
----
155157

156-
Your Git repository is ready to use.
158+
مخزن گیت شما آماده استفاده است.

0 commit comments

Comments
 (0)