Difference between checkout and export in SVN

2020-05-12 06:18发布

What is the exact difference between SVN checkout and SVN export?

From what I know, export does not include the .svn directory which include metadata, and checkout included that .svn directory. Yet, my colleague had this problem recently that there is a different behaviour for the stuff compiled from sources that is checkout and exported from SVN repo. Both of them compiled correctly, but the one compiled from svn export works, but the one that is checked out doesn't work at all.

PS: The stuff being compiled is the Linux 2.4 kernel that is being used in an embedded device. The image compiles and load correctly, but the checked out one doesn't work. It causes a kernel panic during insmod. Why could this happen at all?

PPS: We've tried checksumming and diff tool to check the difference between the two directories that are exported and checked out from SVN. Both of them are the same except for the .svn directory.

9条回答
叼着烟拽天下
2楼-- · 2020-05-12 07:03

Use export if you want to upload (or give to somebody) a project. If you are working with a project, use checkout.

查看更多
Summer. ? 凉城
3楼-- · 2020-05-12 07:04

svn export simply extracts all the files from a revision and does not allow revision control on it. It also does not litter each directory with .svn directories.

svn checkout allows you to use version control in the directory made, e.g. your standard commands such as svn update and svn commit.

查看更多
Viruses.
4楼-- · 2020-05-12 07:10

As you stated, a checkout includes the .svn directories. Thus it is a working copy and will have the proper information to make commits back (if you have permission). If you do an export you are just taking a copy of the current state of the repository and will not have any way to commit back any changes.

查看更多
登录 后发表回答