Jump to content

Problem with fast-import (Couldn't process command)


icalvo

Recommended Posts

I am getting an error when executing cm fast-import. This is the output:

Couldn't process command [??r e s e t   r e f s / h e a d s / m a s t e r
]
Error: Couldn't process command [??r e s e t   r e f s / h e a d s / m a s t e r
]

The spaces in between the command letters are really NUL characters. I have attached a file with the command output.

git fast-export generates a file encoded with UCS-2 Little Endian. Maybe cm fast-import is not using that encoding?

Link to comment
Share on other sites

Hi Ignacio,

I think git fast-export creates the the package in UTF-8, you can check it on the fast-export man page.

Can you tell us how you did the fast-export operation? did you modify manually the package or did you do something "strange" with it?

We have fast-imported more than 1000 git repositories and we have never seen this error before.

Anyway we have a program to remove zeroed chars that can be useful to finally import your package.

Manu.

Link to comment
Share on other sites

I will add that my system is Win7 64bits + msysgit, and that my git repo is converted from Subversion.

After some Google search, it seems that msysgit may be causing encoding problems with git svn. I am trying with cygwin, I will update with results.

Link to comment
Share on other sites

Done! I have found the little problem of ending up with a "main" and a "master" branch, but it is easily solved with some commands. Here is the whole script, it can be run entirely inside cygwin's Bash:

project=MYPROJECT
plasticserver=PLASTICSERVER:PORT
svnrepo=https://SVNSERVER/svn/REPO/$project

git svn clone $svnrepo/$project --stdlayout
cd $project
git fast-export --all -C --tag-of-filtered-object=drop --signed-tags=strip > repo.fe
cm mkrep $project@$plasticserver
cm rnbr /main@$project@$plasticserver master
cm fi $project@$plasticserver repo.fe
cm rnbr /master@$project@$plasticserver main
cd ..

Link to comment
Share on other sites

The script works so yes, the problem is solved; but I don't know exactly where is the problem.

Probably cygwin encodes things differently. I have learnt that fast-export is more or less a binary dump (no encoding involved), so my main suspect for the encoding problem is git svn.

By the way, I have enhanced the script to migrate all the projects of a standard SVN repo to Plastic (one repo per project). You must install subversion in cygwin (not installed by default).

svnrepo=https://SVNSERVER/svn/REPO
plasticserver=PLASTICSERVER:PORT
for project in `svn ls $svnrepo`; do
project=${project%/} # strip final slash
echo Processing project $project...
echo ---------------------------------------------------
# check if repo already exists at Plastic server
grepcount=`cm lrep | grep -c $project`;
if [ "$grepcount" == "0" ]; then
	git svn clone $svnrepo/$project --stdlayout
	cd $project
	git fast-export --all -C --tag-of-filtered-object=drop --signed-tags=strip > repo.fe
	cm mkrep $project@$plasticserver
	cm rnbr /main@$project@$plasticserver master
	cm fi $project@$plasticserver repo.fe
	cm rnbr /master@$project@$plasticserver main
	cd ..
else
	echo Project already exists at Plastic SCM server
fi
done

Link to comment
Share on other sites

  • 2 years later...

Hi Manu, 

 

I found this old topic. I can consistently reproduce it with repos imported from svn. Here are the steps: 

 

git svn fetch
git fast-export --all -M --signed-tags=strip --tag-of-filtered-object=drop > repo.fe
cm mkrep newrep
cm fast-import newrep repo.fe
 ]uldn't process command [??r e s e t   r e f s / h e a d s / m a s t e r
 ]ror: Couldn't process command [??r e s e t   r e f s / h e a d s / m a s t e r
 
Looks like the text strings in the export file are encoded with unicode 16.

 

plastic version  in 5.0.44.557

git version 1.8.4.msysgit.0

 

Thought it may help you fixing it. 

 

Cheers!

Link to comment
Share on other sites

I know you like evidences :)

...Processing changeset 104. Processed 104 csets. Elapsed 00:00:02.2620000
repo.fe correctly parsed. 104 commits. 2340 ms
         master
1 branches
0 modified files found refering to an SHA instead of a mark
800 modified files
30,2 Mb in blobs. 754 blobs
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...