Wednesday, November 30, 2011

How to create tag/branch with git-svn


The SVN server structure is like this:
http://foo.net/code/design/
                          |-- trunk/
                          |        |-- proj1
                          |        |-- proj2
                          |-- tags/
                          |       |-- forProj1
                          |       |-- forProj2
                          |-- branches/
                          |           |-- forProj1
To create the tag:
  1. Clone SVN:
    $ git svn clone http://foo.net/code/design --trunk=trunk/proj1 --tags=tags/forProj1 --branches=branches/forProj1 localProjName
  2. Then the tag can be created with simple command
    $ git svn tag -n -m "test tag" test_v1
Do the branch in the same way.
The original question and answer can check http://stackoverflow.com/questions/8306592/git-svn-how-to-create-a-tag-branch-for-a-sub-project-of-svn

Thursday, November 10, 2011

How to download Chrome Extension and install it from local

My computer is set to can't run Google Chrome. I don't know how they did that. But if your run "chrome.exe" it  will be automatically killed before it started.

The solution is rename it to any name except "chrome.exe", for example, "ie.exe". Then I can use it.

But that is not perfect. I can't install any extension from Chrome WebStore. I got the error message as below:

Package is invalid. Details: 'Could not create directory for unzipping: C:\XXXXXX".

Check the latest Chrome Dev, it has the "Developer Mode" which can load the local unpacked extension. Then I got the idea to download the extension and load it from local directory.

1. Find the ID of extension

When you press the extension in the Chrome WebStore, you can get the link as below in the URL bar.
https://chrome.google.com/webstore/detail/cfhdojbkjhnklbpkdaibdccddilifddb
The one after webstore/detail/ is the ID (cfhdojbkjhnklbpkdaibdccddilifddb) of it.

2. Open other browser (Not Chrome)

Paste this in the URL bar
https://clients2.google.com/service/update2/crx?response=redirect&x=id%3DRealID%26uc

replace the with the real ID you found in last step.

3. Hit "Enter" then you would ask to save the extension.

4. Unzip it to a directory

5. Press "Load unpacked extension" in the chrome://settings/extensions. It will ask you to locate the directory of extension created in Step 4.

Then, enjoy the extension.

Next time, try to make it automatically.

Any ideas of workaround for using Google Chrome in my situation is welcomed.

Tuesday, November 8, 2011

Compile UVM DPI for QuestaSim

Download UVM 1.1 and want to have a try. But when I tried to compile the DPI for QuestaSim:

uvm/examples$ make -f Makefile.questa dpi_lib

I got error message as below:
uvm/src/dpi/uvm_regex.cc:26:22: fatal error: vpi_user.h: No such file or directory
compilation terminated.
make: *** [dpi_lib] Error 1

After check the makefile and here, I found the reason is I don't have MTI_HOME setup in my environment.

Set the MTI_HOME to the install direcotry of QuestaSim. Then make again, everything is fine. 

From now on, start my UVM learning progress. 

Any good resources for UVM, such as tutorial, forum, articles, blogs, etc, are welcomed.