如何返回某个变更集(或标记)并从该提交中分支出来? 分支出来后,提交的更改不会影响原始分支吗?
SELECT NOW();
+---------------------+
| NOW() |
+---------------------+
| 2015-05-25 17:03:17 |
+---------------------+
1 row in set (0.00 sec)
INSERT INTO email_blast
(Send_Status
,member_status
,user_email
,usage_date_time
)
SELECT 0
, 1
, 'user@domain.tld'
, NOW()
FROM email_blast x
LEFT JOIN email_blast y
ON y.user_email = 'user@domain.tld'
AND y.send_status IN (0,1)
AND y.usage_date_time > NOW() - INTERVAL 5 MINUTE
WHERE y.user_email IS NULL
LIMIT 1;
SELECT * FROM email_blast;
+-------------+---------------+-------------------+---------------------+
| Send_Status | Member_Status | User_Email | Usage_Date_Time |
+-------------+---------------+-------------------+---------------------+
| 0 | 1 | jeff@domain.tld | 2015-05-25 16:16:34 |
| 0 | 1 | john@gmail.com | 2015-05-25 16:15:09 |
| 0 | 0 | name@domain.tld | 2015-05-25 16:44:42 |
| 0 | 0 | peter@hotmail.com | 2015-05-25 16:13:04 |
| 0 | 1 | server@domain.tld | 2015-05-25 16:11:48 |
| 0 | 0 | user@domain.tld | 2015-05-25 16:45:55 |
| 0 | 1 | user@domain.tld | 2015-05-25 17:03:33 |
+-------------+---------------+-------------------+---------------------+
7 rows in set (0.00 sec)
答案 0 :(得分:1)
hg update branch-1
hg branch branch-2
修改
hg commit
请注意,这是名为branches的分支,还有其他方法可以在Mercurial中进行分支。