-
Notifications
You must be signed in to change notification settings - Fork 2
Add a specification document #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
slurdge
wants to merge
2
commits into
berenm:master
Choose a base branch
from
slurdge:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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). | ||
| 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. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.