Poglavlje 3. Korištenje TortoiseMergea

Sadržaj

Viewing Modes
Pregled / Stapanje
Primjena zakrpi
Gumbi i ostale kontrole
Line Status Icons
Stapanje / Uređivanje sukoba
Otvaranje datoteka
Pregled / Stapanje
Primjena zakrpi
Postavke
Osnovne postavke
Postavke boja

Viewing Modes

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.

Pregled / Stapanje

Slika 3.1. Pogled na razlike u jednom prozoru

Pogled na razlike u jednom prozoru

Slika 3.2. Pogled na razlike u dva prozora

Pogled na razlike u dva prozora

Dvostrani pogled ima neke mogućnosti koje nisu dostupne u jednostrukom pogledu:

  • Promjene unutar mijenjanih linija se prikazuju u različitim bojama. Dodani tekst je prikazan svijetlijom bojom, a sami možete izabrati boje. Obrisani dijelovi se prikazuju tamno smeđom okomitom crtom u tekstu. U slici iznad možete vidjeti primjer.

  • Reorganizacija izvornog koda podrazumijeva puno promijena u prazninama (razmaci, nove linije i dr.) ali bez pravih promjena koda. Na primjer, prelomite jako dugu liniju u nekoliko redaka, ili ponekad spojite nekoliko redaka u jedan.

    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.

Ako želite usporediti/stopiti tri datoteke, TortoiseMerge će pokazati razlike u trostrukom pogledu. Ovaj način se koristi i ako želite razriješiti sukobljene datoteke.

Slika 3.3. Trostruki pogled

Trostruki pogled

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.

Primjena zakrpi

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.

Slika 3.4. Patch File List

Patch File List


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.

Ovisno o tome da li TortoiseMerge može zakrpati datoteku direktno ili tako da dohvati stariju verziju iste, pokazuje dvostrani (direktna primjena zakrpe) ili trostrani pogled na razlike (dohvaćanje starije verzije datoteke).