-
Notifications
You must be signed in to change notification settings - Fork 9
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
T/73: Improve DX and add new commands #82
Conversation
…hich checks whether changed files could be committed.
… is ready to execute.
…command was called with -h flag.
… and "update" commands.
…rom CLI (if specified).
I didn't change anything in |
Pull Request Test Coverage Report for Build 259
💛 - Coveralls |
One thing that I wanted to add: there is no problem with adding an interactive configuration tool before command execution. There is a huge problem if you want to do it when the command is being executed. If you would like to do that, mgit mustn't use threads. For commands that require some changes at runtime, we need to work on a single thread. Since this PR introduces new commands, I'm rejecting here every idea that require work on mgit's architecture because it's a wrong place to do that. |
Ok, few things have been done:
|
I don't agree with this. We can implement commands differently so to still use multiple threads. You assume that when I call
and so on. In fact, we won't avoid that.
I understand and I'm completely fine with postponing this. But when you comment that mgit can't work this way because it's not that kind of tool you leave the impression that you want it to work in the current way. And these are two different things – the limitations that we have now and what this tool could do. |
I reported a separate ticket about |
At current architecture of mgit it won't work (but I didn't check it) because all shell commands are executed in threads that we don't have access. And one question - if it somehow will work, how would you like to configure 4 repositories at the same time? From technical side it could be done something like that:
|
Btw, I wrote a solution a little similar to your post. :D |
After updating to the latest commit I'm getting this warning:
Note that in CF due to few reasons we have 3-level deep directories, e.g.: |
So this option should be a little smarter. If a directory name starts with |
@ma2ciek, fixed. Could you test it once again? |
Following branches should be merged as well: |
3 months after creating the PR, I totally forgot what |
OK, we can iron this out later on. Let's not worry about this now. I guess we can have two commands. Those who will use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Yes, sorry. I forgot we have another thread for this command. I'll move my feedback there. |
OK, enough talking. This PR has matured during the last couple of months so we can release it now :D We'll be polishing things on |
Other: Compatibility with `[email protected]`. See cksource/mrgit#82.
Internal: Aligned the repository to the changes in `mgit`. See cksource/mrgit#82.
Suggested merge commit message (convention)
Feature: Introduced a set of new commands which should help developers in daily tasks. Closes #73.
New commands:
commit
- allows committing all changes files that are tracked by Git (a shorthand formgit exec 'git commit -a'
)fetch
- allows fetching changes in all cloned repositories (a shorthand formgit exec 'git fetch'
)pull
- allows pulling changes in all cloned repositories and cloning missing ones (it does not check out to specified branch inmgit.json
file)push
- allows pushing changes in all cloned repositories (a shorthand formgit exec 'git push'
)close
- allows mering specified branch into current one and removes the merged branch from the local and remoteCommand
update
was renamed tosync
.Command
save-hashes
was renamed tosave
. It accepts two options:--branch
or--hash
(which is default one). If specified--branch
, name of current branches will be saved inmgit.json
.Removed command
bootstrap
. Usesync
command instead. Sync command will scan the package directories and compare results with packages saved in configuration file. If there is something that is not defined inmgit.json
, it will be printed out.checkout
command now allows checking out the project to specified branch:mgit checkout stable
will check out all repositories to#stable
branch. It can also create a new branch for repositories that contains changes in files tracked by git. Callingmgit checkout -- --branch develop
will create the#develop
branch in these repositories.Improved help screen for mgit and introduced a help screen for specified command, e.g.:
mgit sync --help
.BREAKING CHANGE: Removed the
bootstrap
command.sync
command should be used instead for initializing the repositories.BREAKING CHANGE: Renamed
update
command tosync
.BREAKING CHANGE: Renamed
save-hashes
command tosave
. It supports two parameters:--branch
and--hash
which the second one is set as default.NOTE:
mgit checkout branch
will check out the repository on#branch
.[branch]
argument is optional. If it isn't specified, branch name will be taken frommgit.json
file.Additional information
Following PRs should be merged with this PR: