summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-08-17Improve submit tag generationHEADmasterMaciej Wereski1-2/+2
Some projects use version in their name. Unfortunately there may be some differences in branch name and project name on dowload server (e.g. tizen_3.0_common branch and 3.0-common directory). Because of that all dashes needs to be replaced with underscores when generating submit tag. Change-Id: I72be4d8c2f1d41a1ed68902da189900c32cccdfb Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-17Release version 1.0.0Maciej Wereski1-0/+15
Change-Id: If0aaae41a035d5f44c1e2689a1711092fcfbac52 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-17Add READMEMaciej Wereski1-0/+158
Change-Id: Iecc1bdf8ffd6400f26b382b4b8f95e28a848f4ce Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-17Implement pushing SR tagsMaciej Wereski1-3/+50
Push utilizes ssh-agent to authenticate with server, so agent must be running and have appropriate key added. Change-Id: I0a0a0db618f40f84aa51a8137a5fcd1ee99bfc6b Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-17Implement taggingMaciej Wereski3-9/+134
Tags were changed from lighweight to annotated tags, as SR tags must be annotated. User name and e-mail is taken from git config. Also snapsync is generating proper SR tag string if user hasn't given -tag option. Change-Id: If6a5f053c200ec93658545d0c0c68007ef3e5530 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-17Add ssh username settingMaciej Wereski3-1/+25
Change-Id: I054d46a99f841c252387f1cf3a2f88d2674a904f Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-17Implement "Add Remote" jobMaciej Wereski1-1/+36
Change-Id: Ib2867c3e36bf1acd7783aa0fb955a4b9dcfdb54a Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-17Add reporting, editing and ask user about actionsMaciej Wereski3-4/+138
Show report after doing comparison step. Ask user about proceeding. User may also choose option to edit list of repositories to be submitted. Editor setting from configuration file is used or $EDITOR if setting is missing. Only repositories that may be synchronized (new and outdated repositories) are shown in editor. User should only delete unwanted repositories. Change-Id: I17c0b6cc11c8fd2ab6f098c2a8ca4032178a8523 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-17Add support for ignoring blacklisted repositoriesMaciej Wereski5-18/+69
This change allows user to use blacklist file (default provided). Such file is a list of regular expressions that describe git repositories (one per line). Default blacklist file makes snapsync ignore profile repositories. Change-Id: I9c82ae82d7b17a4aeeccb18d1c3379a0a08cb37b Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-17Implement comparison of commitsMaciej Wereski2-2/+60
Compare chronogically in terms of commit parent-child relation between source and target commit. Result is saved in GitRepo.Status. This information will be used to choose which repositories and commits should be synchronized. Change-Id: I08a8c4f26a2644712f72d9062055157349953425 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-17Use configuration fileMaciej Wereski3-16/+212
Snapsync will use ini-style configuration (with use of go-ini package). Settings are divided in two sections: * Repos - all settings for RPM and git repositories - i.e. addresses, profiles * General - other settings (currently git manager settings) Snapsync looks for config file in standard places (/etc/snapsync and ~/.snapsync/). Also user may use -config flag to point to other file. Examplary file is provided. Change-Id: I239aa3925f02b7aec6fe0f1e6887e2179ec3f7c1 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-17Add git job managerMaciej Wereski3-3/+297
gitManager will be used to run tasks on git repositories. It provides few job types: * verify - chronologically compares source and target commits * add remote - adds requested remote to local git repository * tag - applies requested tag on requested commit * push - pushes requested tag to remote All those tasks are run by set number of workers (by default equal to number of available CPUs) in parallel. Communication is done via job and error channels and method to cancel pending jobs is available. Change-Id: I90c315747a4882f9e01f8428cf11d677236297da Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-16Add git repository data structuresMaciej Wereski2-16/+130
These structures describe git repositories available in source/target profiles and how HEADS in those profile relate to each other. Change-Id: I26bb0711c85c997b8c609cfffe219b28c999ac38 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-16Download and parse profile XMLsMaciej Wereski2-0/+297
With every snapshot few XML manifests are published. build.xml provides information about published RPM repositories. Every RPM repository has own XML manifest which contain information about git repositories and respective commits used to build RPM packages. Change-Id: I1cac5134c2551b53ce7595e4ed2dca7fd363d588 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2017-08-16Add Apache 2.0 licenseMaciej Wereski1-0/+203
Change-Id: Ibda4b62adbd06f4fa049b047af0f16abd686d0c1 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2016-01-20Initial empty repositoryseonil kim0-0/+0