Git Product home page Git Product logo

Comments (9)

AndreyPavlenko avatar AndreyPavlenko commented on August 22, 2024

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.

charleso avatar charleso commented on August 22, 2024

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.

AndreyPavlenko avatar AndreyPavlenko commented on August 22, 2024

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.

charleso avatar charleso commented on August 22, 2024

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.

AndreyPavlenko avatar AndreyPavlenko commented on August 22, 2024

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.

charleso avatar charleso commented on August 22, 2024

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.

AndreyPavlenko avatar AndreyPavlenko commented on August 22, 2024

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.

charleso avatar charleso commented on August 22, 2024

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.

AndreyPavlenko avatar AndreyPavlenko commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.