Kouhei Yanagita  committed 3a0e0cf

ja: translated advanced/2009-11-17-combining-repositories

  • Participants
  • Parent commits 079f2ef
  • Branches ja

Comments (0)

Files changed (1)

File advanced/2009-11-17-combining-repositories.html

 {% extends "_tip.html" %}
-    title: Combining Repositories
+    title: リポジトリを統合する
     author_name: Steve Losh
     created: 2009-11-17
 {% block excerpt %}
-What can you do when you realize: "Oh, maybe the documentation should be in
-the same repository as the code?"
 {% endblock %}
 {% block tip %}
-Thomas' last tip about [decomposing repositories][decomp] made me want to
-write about the inverse: combining two separate repositories into a single
+[リポジトリの分割][decomp]に関する Thomas の最新のティップを見て、その逆を書きたくなりました:
+2 つの別々のリポジトリを 1 つのリポジトリに統合することです。
 [decomp]: /tips/advanced/2009-11-16-using-convert-to-decompose-your-repository/
-Let's say you've working on a project. The code lives in `project` while the
-documentation lives in `docs`. You might decide that it would be nice to have
-them in the same repository, so when someone clones your project's code they
-get the documentation too.
+コードは `project` リポジトリにありますが、ドキュメントは `docs` リポジトリにあります。
-You *could* just create a new repository and copy all the data into it, but
-that wouldn't let you keep your nice history of changesets. Let's take a look
-at how to combine these separate repositories.
-Create the New, Combined Repository
-First we'll create the new repository where everything is going to live:
     $ ls
     total 24
     drwxr-xr-x  3 sjl   102B Nov 17 20:04 project
     drwxr-xr-x  4 sjl   136B Nov 17 19:58 project-code
-We've moved `project` to `project-code` to get it out of the way for the
+邪魔にならないように、とりあえず `project` は `project-code` に移動しました。
-Prepare Each Repository
-We probably don't want to just dump everything into the root folder of the new
-repository, so let's move things around a bit. First we'll move everything in
-the `project` repository into a `src/` directory:
+まず、`project` リポジトリの中身を `src/` ディレクトリに移動します。
     $ cd project-code
     $ hg commit -m 'Move the code into the src/ directory.'
-Now we'll do the same for the `docs` repository:
+`docs` リポジトリについても同様にします:
     $ cd ../docs
     $ hg commit -m 'Move the documentation into the docs/ directory.'
-Pull Both Repositories
+両方のリポジトリを pull する
-Now that we've adjusted the structure to our liking, we need to pull both
-repositories into `project`:
+ディレクトリ構造を好みになるように調節しましたので、両方のリポジトリを `project` へ pull する必要があります。
     $ cd ..
     total 0
     drwxr-xr-x  3 sjl   102B Nov 17 20:15 src
-Notice that we used the `--force` flag with `hg pull` to say to Mercurial:
-"It's okay, I know what I'm doing, I really do want to combine these
+`hg pull` に `--force` フラグを付けていることに注意してください。これは Mercurial に次のように伝えるためです:
-Merge the Repositories
-Take a look at the output of the last `ls` command. See how there's still just
-the `src/` directory? We need to merge the two repositories together to get a
-truly "combined" repository.
+最後の `ls` コマンドの出力を見てみましょう。まだ `src/` ディレクトリしかないのがわかるでしょうか。
-To make this a bit more clear, let's look at the graph of our new repository:
     $ hg glog
     o  6 Move the documentation into the docs/ directory. (7 minutes ago by Steve Losh) tip
     o  0 Start the project. (21 minutes ago by Steve Losh)
-See how we have two separate graphs? Changesets 0 to 3 are linked, and
-changesets 4 to 6 are linked. Now we need to merge these two graphs together.
-This should be trivial because we've organized the folder structure beforehand
-so there won't be any conflicts:
+2 つの別々のグラフになっているのがわかるでしょうか。
+チェンジセット 0 から 3 がつながっていて、さらにチェンジセット 4 から 6 がつながっています。
+これらの 2 つのグラフを一緒にマージしなくてはなりません。
     $ hg update 6
     2 files updated, 0 files merged, 1 files removed, 0 files unresolved
     $ hg commit -m 'Combine the source and docs repositories.'
-Now take a look at the graph:
     $ hg glog
     @    7 Combine the source and docs repositories. (37 seconds ago by Steve Losh) tip
     drwxr-xr-x  4 sjl   136B Nov 17 20:22 docs
     drwxr-xr-x  3 sjl   102B Nov 17 20:22 src
-Our two separate repositories are now nicely merged into one, with the
-changesets intact! Now we can delete the old repositories and push the new one
-to our public server for people to use.
+2 つの別々のリポジトリが、チェンジセットはそのままにうまく 1 つに統合されました!
-This is especially nice because we haven't changed the changeset hashes, which
-means that we can easily merge changesets from people that are still using the
-old, separate repositories.
-{% endblock %}
+{% endblock %}