Pl/FGAddon: Difference between revisions

Jump to navigation Jump to search
Line 367: Line 367:
==== Przenoszenie lub zmiana nazwy plików ====
==== Przenoszenie lub zmiana nazwy plików ====


{{caution|Git-svn does not always maintain the file moving or renaming history normally present in a Subversion repository.}}
{{caution|Git-svn nie zawsze zachowuje historię przenoszenia lub zmiany nazwy plików, która jest zwykle obecna w repozytorium Subversion.}}
 
Problem ten wynika z faktu, że historia SVN jest bardziej solidna niż historia git. Polecenia <code>svn mv</code> i <code>git mv</code> nie są równoważne. Polecenie Subversion przechowuje historię przeniesień bezpośrednio w repozytorium, podczas gdy git tego nie robi (git zamiast tego używa metod heurystycznych, aby spróbować wykryć historię po zatwierdzeniu). Rezultatem używania git-svn jest to, że często przeniesienie nie zostanie wykryte, a historia FGAddon pokaże, że jeden plik lub katalog został usunięty, a inny dodany. Powoduje to również wzrost rozmiaru zaplecza repozytorium, podczas gdy <code>svn mv</code> nie spowoduje znaczącego wzrostu rozmiaru. Jeśli chcesz mieć lepszy zapis historyczny w repozytorium FGAddon i dbać o zaplecze repozytorium, zaleca się tymczasowe przejście na narzędzia Subversion. Po pierwsze, należy zsynchronizować repozytoria:


This problem stems from the fact that svn history is more robust than that of git.  The <code>svn mv</code> and <code>git mv</code> commands are not equivalent.  The subversion command stores the move history directly in the repository whereas git does not (git instead uses heuristic methods to try to detect history, after the commit).  The result of using git-svn is that often the move will not be detected and the FGAddon history will show one file or directory being deleted and another added.  This also causes the repository backend to increase in size, whereas <code>svn mv</code> will not cause any significant size increase.  If you wish to have a better historical record in the FGAddon repository and be considerate to the repository backend, it is recommended that you temporarily switch to the subversion tools.  Firstly, synchronise the repositories:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git svn dcommit
git svn dcommit
</syntaxhighlight>
</syntaxhighlight>


Then in the local svn repository, move or rename the file:
Następnie w lokalnym repozytorium SVN przenieś lub zmień nazwę pliku:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
svn mv Aircraft/<aircraft>/<file_path1> Aircraft/<aircraft>/<file_path2>
svn mv Aircraft/<aircraft>/<file_path1> Aircraft/<aircraft>/<file_path2>
</syntaxhighlight>
</syntaxhighlight>


And commit the change:
I zatwierdzić zmianę:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
svn ci
svn ci
</syntaxhighlight>
</syntaxhighlight>


Back in the local git-svn repository, pull in the changes with:
Z powrotem w lokalnym repozytorium git-svn, pobierz zmiany za pomocą:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git svn rebase
git svn rebase
1,361

edits

Navigation menu