## Purpose
`banksync` is a command line tool that simplifies the use of git commands across a "bank" or "collection" of repositories. It enables synchronization of historical configurations throughout the bank of repos.
## Installation
You can install `banksync` from PyPi with a simple:
pip install banksync
## Quick Start
A bank is a collection of repos defined in a *syncfile*. The syncfile typically resides in a *syncrepo*. In this example, we'll use a project called `animals` containing two repos: `repoFish` and `repoBirds`. The project can be placed anywhere, but for simplicity, we'll put it in the user's root directory.
To quickly clone and populate the example collection of repos, use the following commands:
cd ~
bank clone https://github.com/testbank/animalsRepoSync.git animals
This will git clone the thin syncrepo, which contains the syncfile, and then populate all constituent repos. The resulting structure will be:
animals
├── repoBird
│ └── Bird.txt
├── repoFish
│ └── Fish.txt
└── syncrepo
├── bankconfig.ini
└── syncfile.json
Let's walk quickly through what is happening
### Step-by-step Walkthrough
Let's break down the quick start process into steps.
1. Create a directory `animals`:
```
cd ~
sudo rm -r animals
mkdir animals
cd animals
```
2. Clone the demonstration syncrepo for the animals project using standard git:
```
git clone https://github.com/testbank/animalsRepoSync.git
```
This clones the thin repo, which records the syncfile over time. It tracks the state of the repos in the bank at different times or stages. The resulting hierarchy is:
```
animals
└── animalsRepoSync
├── bankconfig.ini
└── syncfile.json
```
3. Populate the repositories in the bank:
```
cd animalsRepoSync
bank populate
```
The `populate` command clones each of the repos specified in the syncfile, resulting in the following layout:
```
animals
├── animalsRepoSync
│ ├── bankconfig.ini
│ └── syncfile.json
├── repoBird
│ └── Bird.txt
└── repoFish
└── Fish.txt
```
### issuing commands
We can now issue commands across the repos in the bank. From the syncrepo we can execute:
cd ~/animals/animalsRepoSync
bank git status
Which will execute the status command in each of the repos in the bank. If we want to checkout a previous state across the repos in the project we can do this via (from the syncrepo):
git checkout master~2
bank sync
The last two commands just moved the syncrepo two revisions back, and then synchronized the repos in the bank to the sync file at this earlier time. To get all repos back to the master branch revisions you can simply execute:
bank gitall checkout master
Which will do a `git checkout master` on all the repos in the bank including the sync repo.
## Syncfile
The syncfile specifies which repositories are part of the bank, and what state the repositories should be synchronized to. A typical simple sync file might be the following
more ~/animals/animalsRepoSync/syncfile.json
Which yields:
```
{
"repoFish" : {
"path" : "repoFish",
"sha" : "a27368bec17373938b1dcf73638945b89b60a9d0",
"UnixTimeStamp" : "1480517200",
"date" : "30 Nov 2016 - 15:46:40",
"author" : "Jason Harris",
"revisionNumber" : "3",
"message" : "committing salmon",
"cloneURL" : "https://github.com/testbank/repoFish.git"
},
"repoBird" : {
"path" : "repoBird",
"sha" : "6bf9d646b2aa224b64fb86cbddb4d7ab0f2e37d3",
"UnixTimeStamp" : "1480517200",
"date" : "30 Nov 2016 - 15:46:40",
"author" : "Jason Harris",
"revisionNumber" : "3",
"message" : "committing eagle",
"cloneURL" : "https://github.com/testbank/repoBird.git"
}
}
```
The syncfile should lie inside a git repo (the syncrepo). Whenever we want to record a configuration of the repos we simply alter the syncfile by transcribing the current state of the repos into the syncfile using `bank record_repos` with the appropriate options. We then use `git commit` to record this new state / configuration in the syncrepo.
So let us add some content to repoBird in our example and then commit this change.
cd ~/animals/repoBird
echo "toucan" >> Bird.txt
git commit -am "committing toucan"
So now we can update the syncfile with the state of the current repos in the bank:
cd ~/animals/animalsRepoSync/
bank record_repos
The contents of our syncfile will now be something like:
```
{
"repoFish" : {
"path" : "repoFish",
"sha" : "a27368bec17373938b1dcf73638945b89b60a9d0",
"UnixTimeStamp" : "1480517200",
"date" : "30 Nov 2016 - 15:46:40",
"author" : "Jason Harris",
"revisionNumber" : "3",
"message" : "committing salmon",
"cloneURL" : "https://github.com/testbank/repoFish.git"
},
"repoBird" : {
"path" : "repoBird",
"sha" : "c8fb05947c5161e484104d99f427ec082fb4e85b",
"UnixTimeStamp" : "1480519159",
"date" : "30 Nov 2016 - 16:19:19",
"author" : "Jason Harris",
"revisionNumber" : "4",
"message" : "committing toucan",
"cloneURL" : "https://github.com/testbank/repoBird.git"
}
}
```
(Note the sha, timestamps, and other data about the state of the repo `repoBird` has changed.)
So we could now record this new overall state of the repos in the bank via simply committing the file syncfile in the syncrepo.
git commit -am "recording the latest state of the repos in animals."
## Locations
How does the bank command know where to put the `repoBird` and `repoFish`? How does it know which syncfile to use, etc. Well in the syncrepo there is the file `bankconfig.ini`. This is a standard preferences file but in this example it has two important options: `cwd=..` and `syncfile=syncfile.json`.
The cwd (ChangeWorkingDirectory) option specifies that the repo commands should be executed one level up from our current working directory. So since we are currently at `~/animals/animalsRepoSync` that means that the repos paths will start from `~/animals/`
The second option just tells us what the name of the syncfile is. We could have called it `earthanimals.json` if we wanted to.
## Bank command line options
The command line tool `bank` has several options which can be specified:
#### --syncfile <path>
The `syncfile` option specifies a syncfile. The syncfile contents specify which repos are part of the bank. The various keys which are recorded if present are:`path`, `sha`, `UnixTimeStamp`, `date`, `author`, `revisionNumber`, `message`, and `cloneURL`. Adding other keys at present will not effect or change the behavior of the bank tool so you can add other info as you see fit / want to each of the recorded states in the various repos.
#### --cwd <path>
The cwd option will change the working directory. Using this you can specify the relative path to get to the base of where the path for each of the repos in the bank are. For instance in the layout example of the animals project above, if we are in the directory `animals/animalsSyncRepo` then since the path in the syncfile for "Birds" is just `repoBird` then relative to `animals/animalsSyncRepo` we want the directory `../repoBird`. So we would use the option `--cwd ..`
#### --dryrun
If this option is specified then `banksync` will report what it *would* do but it doesn't actually do anything.
#### --colorize <bool>
You can specify if color is not to be used in output if for instance you want the logs to be parsed in jenkins or other devops tools. (The default is `True`, i.e. colorize the output of the bank command)
#### --verbosity <num>
You can specify how much information banksync reports. This integer should be between 0, 1, 2, 3, or 4. The higher the number the more verbose is the reporting. The default is 2.
#### --matching <type>
When attempting to sync the constituent repos to the versions specified in the syncfile, how do we determine what to set the versions to? We want some loose coupling in that for instance if someone runs filter branch on a project or they do some rebase very early on in the history then the shas will change on all the revisions in the repository. So instead of finding a commit via a sha we will have to fall back to looking for a matching timestamp for the revision. These are generally fairly unique in a project unless a lot of cherrypicking has gone on. If we don't find that exact timestamp then we could fall back to the closest matching revision to that timestamp. In this way at least we have some hope of getting close to the configuration at the time instead of just giving up. Ie we get to the exact configuration if it is available but if not get as close as we can. The value of the option can be:
- **shaOnly**: if we can't find the exact same revision given by the sha in the syncfile than give up.
- **timestamps**: try matching by sha first but if that fails find the first revision with the same unix timestamp. (This is almost always preserved across repo manipulation)
- **closetimestamps**: try matching by sha first, if that fails try matching by timestamp. and if that fails find the revision with the closest timestamp and match to that.
## Config file
Instead of specifying the `--syncfile` and`—cwd` in each command you can create a `bankconfig.ini` file alongside the syncfile. In the `bankconfig.ini` file you can specify the default syncfile and cwd to use if none is specified. Eg we could add the file `animals/animalsSyncRepo/bankconfig.ini` with the following contents:
[general]
cwd=..
syncFile=syncfile.json
Then you could omit the options to the bank command and they would be taken from the bankconfig.ini file so the above example would become:
cd animals/animalsSyncRepo
bank record_repos
git commit -am "recording the latest state of the repos in animals."
You can choose weather to include the `bankconfig.ini` in the syncrepo history or not. (We choose to in this example but other teams may leave this to the individual developers.)
## Commands
The form of a bank command is `bank <cmd> <opts>` where `<cmd>` is one of `sync`, `record_repos`, `create_syncfile`, `bisect`, `populate`, `git` or `gitall`
#### bank sync <opts>
`sync` will update / checkout the revisions specified in the syncfile for each of the repos specified in the bank.
bank sync --syncfile syncfile.json
This would checkout / update the repos given in the syncfile `syncfile.json` to the states given in the syncfile. It each repo it tries to checkout the version first by the given sha, and then it falls back to the given timestamp, and then it falls back to the closest timestamp. (This fallback behavior can be controlled by the `--matching` option.)
bank sync --syncfile syncfile.json --cwd ../other/dir
This would checkout / update the repos given in the syncfile to the states given in the syncfile
(but the path to each repo in the bank will be prefixed by the value of the `--cwd` option `../other/dir`).
#### bank record_repos <opts>
`record_repos` is used to transcribe the current state of the repos into the syncfile. Eg:
bank record_repos --syncfile syncfile.json
This would alter the contents of the syncfile and change the revisions stored in the syncfile.json to match the current revisions of the referenced repositories.
#### bank create_syncfile <opts>
`create_syncfile` is used to generate an initial syncfile. Eg:
bank create_syncfile --syncfile syncfile.json repo1 repo2 ... repoN --cwd some/dir
This would generate or overwrite the syncfile.json to contain sync points for the current states of `repo1`, `repo2`, ... `repoN`
#### bank create_syncrepo <opts>
`create_syncrepo` is used to generate the syncrepo directory, initialize a git repository there, create the syncfile and also create the bankconfig.ini file. Basically it creates all the working parts of a syncrepo. Eg:
bank create_syncrepo repo1 repo2 ... repoN
This would create the directory `syncrepo` and fill it with a `syncfile.json` and a `bankconfig.ini`. The syncfile would contain the latest states of the `repo1`, `repo2`, ... `repoN`.
bank create_syncrepo --syncreponame controlrepo --syncfilename felipe.json repo1 repo2 ... repoN
Would create and initialize a syncrepo called `controlrepo` and inside that a syncfile called `felipe.json`.
#### bank bisect <opts>
You can use `bank bisect` on the syncrepo to step through historic configurations looking for a configuration which produces some change. (Typically we are searching for a regression.) Eg if we have a configuration file in the syncrepo the following might be a typical bisect session:
cd SomeSyncRepo
bank bisect start
bank bisect good 12e4f5
bank bisect bad master
<do build / test>
bank bisect good 78a6b9
<do build / test>
bank bisect bad ae726a
...
Basically we are git bisecting on the syncrepo, and after each bisect step we get a new configuration, then `bank sync` will be run to synchronize the repositories in the bank to their state at the time that iteration of the syncfile was recorded . So `bank bisect <arguments>` is basically equivalent to `git bisect <arguments>; bank sync`
#### Dispatching git commands
We can use `bank` to perform a git command on each repository in the bank. All git commands have the prefix 'git' along with the normal name of the git command. Eg
bank git status --syncfile syncfile.json
Will perform a `git status` operation on each of the repositories in the bank and print the results to stdout.
If you use `gitall` instead of `git` command, then the git command will also be run in the syncrepo.
bank gitall status --syncfile syncfile.json
Will perform a `git status` operation on each of the repositories in the bank and print the results to stdout.
## Testing
To run the test suite you need `py.test` installed on your machine. Then after downloading the source code you can simply execute:
cd banksync_Package
py.test
Raw data
{
"_id": null,
"home_page": "https://github.com/jasonfharris/banksync",
"name": "banksync",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "execute,shell,system,git,submodule",
"author": "Jason Harris",
"author_email": "jason@jasonfharris.com",
"download_url": "https://files.pythonhosted.org/packages/7d/c3/1eb185c71605d28f75efaa331211b6eee162eb5b4c23dc11603ee163ded5/banksync-0.9.10.tar.gz",
"platform": null,
"description": "## Purpose\n\n`banksync` is a command line tool that simplifies the use of git commands across a \"bank\" or \"collection\" of repositories. It enables synchronization of historical configurations throughout the bank of repos.\n\n## Installation\n\nYou can install `banksync` from PyPi with a simple:\n\n\n pip install banksync\n\n## Quick Start\n\nA bank is a collection of repos defined in a *syncfile*. The syncfile typically resides in a *syncrepo*. In this example, we'll use a project called `animals` containing two repos: `repoFish` and `repoBirds`. The project can be placed anywhere, but for simplicity, we'll put it in the user's root directory.\n\nTo quickly clone and populate the example collection of repos, use the following commands:\n\n cd ~\n bank clone https://github.com/testbank/animalsRepoSync.git animals\n\nThis will git clone the thin syncrepo, which contains the syncfile, and then populate all constituent repos. The resulting structure will be:\n\n animals\n \u251c\u2500\u2500 repoBird\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 Bird.txt\n \u251c\u2500\u2500 repoFish\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 Fish.txt\n \u2514\u2500\u2500 syncrepo\n \u251c\u2500\u2500 bankconfig.ini\n \u2514\u2500\u2500 syncfile.json\n\n\nLet's walk quickly through what is happening\n\n### Step-by-step Walkthrough\n\nLet's break down the quick start process into steps.\n\n1. Create a directory `animals`:\n\n ```\n cd ~\n sudo rm -r animals\n mkdir animals\n cd animals\n ```\n\n2. Clone the demonstration syncrepo for the animals project using standard git:\n\n ```\n git clone https://github.com/testbank/animalsRepoSync.git\n ```\n\n This clones the thin repo, which records the syncfile over time. It tracks the state of the repos in the bank at different times or stages. The resulting hierarchy is:\n\n ```\n animals\n \u2514\u2500\u2500 animalsRepoSync\n \u251c\u2500\u2500 bankconfig.ini\n \u2514\u2500\u2500 syncfile.json\n ```\n\n3. Populate the repositories in the bank:\n\n ```\n cd animalsRepoSync\n bank populate\n ```\n\n The `populate` command clones each of the repos specified in the syncfile, resulting in the following layout:\n\n ```\n animals\n \u251c\u2500\u2500 animalsRepoSync\n \u2502 \u251c\u2500\u2500 bankconfig.ini\n \u2502 \u2514\u2500\u2500 syncfile.json\n \u251c\u2500\u2500 repoBird\n \u2502 \u2514\u2500\u2500 Bird.txt\n \u2514\u2500\u2500 repoFish\n \u2514\u2500\u2500 Fish.txt\n ```\n\n### issuing commands\n\nWe can now issue commands across the repos in the bank. From the syncrepo we can execute:\n\n cd ~/animals/animalsRepoSync\n bank git status\n\nWhich will execute the status command in each of the repos in the bank. If we want to checkout a previous state across the repos in the project we can do this via (from the syncrepo):\n\n git checkout master~2\n bank sync\n\nThe last two commands just moved the syncrepo two revisions back, and then synchronized the repos in the bank to the sync file at this earlier time. To get all repos back to the master branch revisions you can simply execute:\n\n bank gitall checkout master\n\nWhich will do a `git checkout master` on all the repos in the bank including the sync repo.\n\n## Syncfile\n\nThe syncfile specifies which repositories are part of the bank, and what state the repositories should be synchronized to. A typical simple sync file might be the following\n\n more ~/animals/animalsRepoSync/syncfile.json\n\nWhich yields:\n\n```\n{\n \"repoFish\" : {\n \"path\" : \"repoFish\",\n \"sha\" : \"a27368bec17373938b1dcf73638945b89b60a9d0\",\n \"UnixTimeStamp\" : \"1480517200\",\n \"date\" : \"30 Nov 2016 - 15:46:40\",\n \"author\" : \"Jason Harris\",\n \"revisionNumber\" : \"3\",\n \"message\" : \"committing salmon\",\n \"cloneURL\" : \"https://github.com/testbank/repoFish.git\"\n },\n \"repoBird\" : {\n \"path\" : \"repoBird\",\n \"sha\" : \"6bf9d646b2aa224b64fb86cbddb4d7ab0f2e37d3\",\n \"UnixTimeStamp\" : \"1480517200\",\n \"date\" : \"30 Nov 2016 - 15:46:40\",\n \"author\" : \"Jason Harris\",\n \"revisionNumber\" : \"3\",\n \"message\" : \"committing eagle\",\n \"cloneURL\" : \"https://github.com/testbank/repoBird.git\"\n }\n}\n```\n\nThe syncfile should lie inside a git repo (the syncrepo). Whenever we want to record a configuration of the repos we simply alter the syncfile by transcribing the current state of the repos into the syncfile using `bank record_repos` with the appropriate options. We then use `git commit` to record this new state / configuration in the syncrepo.\n\nSo let us add some content to repoBird in our example and then commit this change.\n\n cd ~/animals/repoBird\n echo \"toucan\" >> Bird.txt\n git commit -am \"committing toucan\"\n\nSo now we can update the syncfile with the state of the current repos in the bank:\n\n cd ~/animals/animalsRepoSync/\n bank record_repos\n\nThe contents of our syncfile will now be something like:\n\n```\n{\n \"repoFish\" : {\n \"path\" : \"repoFish\",\n \"sha\" : \"a27368bec17373938b1dcf73638945b89b60a9d0\",\n \"UnixTimeStamp\" : \"1480517200\",\n \"date\" : \"30 Nov 2016 - 15:46:40\",\n \"author\" : \"Jason Harris\",\n \"revisionNumber\" : \"3\",\n \"message\" : \"committing salmon\",\n \"cloneURL\" : \"https://github.com/testbank/repoFish.git\"\n },\n \"repoBird\" : {\n \"path\" : \"repoBird\",\n \"sha\" : \"c8fb05947c5161e484104d99f427ec082fb4e85b\",\n \"UnixTimeStamp\" : \"1480519159\",\n \"date\" : \"30 Nov 2016 - 16:19:19\",\n \"author\" : \"Jason Harris\",\n \"revisionNumber\" : \"4\",\n \"message\" : \"committing toucan\",\n \"cloneURL\" : \"https://github.com/testbank/repoBird.git\"\n }\n}\n```\n\n(Note the sha, timestamps, and other data about the state of the repo `repoBird` has changed.)\n\nSo we could now record this new overall state of the repos in the bank via simply committing the file syncfile in the syncrepo.\n\n git commit -am \"recording the latest state of the repos in animals.\"\n\n## Locations\n\nHow does the bank command know where to put the `repoBird` and `repoFish`? How does it know which syncfile to use, etc. Well in the syncrepo there is the file `bankconfig.ini`. This is a standard preferences file but in this example it has two important options: `cwd=..` and `syncfile=syncfile.json`.\n\nThe cwd (ChangeWorkingDirectory) option specifies that the repo commands should be executed one level up from our current working directory. So since we are currently at `~/animals/animalsRepoSync` that means that the repos paths will start from `~/animals/`\n\nThe second option just tells us what the name of the syncfile is. We could have called it `earthanimals.json` if we wanted to.\n\n## Bank command line options\n\nThe command line tool `bank` has several options which can be specified:\n\n#### --syncfile <path>\n\nThe `syncfile` option specifies a syncfile. The syncfile contents specify which repos are part of the bank. The various keys which are recorded if present are:`path`, `sha`, `UnixTimeStamp`, `date`, `author`, `revisionNumber`, `message`, and `cloneURL`. Adding other keys at present will not effect or change the behavior of the bank tool so you can add other info as you see fit / want to each of the recorded states in the various repos.\n\n#### --cwd <path>\n\nThe cwd option will change the working directory. Using this you can specify the relative path to get to the base of where the path for each of the repos in the bank are. For instance in the layout example of the animals project above, if we are in the directory `animals/animalsSyncRepo` then since the path in the syncfile for \"Birds\" is just `repoBird` then relative to `animals/animalsSyncRepo` we want the directory `../repoBird`. So we would use the option `--cwd ..`\n\n#### --dryrun\n\nIf this option is specified then `banksync` will report what it *would* do but it doesn't actually do anything.\n\n#### --colorize <bool>\n\nYou can specify if color is not to be used in output if for instance you want the logs to be parsed in jenkins or other devops tools. (The default is `True`, i.e. colorize the output of the bank command)\n\n#### --verbosity <num>\n\nYou can specify how much information banksync reports. This integer should be between 0, 1, 2, 3, or 4. The higher the number the more verbose is the reporting. The default is 2.\n\n#### --matching <type>\n\nWhen attempting to sync the constituent repos to the versions specified in the syncfile, how do we determine what to set the versions to? We want some loose coupling in that for instance if someone runs filter branch on a project or they do some rebase very early on in the history then the shas will change on all the revisions in the repository. So instead of finding a commit via a sha we will have to fall back to looking for a matching timestamp for the revision. These are generally fairly unique in a project unless a lot of cherrypicking has gone on. If we don't find that exact timestamp then we could fall back to the closest matching revision to that timestamp. In this way at least we have some hope of getting close to the configuration at the time instead of just giving up. Ie we get to the exact configuration if it is available but if not get as close as we can. The value of the option can be:\n\n- **shaOnly**: if we can't find the exact same revision given by the sha in the syncfile than give up.\n- **timestamps**: try matching by sha first but if that fails find the first revision with the same unix timestamp. (This is almost always preserved across repo manipulation)\n- **closetimestamps**: try matching by sha first, if that fails try matching by timestamp. and if that fails find the revision with the closest timestamp and match to that.\n\n## Config file\n\nInstead of specifying the `--syncfile` and`\u2014cwd` in each command you can create a `bankconfig.ini` file alongside the syncfile. In the `bankconfig.ini` file you can specify the default syncfile and cwd to use if none is specified. Eg we could add the file `animals/animalsSyncRepo/bankconfig.ini` with the following contents:\n\n [general]\n cwd=..\n syncFile=syncfile.json\n\nThen you could omit the options to the bank command and they would be taken from the bankconfig.ini file so the above example would become:\n\n cd animals/animalsSyncRepo\n bank record_repos\n git commit -am \"recording the latest state of the repos in animals.\"\n\nYou can choose weather to include the `bankconfig.ini` in the syncrepo history or not. (We choose to in this example but other teams may leave this to the individual developers.)\n\n## Commands\n\nThe form of a bank command is `bank <cmd> <opts>` where `<cmd>` is one of `sync`, `record_repos`, `create_syncfile`, `bisect`, `populate`, `git` or `gitall` \n\n#### bank sync <opts>\n\n`sync` will update / checkout the revisions specified in the syncfile for each of the repos specified in the bank.\n\n bank sync --syncfile syncfile.json\n\nThis would checkout / update the repos given in the syncfile `syncfile.json` to the states given in the syncfile. It each repo it tries to checkout the version first by the given sha, and then it falls back to the given timestamp, and then it falls back to the closest timestamp. (This fallback behavior can be controlled by the `--matching` option.)\n\n bank sync --syncfile syncfile.json --cwd ../other/dir\n\nThis would checkout / update the repos given in the syncfile to the states given in the syncfile\n(but the path to each repo in the bank will be prefixed by the value of the `--cwd` option `../other/dir`).\n\n#### bank record_repos <opts>\n\n`record_repos` is used to transcribe the current state of the repos into the syncfile. Eg:\n\n bank record_repos --syncfile syncfile.json\n\nThis would alter the contents of the syncfile and change the revisions stored in the syncfile.json to match the current revisions of the referenced repositories.\n\n#### bank create_syncfile <opts>\n\n`create_syncfile` is used to generate an initial syncfile. Eg:\n\n bank create_syncfile --syncfile syncfile.json repo1 repo2 ... repoN --cwd some/dir\n\nThis would generate or overwrite the syncfile.json to contain sync points for the current states of `repo1`, `repo2`, ... `repoN`\n\n#### bank create_syncrepo <opts>\n\n`create_syncrepo` is used to generate the syncrepo directory, initialize a git repository there, create the syncfile and also create the bankconfig.ini file. Basically it creates all the working parts of a syncrepo. Eg:\n\n bank create_syncrepo repo1 repo2 ... repoN\n\nThis would create the directory `syncrepo` and fill it with a `syncfile.json` and a `bankconfig.ini`. The syncfile would contain the latest states of the `repo1`, `repo2`, ... `repoN`. \n\n bank create_syncrepo --syncreponame controlrepo --syncfilename felipe.json repo1 repo2 ... repoN\n\nWould create and initialize a syncrepo called `controlrepo` and inside that a syncfile called `felipe.json`.\n\n#### bank bisect <opts>\n\nYou can use `bank bisect` on the syncrepo to step through historic configurations looking for a configuration which produces some change. (Typically we are searching for a regression.) Eg if we have a configuration file in the syncrepo the following might be a typical bisect session:\n\n cd SomeSyncRepo\n bank bisect start\n bank bisect good 12e4f5\n bank bisect bad master\n <do build / test>\n bank bisect good 78a6b9\n <do build / test>\n bank bisect bad ae726a\n ...\n\nBasically we are git bisecting on the syncrepo, and after each bisect step we get a new configuration, then `bank sync` will be run to synchronize the repositories in the bank to their state at the time that iteration of the syncfile was recorded . So `bank bisect <arguments>` is basically equivalent to `git bisect <arguments>; bank sync`\n\n#### Dispatching git commands\n\nWe can use `bank` to perform a git command on each repository in the bank. All git commands have the prefix 'git' along with the normal name of the git command. Eg\n\n bank git status --syncfile syncfile.json\n\nWill perform a `git status` operation on each of the repositories in the bank and print the results to stdout.\n\nIf you use `gitall` instead of `git` command, then the git command will also be run in the syncrepo.\n\n bank gitall status --syncfile syncfile.json\n\nWill perform a `git status` operation on each of the repositories in the bank and print the results to stdout.\n\n## Testing\n\nTo run the test suite you need `py.test` installed on your machine. Then after downloading the source code you can simply execute:\n\n cd banksync_Package\n py.test\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A library for manipulating banks of git repositories",
"version": "0.9.10",
"project_urls": {
"Download": "https://github.com/jasonfharris/banksync/tarball/0.9.10",
"Homepage": "https://github.com/jasonfharris/banksync"
},
"split_keywords": [
"execute",
"shell",
"system",
"git",
"submodule"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5facad4e7e17e1a748a2d866b5670db2dde740722da7128f3ea65ff3fa6af643",
"md5": "c198cb65262af8dbc5a7beb0ae40b9d9",
"sha256": "899131f7342d41fa01a9f73d53318783ddcd0ca8f87ca6274ade73b183745ca7"
},
"downloads": -1,
"filename": "banksync-0.9.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c198cb65262af8dbc5a7beb0ae40b9d9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 21157,
"upload_time": "2023-05-07T19:36:00",
"upload_time_iso_8601": "2023-05-07T19:36:00.982340Z",
"url": "https://files.pythonhosted.org/packages/5f/ac/ad4e7e17e1a748a2d866b5670db2dde740722da7128f3ea65ff3fa6af643/banksync-0.9.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7dc31eb185c71605d28f75efaa331211b6eee162eb5b4c23dc11603ee163ded5",
"md5": "338a1403b4448ea77660d1e19f16c15c",
"sha256": "67dc9b050e11d0035a2fac7c0537d449c6f70ab3692f8dbc61e41d097f4f2ed7"
},
"downloads": -1,
"filename": "banksync-0.9.10.tar.gz",
"has_sig": false,
"md5_digest": "338a1403b4448ea77660d1e19f16c15c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 24705,
"upload_time": "2023-05-07T19:36:05",
"upload_time_iso_8601": "2023-05-07T19:36:05.591216Z",
"url": "https://files.pythonhosted.org/packages/7d/c3/1eb185c71605d28f75efaa331211b6eee162eb5b4c23dc11603ee163ded5/banksync-0.9.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-07 19:36:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jasonfharris",
"github_project": "banksync",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "banksync"
}