Bab 3. Menggunakan TortoiseMerge

Daftar Isi

Moda-Moda Melihat
Melihat / Menggabung
Menerapkan Patch
Tombol dan Kontrol Lain
Ikon-Ikon Status Baris
Menggabung / Mengedit Konflik
Buka File
Melihat / Menggabung
Menerapkan Patch
Seting
Halaman Seting Utama
Halaman Seting Warna

Moda-Moda Melihat

TortoiseMerge has three main viewing modes: one-pane, two-pane and three-pane view. One/two-pane view is used to view changes and three-pane view is used to resolve conflicts.

Melihat / Menggabung

Gambar 3.1. Tampilan Satu Pane

Tampilan Satu Pane

Gambar 3.2. Tampilan Dua Pane

Tampilan Dua Pane

Tampilan dua pane mempunyai beberapa fitur yang tidak tersedia dalam tampilan satu pane:

  • Perubahan di dalam baris yang diubah ditampilkan dalam warna berbeda. Bagian string yang ditambahkan ditampilkan dengan warna lebih terang, tetapi tentunya Anda bisa mengkonfigurasi warna-warna yang digunakan di sini. Bagian yang dihapus ditunjukan dengan warna garis vertikal coklat tua dalam string. Periksa foto layar untuk melihat bagaimana ini bekerja.

  • Reorganisasi kode biasanya berarti banyak perubahan dalam spasi putih (spasi, tab, baris baru) tapi tidak ada perubahan kode aktual. Sebagai contoh, Anda memisahkan baris yang sangat panjang menjadi beberapa baris, atau kadang kala Anda memampatkan beberapa baris bersama menjadi satu baris.

    Such changes are marked with a white circle symbol on the left side of the views. If you see such a white circle, you know immediately that no real code change is there and you don't have to check the changed block further.

  • Hand editing of the file in the right pane is possible in two-pane view. Such changes are marked with a pencil symbol.

Jika Anda ingin membandingkan/menggabung tiga file, TortoiseMerge akan memperlihatkan kepada Anda perbedaan dalam tampilan tiga pane. Tampilan ini juga digunakan jika Anda perlu untuk menyelesaikan file berkonflik.

Gambar 3.3. Tampilan Tiga Pane

Tampilan Tiga Pane

The left pane shows you the differences between Their file and the Base file, while the right pane shows you the differences between Mine file and the Base file. The bottom pane shows you the result of merging Base, Mine and Theirs with possible conflicts.

If you hover the mouse over the pane title, a tooltip will show the filenames used for the diff in each pane.

Menerapkan Patch

After TortoiseMerge parses the patch file it will show you a small window with all the files which have changes according to the patch file.

Gambar 3.4. Daftar Berkas Tambalan

Daftar Berkas Tambalan


If the filename is shown in black, then the patch can be applied without any problems. That means the file is not outdated according to the patch. However, if the filename is shown in red, then the patch can't get applied directly because you already changed that file.

But don't worry. If you're working with Subversion you can retrieve an older version of the file and resolve the conflict. In fact, TortoiseMerge automatically tries to get that older version of the file and then shows you the diff between Base (the older version of the file), Mine (the file as it is currently in your working copy) and Theirs (the older version of the file with the patch already applied). Then you can resolve possible conflicts manually.

The patch file window has a context menu which allows you to preview the effect of the patch on the current file (apply without saving), to apply and save the changes for the selected file, or to apply and save changes to all files in the list. The double-click action is to preview.

Tergantung apakah TortoiseMerge bisa menerapkan patch secara langsung atau dengan mengambil versi lama lebih dulu, ia memperlihatkan kepada Anda tampilan dua pane (patch bisa diterapkan secara langsung) atau tampilan tiga pane (versi file lebih lama diambil).