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

getting error #23

Open
hemna opened this issue Sep 7, 2011 · 20 comments
Open

getting error #23

hemna opened this issue Sep 7, 2011 · 20 comments

Comments

@hemna
Copy link

hemna commented Sep 7, 2011

svn2git https://hemna@phphtmllib.svn.sourceforge.net/svnroot/phphtmllib --authors ../authors-transform.txt
error: pathspec 'master' did not match any file(s) known to git.

it creates a .git dir in my current working directory, but that's it.

@nguillaumin
Copy link

I had the same issue and it seems to be due to an author in the SVN repository not being mapped in the authors file. If you run with --verbose you'll probably get a message like Author: johndoe not defined in authors.txt file.

Ensure every author is correctly mapped and you should be fine.

@nirvdrum
Copy link
Owner

This error message should probably bubble up even if not using verbose mode. I'll see what can be done.

@rahul286
Copy link

I am facing same issue. Any solution?

@nirvdrum
Copy link
Owner

There's no "solution" -- that's just how git-svn works. If you provide an authors file, every committer must be mapped without exception. All I can really do is provide a more helpful error message.

@rahul286
Copy link

I have all authors mapped properly. I didn't get Author related error as well.
See log...

Running command: git svn init --prefix=svn/ --no-metadata --no-minimize-url --trunk=trunk --tags=tags --branches=branches http://svn.rtcamp.com/projects/
Initialized empty Git repository in /Users/rahul286/mv2git/tmp4/.git/
Running command: git config svn.authorsfile /Users/rahul286/mv2git/projects/auth.txt
Running command: git svn fetch 
Running command: git branch -l --no-color
Running command: git branch -r --no-color
Running command: git checkout -f master
error: pathspec 'master' did not match any file(s) known to git.
Running command: git gc
Nothing new to pack.

@rahul286
Copy link

Same issue with public SVN repo also...

Running command: git svn init --prefix=svn/ --no-metadata --no-minimize-url --trunk=trunk --tags=tags --branches=branches http://themes.svn.wordpress.org/rtpanel/
Initialized empty Git repository in /Users/rahul286/mv2git/projects/t2/.git/
Running command: git config svn.authorsfile /Users/rahul286/mv2git/projects/auth.txt
Running command: git svn fetch 
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: '/!svn/bc/100/rtpanel' path not found
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
Checked through r17300
Running command: git branch -l --no-color
Running command: git branch -r --no-color
Running command: git checkout -f master
error: pathspec 'master' did not match any file(s) known to git.
Running command: git gc
Nothing new to pack.

@basejump
Copy link

basejump commented Dec 2, 2011

I'm getting the same issue. what was the solution?

@rahul286
Copy link

rahul286 commented Dec 9, 2011

Sorry, not able to remember how I fixed it. I guess I abandoned the move halfway.

@basejump
Copy link

basejump commented Dec 9, 2011

if anyone else runs into this, I had 2 things wrong. 1 was a bad URL then I fixed the URL but the .gir dir seemed to stay corrupt. I deleted the .git and started fresh and it worked

@mitizhi
Copy link

mitizhi commented Aug 28, 2012

I am using plain git svn without wrapping by svn2git and getting the same error. I found this: http://stackoverflow.com/questions/1493052/git-svn-anonymous-checkout-fails-with-s and this: http://subversion.tigris.org/issues/show_bug.cgi?id=3242 -- the explanation seems to be missing read access to a super directory (true for me: all the directories in the svn URLs not accessible to me here).

@ain
Copy link

ain commented May 7, 2013

I tried using the --no-minimize-url to avoid upper hierarchies, but without luck. Definitely a blocker issue:

Running command: git config --local svn.authorsfile /home/at/temp/authors.txt
error: unknown option `local'

@ghost ghost assigned FeeJai May 7, 2013
@FeeJai
Copy link
Collaborator

FeeJai commented May 7, 2013

I think this is a problem with git-svn, not svn2git. Please report your problem there.

@ain
Copy link

ain commented May 7, 2013

Yeah, the topic is a bit wrong, but it's an issue with git-config still, --local option is not there on Debian Squeeze.

@biophonc
Copy link

I had the same problem, but mine was related to a non-standard svn layout. And as @basejump mentioned, make sure to delete the .git/ folder, before you try out a new argument. This solved it for me.

@SonnyCrockett
Copy link

i am seeing a workaround to this problem by explicitly setting the authors path in my command, like so:

--authors ~/.svn2git/authors/authors.txt

i know this defeats the purpose of just throwing that txt file in that dir and calling it day, not having to define it in your command, but at least it works.

onto the question:
svn2git docs say you can throw an authors.txt file in ./svn2git/authors/ instead of defining an authors file in your command every time you migrate a new svn repo.

so why is it that if i rely on svn2git to peek inside that directory it has trouble defining an author; yet if i explicitly define where the author path is in the command then it proceeds without fail? it's the same file in the same location. it only fails if svn2git is allowed to find the file on its own.

also, the docs aren't clear about whether you have to create that .svn2git/ directory or if it is supposed to be created when you install svn2git. i had to create it as it wasn't there after i installed it.

@nk9
Copy link

nk9 commented Jun 11, 2014

@SonnyCrockett The svn2git documentation is a bit unclear on this point, but it looks like you need to copy your authors.txt file into a FILE named ~/.svn2git/authors. No period, no extension, not a directory, just "authors". Bit of a strange choice there, but the utility properly finds my authors file when it's placed there with nothing passed on the command line.

@ain
Copy link

ain commented Jun 11, 2014

@SonnyCrockett @nk9 I've actually wrapped this functionality into subgeezer so that it actually prompts you on each SVN username for forename, surname and email. Check it out.

@SonnyCrockett
Copy link

nice!
thanks guys

@nk9
Copy link

nk9 commented Jun 12, 2014

I feel a bit embarrassed about this, but the best that can come from making a stupid mistake is that the next person can learn from it. So here goes:

I got this same "pathspec 'master'" error and tried removing the .git folder. Didn't help. Here was my command:

$ svn2git https://server.com/path-to --no-minimize-url --verbose --revision 45000
Running command: git svn init --prefix=svn/ --no-metadata --no-minimize-url --trunk=trunk --tags=tags --branches=branches https://server.com/path-to
Running command: git config --local --get user.name
Running command: git config --local svn.authorsfile ~/.svn2git/authors
Running command: git svn fetch -r 45000:HEAD 
Running command: git branch -l --no-color
Running command: git branch -r --no-color
Running command: git config --local --get user.name
Running command: git config --local --get user.email
Running command: git checkout -f master
error: pathspec 'master' did not match any file(s) known to git.
command failed:
git checkout -f master

My repository has the standard structure with trunk, tags and branches. But what I was missing was the correct URL! My repo didn't live at /path-to, it lived at /path-to/myrepo. As soon as I gave the correct URL, everything started working.

Debugging tip: I figured this out by trying to only download trunk using this command, which resulted in the much more helpful error below:

$ svn2git https://server.com/path-to/trunk --rootistrunk --no-minimize-url --verbose --revision 45000
Running command: git svn init --prefix=svn/ --no-metadata --no-minimize-url --trunk= https://server.com/path-to/trunk
Initialized empty Git repository in /Users/nk9/migration.git/.git/
E: 'https://server.com/path-to/trunk' is not a complete URL  and a separate URL is not specified

The moral of the story is: double-check your URL!

@nirvdrum
Copy link
Owner

@SonnyCrockett @nk9 Documentation problems certainly should be filed as an issue and pull requests are always welcomed. Since the proper use of the authors stuff has nothing to do with the pathspec problem this issue is about, please consider opening a new issue to track discussion in.

@FeeJai FeeJai removed their assignment Oct 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests