-
Notifications
You must be signed in to change notification settings - Fork 95
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
rebase.py fails under cygwin #3
Comments
And another issue: gitcc update "Initial commit"
The file Schema.config is located in the tmp_proj/src directory, but not in the tmp_proj. |
Hi Andrey, Well for I'm just going to ignore the second part (for now). While it's unfortunate, you can easily do what 'update' does by copying the files from Clearcase into Git, commit them, and run 'git branch -f master_cc && git tag -f master_ci'. It doesn't do anything complex. Just out of interested there's no symlinks or anything funny in tmp_proj? What does your gitcc config file look like? Maybe put some 'print' statements in sync.py and see what you can see. I don't quite know what the issue is the first exception. I've added some debugging to the code and pushed it to master. Let me know what it prints. Depending on the size of .git/lshistory.bak file is would you mind sending a zip to me so I can take a look? Cheers, Charles |
Hi Charles, Seems I've found the cause of the first issue. In version = version.split(os.sep) you use os.sep which is '/' under Cygwin environment, but it's Windows and the version, provided by cleartool, is separated by ''. Setting os.sep = '' in rebase.py works around this particular issue, but I'm not sure whether everything works fine, since gitcc rebase does not create any files: $ ../git-cc/gitcc rebase
The second issue, I think, is also caused by Windows paths. For example, I have 'tools' directory in my repository, but gitcc update creates 'ools' directory. |
Hi Andrey, Ahh. That would explain it. I always used msysgit which I guess behaves itself in regards to os.sep. It's a bit hard to tell why rebase didn't find anything. Without being too unhelpful you might want to stick a few debugs in filterBranches and see why it's not matching anything. Alternatively if you want to send me a few lines of .git/lshistory.bak with your 'branches' config setting that would be helpful too. Sorry I can't be of more use. Charles |
Charles, I've added debugs and found out that filterBranches does not recognize my branch name in version = '\main\fp01_7.0_rus\1'. The function fnmatch() is called with 'fp01_7.0_rus' and 'main' arguments, thus it always returns false. I've added one more version.pop() and faced with another issue: cleartool get -to /cygdrive/c/home/tmp/tmp_proj/META-INF\MANIFEST.MF META-INF\MANIFEST.MF@@\main\fp01_7.0_rus\1 cleartool can't find the cygwin's path - /cygdrive/c. |
Ahh. So you're trying to import a file on the 'fp01_7.0_rus' branch, but your 'branches' is only set to 'main'? You need to have your gitcc config file with something like: [master] You have to name the tip of the branch - it doesn't match on parents branches. You might want to remove that extra pop() if that's the case. As to your problem, there isn't much we can do if cleartool doesn't understand 'cygdrive'. I'm happy to accept a patch that strips it from cleartool commands if that fixes it. Alternatively you can run gitcc under msysygit, which I know works. |
Hi Charles, Please look at this patch https://gist.github.com/1240430. I've added new function path() which converts cygwin's paths using the cygpath utility. |
Hi Andrey, Sorry for the delay. Been very busy here. The patch looks good. If you send me a pull request I'll happily accept. Are things working now you've made that change? Charles |
Hi Charles, I've sent you the pull request. Yes, gitcc rebase works fine after applying this patch. Thank you for your help. |
python --version
Python 2.6.5
gitcc rebase --dry-run
The text was updated successfully, but these errors were encountered: