Skip to content

document required flags #159

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

Closed
umlaeute opened this issue Mar 13, 2025 · 3 comments · Fixed by #169
Closed

document required flags #159

umlaeute opened this issue Mar 13, 2025 · 3 comments · Fixed by #169
Labels

Comments

@umlaeute
Copy link

umlaeute commented Mar 13, 2025

It's been a while since i used svn-all-fast-export, so I was slightly annoyed, that it doesn't work out-of-the-box as advertised in the help.

The help says:

$ svn-all-fast-export --help
Invoked as:' svn-all-fast-export --help'
Usage: svn-all-fast-export [OPTION] [Path to subversion repo]

Options:
       --identity-map        provide map between svn username and email
       --identity-domain     provide user domain if no map was given
       --revisions-file      provide a file with revision number that should be processed
       --rules               the rules file(s) that determines what goes where
       --msg-filter          External program / script to modify svn log message
[...]

The way I read this, I have to (obviously) provide a Path to subversion repo, and that's about it.

However, when trying to run as such, I get an error:

$ svn-all-fast-export /path/to/svnrepo/
Invoked as:' svn-all-fast-export /path/to/svnrepo/'
svn-all-fast-export failed: please specify the rules using the 'rules' argument

What's this 'rules' argument? the help speaks of options rather than arguments (and options have leading dashes). I guess this is some leftover from a previous invocation style ala svn-all-fast-export /path/to/svnrepo /path/to/rules.
Also, the help mentions "rules file(s)", but it might be nice to provide an example of such a rules file (without having to go and find the samples directory first (esp. when using a distro-packaged version of svn-all-fast-export)

E.g. I would imagine something like this:

$ svn-all-fast-export --help
Invoked as:' svn-all-fast-export --help'
Usage: svn-all-fast-export [OPTION] --rules </path/to/rules/file> </path/to/subversion/repo>

OPTIONS:
       --rules               the rules file(s) that determines what goes where (REQUIRED)

       --identity-map        provide map between svn username and email
       --identity-domain     provide user domain if no map was given
       --revisions-file      provide a file with revision number that should be processed
       --msg-filter          External program / script to modify svn log message
[...]
$

and

$ svn-all-fast-export /path/to/svnrepo/
Invoked as:' svn-all-fast-export /path/to/svnrepo/'
svn-all-fast-export failed: please specify the rules using the '--rules' option.

Example rules file:
~~~
create repository myproject
end repository
match /trunk/
  repository myproject
  branch main
end match
match /branches/([^/]+)/
  repository myproject
  branch \1
end match
match /tags/([^/]+)/
  repository myproject
  branch refs/tags/\1
end match
~~~

$
@hartwork
Copy link
Member

@umlaeute how do you feel about pull request #169 for a fix?

@hartwork hartwork added the bug label Apr 28, 2025
@umlaeute
Copy link
Author

better :-)

i still like the idea though, to provide an example rules-file if one is missing (the rules-file is not exactly something you encounter regularly, and having to search the accompanying examples for is tedious :-))

hartwork added a commit that referenced this issue Apr 29, 2025
…utput-synopsis

Improve synopsis line in usage output (fixes #159)
@hartwork
Copy link
Member

better :-)

@umlaeute cool, thanks for the review!

i still like the idea though, to provide an example rules-file if one is missing (the rules-file is not exactly something you encounter regularly, and having to search the accompanying examples for is tedious :-))

I see pros and cons with this idea and consider it a separate issue. I'll consider it more but tending towards not adding it.

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

Successfully merging a pull request may close this issue.

2 participants