我是Mercurial的新手,我错误地在主存储库是最新的之前在不同的系统上进行了不同的更改.(我明白这就是Mercurial的目标,但是我的大脑正在努力解决这个问题.)
现在在我的主开发服务器上,一切都是最新的并且已经提交.然而...
$ hg push
abort: push creates new remote branches: 4f2672f039d7!
(use 'hg push --new-branch' to create new remote branches)
Run Code Online (Sandbox Code Playgroud)
我真的不想要一个新的分支.我只想要合并所有的更改.
$ hg heads
changeset: 459:ff5f94e44aba
branch: 4f2672f039d7
tag: tip
parent: 458:e63d02baf4cf
parent: 455:267abda62069
user: mike@...
date: Tue Sep 13 14:25:16 2011 -0400
summary: Images from prof
changeset: 455:267abda62069
parent: 453:a74757e26357
user: mike@localhost.localdomain
date: Tue Sep 13 09:08:12 2011 -0400
summary: images for FLC
Run Code Online (Sandbox Code Playgroud)
指出我正确的方向?
编辑:(添加细节)
当我尝试合并时,我得到以下结果:
$ hg merge
abort: branch '4f2672f039d7' has one head - please merge …
Run Code Online (Sandbox Code Playgroud) 我想计算同一个表中不同行之间的唯一日期字段的差异.
例如,给出以下数据:
id | date
---+------------
1 | 2011-01-01
2 | 2011-01-02
3 | 2011-01-15
4 | 2011-01-20
5 | 2011-01-10
6 | 2011-01-30
7 | 2011-01-03
Run Code Online (Sandbox Code Playgroud)
我想生成一个产生以下内容的查询:
id | date | days_since_last
---+------------+-----------------
1 | 2011-01-01 |
2 | 2011-01-02 | 1
7 | 2011-01-03 | 1
5 | 2011-01-10 | 7
3 | 2011-01-15 | 5
4 | 2011-01-20 | 5
6 | 2011-01-30 | 10
Run Code Online (Sandbox Code Playgroud)
我将在MySQL中使用什么日期函数的任何建议,或者是否有一个子选择可以做到这一点?
(当然,我不介意WHERE date > '2011-01-01'
忽略第一行.)