Subversion - > Git迁移:git clone没有完全克隆?(Subversion -> Git migration: git clone not making a full clone?)
我一直在关注Subversion - > Git迁移指南: https : //stackoverflow.com/a/3972103/1107232
我正在从Subversion 1.7.3迁移到git 1.7.9.2。 我有一个SVN存储库,里面有9个项目,运行命令后:
$ sudo git svn clone -stdlayout --no-metadata --authors-file=/var/git/svnauthors.txt file:///var/subversion /var/git/temp-repo $ sudo git svn fetch $ git branch -r 2.1.3 2.1.3@10 2.1.3@11 2.1.3@14 2.1.3@15 trunk trunk@12
我得到一个36M / var / git / temp-repo文件夹,但我的/ var / subversion文件夹是606M。
运行'git checkout -b 2.1.3 2.1.3'只是打印'切换到新分支'2.1.3''我需要添加一些文件:/// var / subversion路径还是什么?
I've been following the Subversion -> Git migration guide here: https://stackoverflow.com/a/3972103/1107232
I'm migrating from Subversion 1.7.3 to git 1.7.9.2. I have one SVN repository with 9 projects in it, and after I run the command:
$ sudo git svn clone -stdlayout --no-metadata --authors-file=/var/git/svnauthors.txt file:///var/subversion /var/git/temp-repo $ sudo git svn fetch $ git branch -r 2.1.3 2.1.3@10 2.1.3@11 2.1.3@14 2.1.3@15 trunk trunk@12
I get a 36M /var/git/temp-repo folder, but my /var/subversion folder is 606M.
Running 'git checkout -b 2.1.3 2.1.3' just prints 'Switched to a new branch '2.1.3'' Do I need to add some file:///var/subversion paths or something?
原文:https://stackoverflow.com/questions/9541753
最满意答案
使用
UNION ALL
( 实际上只有UNION
会这样做,因为学生没有头衔 )。 SInce表STUDENT
没有标题,您需要有一个带有别名title
的空列,以便它与列数相匹配。 如果您没有为标题添加额外的列,则会出现错误消息The used SELECT statements have a different number of columns...
完整查询,
SELECT schoolid, instructorusername username, instructorfirstname firstName, instructorlastname lastName, instructortitle title, level FROM instructors UNION SELECT schoolid, studentusername username, studentfirstname firstName, studentlastname lastName, '' title, level FROM students
use
UNION ALL
(actually justUNION
will do since students have no title). SInce tableSTUDENT
doesn't have title, you need to have an empty column with aliastitle
so it will match the column count. If you don't add extra column for title, you will have error messageThe used SELECT statements have a different number of columns...
Full Query,
SELECT schoolid, instructorusername username, instructorfirstname firstName, instructorlastname lastName, instructortitle title, level FROM instructors UNION SELECT schoolid, studentusername username, studentfirstname firstName, studentlastname lastName, '' title, level FROM students
相关问答
更多-
有什么数据库专业书籍介绍?[2022-05-19]
mysql -
您正在寻找的概念是UNION (请参阅MySql UNION参考 ),它将两个查询的结果组合在一起。 通常,您只联合具有相同列的结果,但是您要求联合两种不同类型的查询。 如果您关心的是所有结果并且您不关心空白单元格,那么这应该对您有用: (SELECT id, photo, caption, visible, null AS text, null AS gender, null AS notes FROM `tableone` WHERE `userid` = $user->id AND `date` = ...
-
我猜你的桌子就像这样设置了。 foo (user_id, admin_id, ...) users (user_id, active, ...) admin (admin_id, active, ...) 如果是这种情况,那么除了重新考虑您的数据库设计(每个用户被分配了user_level的所有用户的一个表)之外,您可以尝试使用UNION SELECT users.user_id AS id FROM foo INNER JOIN users ON foo.user_id = users.user_id ...
-
你可以这样做 foreach ($tables as $table) { $table = '`'.mb_ereg_replace('`','``',$table).'`'; $sql[] = "( SELECT *,'".$table."' AS tableName FROM $table ORDER BY status LIMIT 50 )"; } You can do by this way foreach ($tables as $table ...
-
SELECT url_alias.alias FROM url_alias, taxonomy_index WHERE url_alias.source = CONCATENATE('taxonomy/term/', taxonomy_index.tid) AND taxonomy_index.nid = {given_nid} SELECT url_alias.alias FROM url_alias, taxonomy_index WHERE url_alias.sourc ...
-
如何在一个MySQL查询中从两个不同的表中选择记录?(How can I select records from two different tables in one MySQL query?)[2022-03-08]
你必须拥有将两个表绑定在一起的东西,这是一个共同的key 。 类似下面示例中的Id : Table 1 Id Fname -------- 1 Roger 2 Pete Table 2 Id Lname -------- 1 Federer 2 Sampras 在这种情况下,您可以获得全名: SELECT Fname, Lname from T1,T2 where T1.Id = T2.Id; You must have something that binds the two tables to ... -
感谢Pat提出的建议,我刚刚找到了一个适用于我的解决方案,所以对于任何可能感兴趣的人,我将WHERE子句移动到了ON子句,现在我得到了我需要的结果...... SELECT a.*, b.* FROM Table_A AS a LEFT JOIN Table_B AS b ON (b.a-id = a.id AND b.flag = 0) 下次需要记住这一点。 :) Thanks Pat for your suggestion, I just found a solution that is workin ...
-
如何在单个MySQL查询中从两个不同的表中获取数据?(How can I get data from from two different tables in a single MySQL query?)[2023-07-29]
假设您的author列包含author唯一标识符,请尝试: SELECT t2.quote, t2.author, t1.profession FROM table2 t2 LEFT JOIN table1 t1 ON t2.author = t1.author Supposing that your author column contains unique identifiers for authors, try: SELECT t2.quote, t2.author, t1.profession ... -
糟糕错误链接早先抱歉 如果我理解你的问题,看起来像是一个类似的帖子 排序MYSQL标签表 Oops wrong link earlier sorry Looks like a similar post to mine if I understood your question Sorting MYSQL Tag table
-
使用UNION ALL ( 实际上只有UNION会这样做,因为学生没有头衔 )。 SInce表STUDENT没有标题,您需要有一个带有别名title的空列,以便它与列数相匹配。 如果您没有为标题添加额外的列,则会出现错误消息 The used SELECT statements have a different number of columns... 完整查询, SELECT schoolid, instructorusername username, instru ...