Comments (9)
And another issue:
gitcc update "Initial commit"
cleartool update .
Copying /cygdrive/c/home/tmp/tmp_proj/build.properties
Copying /cygdrive/c/home/tmp/tmp_proj/build.xml
Copying /cygdrive/c/home/tmp/tmp_proj/Schema.config
Traceback (most recent call last):
File "/cygdrive/c/home/tmp/git-cc/gitcc", line 48, in
main()
File "/cygdrive/c/home/tmp/git-cc/gitcc", line 14, in main
return invoke(cmd, args)
File "/cygdrive/c/home/tmp/git-cc/gitcc", line 38, in invoke
cmd.main(*args)
File "/cygdrive/c/home/tmp/git-cc/update.py", line 8, in main
sync.main()
File "/cygdrive/c/home/tmp/git-cc/sync.py", line 26, in main
copy(join(reldir, file))
File "/cygdrive/c/home/tmp/git-cc/sync.py", line 32, in copy
shutil.copy(join(CC_DIR, file), newFile)
File "/usr/lib/python2.6/shutil.py", line 88, in copy
copyfile(src, dst)
File "/usr/lib/python2.6/shutil.py", line 52, in copyfile
fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory: 'C:/home/tmp/view/sandbox/tmp_proj/Schema.config'
The file Schema.config is located in the tmp_proj/src directory, but not in the tmp_proj.
from git-cc.
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
from git-cc.
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
git ls-files --modified
git log -n 1 --pretty=format:%ai master_cc
cleartool ls -recurse -short .
cleartool lsh -fmt %o%m|%Nd|%u|%En|%Vn|%Nc\n -recurse .
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.
from git-cc.
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
from git-cc.
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.
from git-cc.
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]
branches=main|fp01_7.0_rus
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.
from git-cc.
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.
from git-cc.
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
from git-cc.
Hi Charles,
I've sent you the pull request.
Yes, gitcc rebase works fine after applying this patch. Thank you for your help.
from git-cc.
Related Issues (20)
- would git-cc work properly when cleartool diff is reconfigured? HOT 1
- Unable to initialize gitcc HOT 3
- Changing a symlink into a file in git causes ClearCase checkin to fail HOT 1
- Can I use the program on Linux redhat? HOT 2
- Does the program "git-cc" support python 3.5 HOT 1
- gitcc label erroring out HOT 25
- git-cc fails in subprocess.py HOT 7
- Unable to understand workflow. Where to use git init and where to use gitcc init? HOT 2
- zest.releaser upgrade? HOT 2
- Applying clearcase labels to git commits? HOT 15
- Capturing deleted file history? HOT 6
- git cc rebase - nothing happens HOT 5
- Error during gitcc rebase HOT 1
- Does git-cc support Git to CC HOT 2
- clearcase
- DEBUG in common.py dealt as str after loaded from config file HOT 1
- Only master Branch is creating while migrating but unable to create other branches HOT 1
- Only CC main branch code is migrated for all the branches. HOT 4
- Documentation questions HOT 6
- Version History not reflecting on Git platform HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-cc.