Cyber Sinh Posted August 9, 2012 Report Share Posted August 9, 2012 Hi, I'm trying to test plastic SCM by importing a git repository, through fast-import, but I get this error: C:\Users\Cyber Sinh>cm fast-import Echosync "D:\Temporaire\Download\scm\git-repo\Luminescence.Xiph.fastimport" An item with the same key has already been added. reset refs/heads/master commit refs/heads/master mark :1 author xxxxxx <xxx@free.fr> 1217260939 +0000 committer xxxxxx <xxx@free.fr> 1217260939 +0000 data 1 commit refs/heads/master mark :2 author xxxxxx <xxx@free.fr> 1217261026 +0000 committer xxxxxx <xxx@free.fr> 1217261026 +0000 data 15 from :1 Error: An item with the same key has already been added. You will find attached the git repository with the fast-import file. Everything is fine if I import the file with the git or veracity fast-import command. Thanks for your help. Best regards. Cyber Sinh git-repo.zip Link to comment Share on other sites More sharing options...
manu Posted August 10, 2012 Report Share Posted August 10, 2012 Hi Cyber Sihn, let me check with our crazy build master if we can send you a patched release, I have it working: Repository test does not exist. It will be created Luminescence.Xiph\Luminescence.Xiph.fastimport correctly parsed. 65 commits. 149 8 ms 2.0.0.0 2.1.1.0 master 3 branches 0 modified files found refering to an SHA instead of a mark 241 modified files 01,6 Mb in blobs. 147 blobs Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 10, 2012 Author Report Share Posted August 10, 2012 Glad to know that my issue is already fixed... It would be nice if you could send me a patched version tonight. So, I could test plastic this week-end. Thanks. Link to comment Share on other sites More sharing options...
manu Posted August 10, 2012 Report Share Posted August 10, 2012 Sure, it's almost done. I can also send you the database file already imported.... Link to comment Share on other sites More sharing options...
manu Posted August 10, 2012 Report Share Posted August 10, 2012 The release is almost out of the oven but meanwhile here you have your repository in Plastic SCM: Luminescence.zip It's a SqlServerCE database, you need to paste & override the 2 files I'm attaching and restart the Plastic SCM server service. Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 10, 2012 Author Report Share Posted August 10, 2012 A patched version would be great, because I have to import other Git repositories. Link to comment Share on other sites More sharing options...
manu Posted August 10, 2012 Report Share Posted August 10, 2012 It's now available! https://www.plasticscm.com/download/editions.en.aspx Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 10, 2012 Author Report Share Posted August 10, 2012 Hi Manu, The fast-import command doesn't crash with the new release. Thanks! But the result of the command is not optimal for me: 1. Git tags are not converted to plastic label (so, missing labels and useless branches) 2. The root folder has been renamed from "Luminescence.Xiph" to "src" in Git, and plastic didn't take into account the move: 2.1 If I check the changeset history in repository, I only have the last commit (the "git mv" comment) -> all my history is lost ! 2.2 If I checkout the master into workspace, plastic created me two folders: Luminescence.Xiph AND src Do you know why and what can I do? Thank you very much for your help. Best regards. Cyber Sinh Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 13, 2012 Author Report Share Posted August 13, 2012 Anybody to help me? Thanks. Link to comment Share on other sites More sharing options...
manu Posted August 13, 2012 Report Share Posted August 13, 2012 1. Git tags are not converted to plastic label (so, missing labels and useless branches) Can you post us the command line order you use for fast-exporting the git repository? 2.1 If I check the changeset history in repository, I only have the last commit (the "git mv" comment) -> all my history is lost ! Click in the advanced button and remove the time filter, by default only the last months changesets are shown.. 2.2 If I checkout the master into workspace, plastic created me two folders: Luminescence.Xiph AND src At the changeset #38 you have a "Move" operation from Git (at least it's written in the fast-export file) and the same move is in Plastic. Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 13, 2012 Author Report Share Posted August 13, 2012 Can you post us the command line order you use for fast-exporting the git repository? Sure! I used this command: git fast-export --all -C > my_repo.fastimport I sent you the git repo, so you could test yourself. Click in the advanced button and remove the time filter, by default only the last months changesets are shown.. Sorry, I'm a noob. But I expected a filter like "last x commit" and not a date-based filter by default. At the changeset #38 you have a "Move" operation from Git (at least it's written in the fast-export file) and the same move is in Plastic. If plastic knows that it is a renamed folder, why does it create two folders? Try to checkout the repo in a workspace, and you could view my issue. Thanks. Link to comment Share on other sites More sharing options...
manu Posted August 14, 2012 Report Share Posted August 14, 2012 Sure! I used this command: git fast-export --all -C > my_repo.fastimport I sent you the git repo, so you could test yourself. Sure, I'll try to give it a try. Sorry, I'm a noob. But I expected a filter like "last x commit" and not a date-based filter by default. Don't worry, it's a common mistake when you are importing repositories with relatively old changesets. If plastic knows that it is a renamed folder, why does it create two folders? Try to checkout the repo in a workspace, and you could view my issue. Thanks. Actually It's not creating two directories, it's "preserving". Since Plastic can version directories the directories remains empty. You have all your content correctly moved to \src except the "Luminescence.Xiph\XiphTestProject\Test References\Luminescence.Xiph.accessor" item that for some reason remains under "\Luminescence.Xiph". It's as easy as right click in "Luminescence.Xiph" -> Delete -> Commit. Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 14, 2012 Author Report Share Posted August 14, 2012 You have all your content correctly moved to \src except the "Luminescence.Xiph\XiphTestProject\Test References\Luminescence.Xiph.accessor" item that for some reason remains under "\Luminescence.Xiph". It's as easy as right click in "Luminescence.Xiph" -> Delete -> Commit. And for what reason "Luminescence.Xiph\XiphTestProject\Test References\Luminescence.Xiph.accessor" remains under "\Luminescence.Xiph"? Its root folder has been renamed though... I'm waiting for your feedback concerning the label vs branch issue. Thanks for your support. Link to comment Share on other sites More sharing options...
manu Posted August 14, 2012 Report Share Posted August 14, 2012 And for what reason "Luminescence.Xiph\XiphTestProject\Test References\Luminescence.Xiph.accessor" remains under "\Luminescence.Xiph"? Its root folder has been renamed though... Sorry, I post it wrong, I have all the contents moved to src. Check it out: I'm waiting for your feedback concerning the label vs branch issue. As you may know branches and tags (In git) are only ephemeral references to commits, they can be moved. And regarding branches that's how git actually works. Take a look to your repository in git: As you can see the graph is quite similar to the Plastic One, it seems you have been moving the tag reference along the commits, which is obviously not recommended. A tag/Label must be an static and immutable object. So there's no difference between your Git and you Plastic SCM repository (except the empty directories). If you want to strat working with Plastic I do recommend you 2 things: Delete the empty directories structure. Label the last changesets of your "pseudo git tags" Link to comment Share on other sites More sharing options...
manu Posted August 14, 2012 Report Share Posted August 14, 2012 A different view of your "pseudo git tags" Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 14, 2012 Author Report Share Posted August 14, 2012 Hi, The git repo comes from a git svn clone. I tried some cleanup to the repo: the "git branch -a" and "git tag" output is OK, but some additional work seems necessary for tags... It's OK to simply delete the empty ghost folder, although I still don't understand why plastic created it in my workspace if it doesn't exist anymore. Thank you very much for your help. Link to comment Share on other sites More sharing options...
manu Posted August 14, 2012 Report Share Posted August 14, 2012 I still don't understand why plastic created it in my workspace if it doesn't exist anymore. I'll try to explain it. Git is not able to manage directories, only files are under the Git control. So a delete order such us "D /foo" is never going to be included in a Git fast-export file. If you move a file from /foo to /bar, Plastic is going to create first the /foo directory (due to the add file order) and then it's going to create the /bar directory (due to the move operation) and the /foo directory will remain empty due to Plastic doesn't have the git instruction to remove it. Thank you very much for your help. You are welcome Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 14, 2012 Author Report Share Posted August 14, 2012 Ok manu. I understand now. It seems that veracity has found a workaround for that issue because if I checkout the master branch, veracity creates only a "src" folder (the same fast-import file has been used for creating the repo). A such workaround for plastic would be nice also. Link to comment Share on other sites More sharing options...
manu Posted August 14, 2012 Report Share Posted August 14, 2012 Yes, an easy workaround is disconnect the empty nodes in the DAG tree. But it's not implemented. Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 14, 2012 Author Report Share Posted August 14, 2012 Do you have any plan to implement it? Link to comment Share on other sites More sharing options...
manu Posted August 14, 2012 Report Share Posted August 14, 2012 Nop, but it should be complicated to script it or create a tiny c# tool, no more than 20 lines. Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 14, 2012 Author Report Share Posted August 14, 2012 Cool, so let's go ! Link to comment Share on other sites More sharing options...
manu Posted August 14, 2012 Report Share Posted August 14, 2012 hahaha I was trying to encourage you to do it. Tomorrow is a bank day here in Spain so I will try to find time on Thursday. I'm not promising nothing Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 14, 2012 Author Report Share Posted August 14, 2012 A built-in workaround into fast-import utility would be a better solution. To delete a folder, the plastic GUI is sufficient... Link to comment Share on other sites More sharing options...
Cyber Sinh Posted August 14, 2012 Author Report Share Posted August 14, 2012 I keep going to cleanup my git repository. I checked with the GitExtensions: I only have one branch with two tags. However, my imported repo in plastic has again imported the tags as branchs. I'm going to become crazy. You will find attached the new git repository with the corresponding fast-import file. So, you could test yourself. Thanks. xiph2.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.