2015-05-15 66 views

回答

2

这是否给你你需要的东西?

hg log -r "branch(default) and 0:" -l 1 --template "{date|isodate}\n" 

我想这会给你命名分支上第一个变更集的日期。

因此,在分支 “testbranch”

% hg log -r "branch(testbranch) and 0:" -l 1 
changeset: 107:bd91c8e6fa5f 
branch:  testbranch 
user:  Nick Pierpoint 
date:  Fri May 15 15:16:44 2015 +0100 
summary:  test one 

第一变更...添加template只是为了获取日期:

% hg log -r "branch(testbranch) and 0:" -l 1 --template "{date|isodate}\n" 
2015-05-15 15:16 +0100 

min也适用,如果你总是希望返回单个变更集:

% hg log -r "min(branch(testbranch))" 
changeset: 107:bd91c8e6fa5f 
branch:  testbranch 
user:  Nick Pierpoint <[email protected]> 
date:  Fri May 15 15:16:44 2015 +0100 
summary:  test one 
+0

thx代表“ - 模板”。这对我来说是非常有用的。 –

2

我应该把它写不parents

hg log -r "min(branch(foo))" 

现在它做什么,我需要的。

相关问题