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

The empty file will be lost after "gitcc rebase" #20

Closed
XieDongSheng opened this issue Aug 8, 2012 · 4 comments · Fixed by #48
Closed

The empty file will be lost after "gitcc rebase" #20

XieDongSheng opened this issue Aug 8, 2012 · 4 comments · Fixed by #48

Comments

@XieDongSheng
Copy link

Hi charleso,
I find a issue after i migrate the a vob from clearcase to Git by "git rebase": subfolder and the file in this subfolder will be lost in git repository if the file is a empty one. If a subfolder include both a Non-empty file and empty file, only empty file is lost. I am not sure if it is a bug. When I create a snapview in my local from clearcase, i can see the subfolder and its empty files. So I am a little confused about it. Please help check. Thanks!

Hi charleso,
Sorry, today i check the lost files again, I find the real reason why files lost is not the size of file. It may be caused by there is no "checkinversion|XXXXXXXXX.XXXXXX|\main\1"(and upper) in the history log. Such as the following:

checkinversion|20091117.140842|\main\css_refactor\1
mkbranchversion|20091117.140842|\main\css_refactor\0
mkbranchbranch|20091117.140842|\main\css_refactor
mkelemversion|20091117.140842|\main\0
mkelembranch|20091117.140842|\main
mkelemfile element|20091117.140842|

So Can you help check it? If current script doesn't support this kinds of case?

charleso pushed a commit that referenced this issue Aug 9, 2012
@charleso
Copy link
Owner

charleso commented Aug 9, 2012

Hi Zie Dong,

I can't test this anymore, as I don't have Clearcase available. Thinking about this, I can see why it would happen. I'm running 'cleartool lshistory' which returns a list of:

a. directory changes
b. file changes

For directories I'm only interested in deleted files, as I made the assumption that when files were added they would also be modified.

I've pushed a hack to the 'issue-10' branch. Let me know if that fixes it.

Charles

@XieDongSheng
Copy link
Author

Hi charleso,
Sorry, today i check the lost files again, I find the real reason why files lost is not the size of file. It may be caused by there is no "checkinversion|XXXXXXXXX.XXXXXX|\main\1"(and upper) in the history log. Such as the following:

checkinversion|20091117.140842|\main\css_refactor\1
mkbranchversion|20091117.140842|\main\css_refactor\0
mkbranchbranch|20091117.140842|\main\css_refactor
mkelemversion|20091117.140842|\main\0
mkelembranch|20091117.140842|\main
mkelemfile element|20091117.140842|

So Can you help check it? If current script doesn't support this kinds of case?

@charleso
Copy link
Owner

Hi,

Did you read my previous message? I've pushed a branch with a fix that may work. You need to fetch from GitHub and checkout 'issue-10'.

Charles

@XieDongSheng
Copy link
Author

Thanks charleso, I have closed the issue.

whyrusleeping pushed a commit to whyrusleeping/git-cc that referenced this issue Oct 30, 2012
phts added a commit to SaM-Solutions/git-cc that referenced this issue Apr 23, 2014
phts added a commit to SaM-Solutions/git-cc that referenced this issue May 28, 2014
A possible fix of charleso#20.
The existing fix in "charleso/issue-10" brach is not working.

If there is no "checkinversion" in "lshistory" then check if there is
3 items in the history (mkelemfile, mkelembranch, mkelemversion)
or 5 items (mkelemfile, mkelembranch, mkelemversion, mkbranchbranch, mkbranchversion)
If so then this file is created as an empty one and download it with proper version.
phts added a commit to SaM-Solutions/git-cc that referenced this issue May 28, 2014
Fixes charleso#20.
The existing fix in charleso/git-cc@ccf628db033 is not working.

If there is no "checkinversion" in "lshistory" then check if there is
3 items in the history (mkelemfile, mkelembranch, mkelemversion)
or 5 items (mkelemfile, mkelembranch, mkelemversion, mkbranchbranch, mkbranchversion)
If so then this file is created as an empty one and download it with proper version.
phts added a commit to SaM-Solutions/git-cc that referenced this issue May 28, 2014
Fixes charleso#20.
The existing fix in charleso/git-cc@ccf628db033 is not working.

Solution:
If there is no "checkinversion" in "lshistory" then check if there is
3 items in the history (mkelemfile, mkelembranch, mkelemversion)
or 5 items (mkelemfile, mkelembranch, mkelemversion, mkbranchbranch, mkbranchversion)
If so then this file is created as an empty one and download it with proper version.
phts added a commit to SaM-Solutions/git-cc that referenced this issue May 28, 2014
(for files that had been checked in initially empty to CC)

Fixes charleso#20.
The existing fix in charleso/git-cc@ccf628db033 is not working.

Solution:
If there is no "checkinversion" in "lshistory" then check if there is
3 items in the history (mkelemfile, mkelembranch, mkelemversion)
or 5 items (mkelemfile, mkelembranch, mkelemversion, mkbranchbranch, mkbranchversion)
If so then this file is created as an empty one and download it with proper version.
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

Successfully merging a pull request may close this issue.

2 participants