Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

Commit

Permalink
Add howto for moving issues and PRs, to README
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Johanna England <johanna.england@sikt.no>
  • Loading branch information
hmpf and johannaengland authored Dec 3, 2024
1 parent fa7254d commit fbd88b3
Showing 1 changed file with 91 additions and 5 deletions.
96 changes: 91 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,103 @@ See `argus-server`_ for more about argus.
Imports `django-htmx`_. See the `documentation for django-htmx`_
for details.

.. attention::
Moving to argus-server repo
---------------------------
This repo is in the process of being merged into the repo at `argus-server`_.

This repo is in the process of being merged into the repo at `argus-server`_.
New issues and PRs should be opened against that repo, not this one.
Existing PRs will be merged here, then moved. Existing open issues will
also be moved (eventually).

Moving issues
~~~~~~~~~~~~~

Github seems to be able to handle this just fine.

Moving PRs
~~~~~~~~~~

Procedure for existing PRs:

The code tree has been changed from ``src/argus_htmx`` to ``src/argus/htmx``
so branches should be updated accordingly. Try ``git mv`` or ``git rebase``.

If you want to move the PR to the argus-server repo you first need to move the
branch, then start a new PR with the same name at argus-server, then link back
to any discussion in this repo from the new PR. Now you can close the PR in
this repo.

First, setup the remote.

1. Add `argus-server`_ as a remote::

git remote add argus git@github.com:Uninett/Argus.git

2. Fetch the branches on argus::

git fetch argus

3. Checkout master::

git switch master

Second, prep the branch.

Make sure the files are in the right tree, ``src/argus/htmx``. ``src/argus``
*in this repo* has no ``__init__.py``, this is to avoid conflicts. Do not add
one. Do ``git mv src/argus_htmx src/argus/htmx`` or ``git rebase main
mybranch`` or use a graphical client to cherrypick one by one onto main. It is
enough to just move the files. Correcting import paths and file include paths
can be done *after* the move, in the new repo, with a new commit.

This way, you can deal with file renaming conflicts once, and content change
conflicts once.

Now you're ready for the move.

1. Make a temporary branch name for the branch you want to move, at its head::

git switch mybranch
git switch -c fvgyhj

2. If it's only a single commit you can cherrypick it. Move the real name to
the master then cherry-pick::

git branch -f mybranch master
git switch mybranch
git cherry-pick fvgyhj

If not, a rebase can do it for you. If you didn't do step 1 correctly there
will be more conflicts than necessary!

How to rebase (assumes ``mybranch`` is rebased on ``main``)::

git rebase --onto master main mybranch

You can now remove the temporary branch::

git branch -d fvgyhj

3. Push the branch to the new remote::

git switch mybranch
git push argus

4. Make the PR in argus-server and pull the branch in your local copy of that
repo.

5. Do any internal changes to the actual code in the new repo if you didn't do
that as a part of the branch prep.

Done!

New issues and PR's should be opened agains that repo, not this one.
Existing PR's will be merged here, then moved. Existing open issues will
also be moved (eventually).

How to play
===========

See the docs of argus-server. The rest of this README is deprecated but kept
here until everything has been moved.

Install
-------

Expand Down

0 comments on commit fbd88b3

Please sign in to comment.