2015-12-27 48 views
6

Hangi şubeye mercurial ile çalıştığımı kontrol etmenin en iyi yolu nedir?Hangi dalda olduğunuzu kontrol etmek için mercurial

hg log -l 5 

Bu bana git olduğu gibi devlet çalışma hakkında son repo kaydedilmesini değil göstermek gibi görünüyor, bu yüzden ben üzerine neysem şube bana anlatırdı herhalde git status, gibi bir şey arıyorum. hg status bana hiçbir şey göstermiyor.

cevap

16

Sen şube seçeneği için -b ile hg identify komutunu kullanabilirsiniz:

C:\Some\Repository> hg identify -b 
default 
13

hg branch. En azından hg help değerini bir kez daha okumanızı öneririm: ^)

-1

Ayrıca, şu anda kullanıma sunulan sürümü açıkça belirtmek isteyebilirsiniz. Sonra hg log çıktısı Aradığın döndürür:

hg log -r. 
0

Örneğin hg sum

kullanabilirsiniz, iki şubesi, A ve B

[[email protected] ATS]# hg update A 
0 files updated, 0 files merged, 0 files removed, 0 files unresolved 
[[email protected] ATS]# hg sum 
parent: 1787:3f06e1a0260a 
made A 
branch: A 
commit: (clean) 
update: (current) 
[[email protected] ATS]# hg update B 
0 files updated, 0 files merged, 0 files removed, 0 files unresolved 
[[email protected] ATS]# hg sum 
parent: 1788:7ff3c507efd9 tip 
made B 
branch: B 
commit: (clean) 
update: (current) 
0
$ hg branch 

You söylüyorlar sadece grep'i aramak için bir anahtar kelimeyle kullanabilir.

branch  set or show the current branch name 
branches  list repository named branches 
graft   copy changes from other branches onto the current branch 
heads   show branch heads 
: Bu durumda ,

$ hg help | grep branch` 

size verir