Permission denied during rebase
GuyPaddock opened this issue · 4 comments
Working with a UCM view, I was able to get past other issues with the rebase process by creating a child stream for the GIT synchronization (instead of using the integration stream), and removing "main" from the list of branches I cared about.
It gets all the way past the lsh step and the step where it requests the headlines for each of the activities (sometimes, multiple times, but my guess is that's because my organization re-uses activities). But, it then fails after the initial commit to GIT when it tries to remove some files from the repo:
cleartool diff -diff_format -pred myapp@@/main/myapp_r3_dev_stream/r4_integration/r6_integration/1
git add .gitcc
git commit -m "deliver r6_myapp on 9/1/2011 5:56:13 PM."
git branch -f master_cc
git tag -f master_ci master_cc
Traceback (most recent call last):
File "/cygdrive/c/IBM/RationalSDLC/git-cc/gitcc", line 48, in
main()
File "/cygdrive/c/IBM/RationalSDLC/git-cc/gitcc", line 14, in main
return invoke(cmd, args)
File "/cygdrive/c/IBM/RationalSDLC/git-cc/gitcc", line 38, in invoke
cmd.main(*args)
File "/cygdrive/c/IBM/RationalSDLC/git-cc/rebase.py", line 52, in main
doStash(lambda: doCommit(cs), stash)
File "/cygdrive/c/IBM/RationalSDLC/git-cc/common.py", line 40, in doStash
f()
File "/cygdrive/c/IBM/RationalSDLC/git-cc/rebase.py", line 52, in
doStash(lambda: doCommit(cs), stash)
File "/cygdrive/c/IBM/RationalSDLC/git-cc/rebase.py", line 63, in doCommit
commit(cs)
File "/cygdrive/c/IBM/RationalSDLC/git-cc/rebase.py", line 146, in commit
cs.commit()
File "/cygdrive/c/IBM/RationalSDLC/git-cc/rebase.py", line 183, in commit
file.add(files)
File "/cygdrive/c/IBM/RationalSDLC/git-cc/rebase.py", line 209, in add
self._add(self.file, self.version)
File "/cygdrive/c/IBM/RationalSDLC/git-cc/rebase.py", line 217, in _add
removeFile(toFile)
File "/cygdrive/c/IBM/RationalSDLC/git-cc/common.py", line 139, in removeFile
os.remove(file)
OSError: [Errno 13] Permission denied: 'G:/myapp/ui/pom.xml'
I'd fix it, but I'm not exactly sure what's supposed to happen during this step. It looks like it's core to what the gitcc scripts do that they need to replace files with predecessor versions in order to import them. Doesn't deleting a file in a UCM dynamic view cause it to be deleted immediately in the stream?
Also, doesn't this capability (see link below) make it so you can pull specific versions (even deleted ones) directly? http://stackoverflow.com/questions/7204929/get-specific-version-of-unloaded-file-with-cleartool/7205294#7205294
Hi Guy,
So I might be mistaken but are you running git-cc in the Clearcase directory? That would explain what you're suggesting regarding deleting files in UCM (and yes that's true if you use Clearcase-integrated explorer, but not if you use raw 'rm').
Instead you need to run git-cc in a completely separate directory in your filesystem (ie c:/gitview/myapp). You only need to pass your Clearcase directory to 'git-cc init' as an argument.
To avoid having to wait for lshistory to run again (which can be bloody slow), you can use the 'backup' of the last run by running the following. The '.git/lshistory.bak' file should be in the "G:/myapp" directory - don't lose it. :)
gitcc rebase -load=.git/lshistory.bak
Let me know how you go.
Charles
I figured that out shortly after my post... I suspected it needed to be in a separate folder, but then I kept getting errors the first few times I tried it about not being able to rebase the integration stream. Now that I created a GIT child stream, life is good.
Question, can I still use load even if I change the branch list in the GITCC config?
Hi Guy,
The branch list just filters what's is loaded from lshistory.bak; it doesn't affect the lshistory command that was run. So yes it should be fine.
Charles