Pl/FGAddon: Difference between revisions

Jump to navigation Jump to search
Line 927: Line 927:
Następnie można usunąć tymczasowe repozytorium lokalne.
Następnie można usunąć tymczasowe repozytorium lokalne.


=== Connecting an existing git repository to FGAddon ===
=== Połączenie istniejącego repozytorium git do FGAddon ===


{{Note|Development scenarioYou are an individual developer or team leader with FGAddon commit access and wish to connect a pre-existing remote git repository with FGAddon to send all changes back to FGAddon.}}
{{Note|ScenariuszJesteś indywidualnym programistą lub liderem zespołu z dostępem do zatwierdzania FGAddon i chcesz połączyć istniejące wcześniej zdalne repozytorium git z FGAddon, aby wysłać wszystkie zmiany z powrotem do FGAddon.}}


If a remote git repository containing a developed aircraft already exists, it is possible to connect it to the remote FGAddon repository using the git-svn toolsThe following uses the [[#Dedicated_FGAddon_branch|dedicated FGAddon branch technique]].  Firstly, set up the bridge to FGAddon using git-svn in the per-aircraft repository:
Jeśli istnieje już zdalne repozytorium git zawierające opracowany statek powietrzny, możliwe jest połączenie go ze zdalnym repozytorium FGAddon za pomocą narzędzi git-svn.  Poniższy sposób wykorzystuje technikę [[#Dedykowana_gałąź_FGAddon|dedykowanej gałęzi FGAddon]].  Po pierwsze, należy skonfigurować most do FGAddon za pomocą git-svn w repozytorium per-statku powietrznego:
{{#tag:syntaxhighlight|
{{#tag:syntaxhighlight|
{{fgaddon source|cmd=git svn init|protocol=svn+ssh|login=<username>|type=svn|path=Aircraft/<aircraft>|full=1}}
{{fgaddon source|cmd=git svn init|protocol=svn+ssh|login=<username>|type=svn|path=Aircraft/<aircraft>|full=1}}
Line 937: Line 937:
}}
}}


Where <code><aircraft></code> is the aircraft directory name in FGAddon.  Note that this step can be performed without commit access to FGAddon by using a read-only SVN URL instead, but then changes cannot be pushed back to FGAddon ([[#Synchronising|dcommitting]], as it is known in the git-svn terminology).  However, this allows upstream FGAddon changes to be integrated into the remote git repository, thus making it easy to prepare changes for submission for FGAddon inclusion using patches sent to the mailing list or sent via other channels.
Gdzie <code><aircraft></code> jest nazwą katalogu statku powietrznego w FGAddon.  Należy pamiętać, że ten krok można wykonać bez dostępu do zatwierdzania do FGAddon, używając zamiast tego adresu URL SVN tylko do odczytu, ale wtedy zmiany nie mogą zostać wypchnięte z powrotem do FGAddon ([[#Synchronizacja|dcommitowane]], jak to jest znane w terminologii git-svn).  Pozwala to jednak na zintegrowanie zmian FGAddon ze zdalnym repozytorium git, ułatwiając w ten sposób przygotowanie zmian do przesłania w celu włączenia FGAddon za pomocą łatek wysłanych na listę mailingową lub wysłanych innymi kanałami.


Now fetch the current state from the remote FGAddon repository:
Teraz pobierz bieżący stan ze zdalnego repozytorium FGAddon:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git svn fetch
git svn fetch
</syntaxhighlight>
</syntaxhighlight>


The downloaded SVN history is in the remote branch <code>remotes/git-svn</code>. To commit changes to SVN you need a local branch that tracks this remote branch. Create a local <code>fgaddon</code> branch that you will use to commit updates:
Pobrana historia SVN znajduje się w zdalnej gałęzi <code>remotes/git-svn</code>. Aby zatwierdzić zmiany w SVN, potrzebujesz lokalnej gałęzi, która śledzi tę zdalną gałąź. Utwórz lokalną gałąź <code>fgaddon</code>, której będziesz używać do zatwierdzania aktualizacji:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git branch fgaddon remotes/git-svn
git branch fgaddon remotes/git-svn
</syntaxhighlight>
</syntaxhighlight>


After committing new stuff to the <code>master</code> branch, to push to FGAddon checkout the <code>fgaddon</code> branch and update it from SVN in case someone else has touched the aircraft in the remote FGAddon repository:
Po zatwierdzeniu nowych rzeczy w gałęzi <code>master</code>, aby przekazać je do FGAddon, przełącz się na gałąź <code>fgaddon</code> i zaktualizuj ją z SVN na wypadek, gdyby ktoś inny dokonał zmian statku powietrznego w zdalnym repozytorium FGAddon:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git checkout fgaddon
git checkout fgaddon
Line 955: Line 955:
</syntaxhighlight>
</syntaxhighlight>


Cherry-pick the new commits from <code>master</code> to <code>fgaddon</code> to preserve a linear history:
Wybierz nowe zatwierdzenia z <code>master</code> do <code>fgaddon</code>, aby zachować liniową historię:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git cherry-pick <commit hash 1>
git cherry-pick <commit hash 1>
Line 963: Line 963:
</syntaxhighlight>
</syntaxhighlight>


To see the changes queued for sending to FGAddon as either commits or a diff, type:
Aby zobaczyć zmiany ustawione w kolejce do wysłania do FGAddon jako zatwierdzenia lub diff, wpisz:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git log git-svn..HEAD
git log git-svn..HEAD
Line 969: Line 969:
</syntaxhighlight>
</syntaxhighlight>


If everything looks ok, dcommit the local commits on the <code>fgaddon</code> branch to send them to the remote FGAddon SVN repository:
Jeśli wszystko wygląda w porządku, dcommituj lokalne zatwierdzenia w gałęzi <code>fgaddon</code>, aby wysłać je do zdalnego repozytorium FGAddon SVN:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git svn dcommit
git svn dcommit
</syntaxhighlight>
</syntaxhighlight>


Switch back to the master branch for local development:
Przełącz się z powrotem do gałęzi głównej dla dewelopmentu lokalnego:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git checkout master
git checkout master
</syntaxhighlight>
</syntaxhighlight>


To get changes from upstream you can either just download them with
Aby pobrać zmiany z upstreamu, można po prostu pobrać je za pomocą:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git svn fetch
git svn fetch
</syntaxhighlight>
</syntaxhighlight>


or download them and rebase your <code>fgaddon</code> branch onto them:
lub pobrać je i wyrównać (rebase) Twoją gałąź <code>fgaddon</code> do nich:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git checkout fgaddon
git checkout fgaddon
1,361

edits

Navigation menu