Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions documentation/specification.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Specification
=============

The goal of rayr is to have various *sources* (local folders) synchronized with *destinations* - or remotes (public or private repositories hosting servers).
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that the goal is not exactly to synchronize local folders with remotes, but to synchronize repository hosting services together, and local folders would be a hosting service like another.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought of that too, but I had a feeling that local folders, to be considered as "hosting" service, would be harder because we lack the meta data we have on other, online service providers, for example "private/not private", "own repo/fork", etc. I fear that if local is a hosting, then people would assume we have a way to do github->local->bitbucket without losing information which is not the case IMHO. Also, local can have nested structure and not online. But it's debatable.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the only way to not loose metadata would be to do remote (meaning: github / gilab / ...) to remote, which is not advertised here.

I think that if local folders are used as a source or destination (because local clone is always created even for remote to remote scenario), metadata should then be stored to disk in a specified format.

Copy link
Owner

@berenm berenm Oct 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, not to support local folders at all but rather rely on the user creating the corresponding repositories in one of the hosting service and pushing the local repository manually.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, you mean we adverstise github<->gitlab sync ? I can amend doc for this.

When we talk about synchronization, it is a stateless sync, ala rsync or rclone. The tool has no memory of what the previous synchronization did.
However, it will do its best to put both ends at the same state, repository wise.

As such, we can base some of the way to interact with rayr as with rsync or rclone.

Repositories format
-------------------

For now, rayr only deals with git repositories. It should be fairly easy, and desirable, to add mercurial to the list. Other SCMs could be added, provided they have a similar push/pull paradigm and some online servers supports them.

Providers
---------

The following providers will be supported
* Github
* Gitlab
* Bitbucket
* Gogs and Gitea

We possibly could support Rhodecode in the community edition variation.

Configuration format
--------------------

[This is a proposal and not the current way of configuration]
Configuration should done in a format that is human readable, such as json, yaml, or config file format.
Configuration should also be doable with the tool itself, upon invoking ``rayr config``

We should display current remotes and a way to add, modify and delete a remote.

Remotes have short names that allow the user to remember them. In a classic scenario, we can provide reasonable defaults (such as ``github``, ``gitlab`` and so on).

Authentication
--------------

Most providers provide two ways to authenticate. With OAuth or with application password. As **rayr** is open source, it cannot embed its own set of credentials.
Therefore, the user must provide them. Alternatively, we can ask the user to provide an application password for the providers that supports them.

Synchronization
---------------

We can synchronize with the following command:

.. code:: bash

rayr sync <localfolder> <remotename>
rayr sync <remotename> <localfolder>


Options
-------

We should support classic options: log location, verbosity, config file location override.