Skip to content
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

quiet mode would be nice #21

Open
cebe opened this issue Aug 24, 2011 · 7 comments
Open

quiet mode would be nice #21

cebe opened this issue Aug 24, 2011 · 7 comments

Comments

@cebe
Copy link

cebe commented Aug 24, 2011

Hi!

I set up a cronjob and do only want to be notified about errors. Since git prints out normal status like 'Switched to branch...' to stderr and I do not want to throw stderr output away all git commands should be called with the -q option when I want it.
Feature-Request: add a -q option to svn2git that adds that -q option to all git commands.

regards,
cebe

@drewdeponte
Copy link
Collaborator

Hi @cebe.

May I ask why you are using svn2git in a cron job? I am having difficulty envisioning a scenario where it makes sense to use svn2git inside cron.

The general use case for svn2git is that you have an existing SVN repository and you have decided you want to switch to Git but don't want to lose the history that you had in the SVN repository. This is normally a one time process and once it is converted you then switch over to using Git with the git repository that was generated by svn2git.

If this is the scenario you are in then why are you doing it in cron?

If this is NOT the scenario you are in please explain the scenario and I will either try to direct you to a more fitting tool or decide if the feature request is applicable for a valid use case.

Thanks,
@cyphactor

@cebe
Copy link
Author

cebe commented Aug 24, 2011

I just put the command described under "Repository Updates" on https://github.com/nirvdrum/svn2git into a cronjob ;-)

@drewdeponte
Copy link
Collaborator

Ah, so you are mirroring a SVN repository to a read-only Git repository. In that case may I suggest the following modified command in your cron job to make it quiet.

cd <EXISTING_REPO> && svn2git --rebase 2>&1 > /dev/null

The above command should redact stderr (2) to stdout (1) and then redirect stdout (1) to /dev/null.

I will keep this around as a feature request since it is a nice to have. I hope the example I provided above helps you in the meantime.

@cebe
Copy link
Author

cebe commented Aug 24, 2011

thanks for your answer. I got such a workaround myself, but if I got it right, your approach suppresses all stderr output including error messages and that's not what I want. It helps not beeing spammed, but there are no errors.

@drewdeponte
Copy link
Collaborator

True if you want to just suppress stdout and leave stderr then you would just do the following:

cd <EXISTING_REPO> && svn2git --rebase > /dev/null

@rpavlik
Copy link

rpavlik commented Aug 25, 2011

I'm doing a continuous svn to git mirror (a read-only git, that we fork on github) using Jenkins (in place of cron) and the scripts here: https://github.com/rpavlik/jenkins-svn2git

@cebe
Copy link
Author

cebe commented Aug 25, 2011

cool, thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants