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

File with two paths in the same commit #3

Open
sduenas opened this issue Aug 20, 2012 · 1 comment
Open

File with two paths in the same commit #3

sduenas opened this issue Aug 20, 2012 · 1 comment
Labels

Comments

@sduenas
Copy link
Member

sduenas commented Aug 20, 2012

Analyzing the CVSAnalY repository, I've found a file that has two different paths in the same commit. The action applied to that file was a MOVE. I think this is an error because the path must be stored only once per each file.

I haven't check this behaviour in other repositories.

$ git clone git://github.com/MetricsGrimoire/CVSAnalY.git /tmp/cvsanaly
$ cvsanaly2 -g -u ***** -p ***** -d cvsanaly_test /tmp/cvsanaly
mysql> select * from file_links where file_id = 204  and commit_id <= 453 order by commit_id;
+-----+-----------+---------+-----------+---------------------------------------+
| id  | parent_id | file_id | commit_id | file_path                             |
+-----+-----------+---------+-----------+---------------------------------------+
| 249 |       176 |     204 |        85 | pycvsanaly/FindProgram.py             |
| 250 |       200 |     204 |        85 | pycvsanaly/libcvsanaly/FindProgram.py |
+-----+-----------+---------+-----------+---------------------------------------+

mysql> select * from actions where commit_id = 85 and file_id = 204;
+-----+------+---------+-----------+-----------+
| id  | type | file_id | commit_id | branch_id |
+-----+------+---------+-----------+-----------+
| 453 | V    |     204 |        85 |         2 |
+-----+------+---------+-----------+-----------+
@sduenas
Copy link
Member Author

sduenas commented Sep 14, 2012

It seems that "pycvsanaly/FindProgram.py" was added for the first time in branch 1. The commit where this file has two paths is in commit 85, applied to branch 2. For any reason, FindProgram was not added to this brach but it's deleted. Thus, this file is added twice to file_links but in branch 2.

select * from file_links where file_path = "pycvsanaly/FindProgram.py";
+-----+-----------+---------+-----------+---------------------------+
| id  | parent_id | file_id | commit_id | file_path                 |
+-----+-----------+---------+-----------+---------------------------+
| 198 |        76 |     165 |        49 | pycvsanaly/FindProgram.py |
| 256 |       176 |     204 |        85 | pycvsanaly/FindProgram.py |
| 291 |       176 |     237 |        94 | pycvsanaly/FindProgram.py |
| 442 |        76 |     165 |       213 | pycvsanaly/FindProgram.py |
+-----+-----------+---------+-----------+---------------------------+

mysql> select * from actions where commit_id = 49 and file_id = 165;
+-----+------+---------+-----------+-----------+
| id  | type | file_id | commit_id | branch_id |
+-----+------+---------+-----------+-----------+
| 320 | A    |     165 |        49 |         1 |
+-----+------+---------+-----------+-----------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant