2015-12-27 8 views
6

के साथ हैं, यह जांचने का सबसे अच्छा तरीका क्या है कि मैं कौन सी शाखा Mercurial पर हूं?यह जांचने के लिए कि आप किस शाखा में Mercurial

hg log -l 5 

यह मैं रेपो में नवीनतम करता और नहीं के रूप में Git होगा राज्य काम करने के बारे दिखाने के लिए लगता है, इसलिए मैं git status मुझे लगता है, जो मुझे बताओ क्या शाखा मैं पर हूँ की तरह कुछ के लिए देख रहा हूँ। hg status मुझे कुछ भी नहीं दिखाता है।

उत्तर

16

आप शाखा विकल्प के लिए -b साथ hg identify आदेश का उपयोग कर सकते हैं:

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

hg branch। मैं कम से कम hg help पढ़ने का सुझाव देता हूं: ^)

-1

आप वर्तमान में चेक-आउट संस्करण को स्पष्ट रूप से निर्दिष्ट करना भी चाहेंगे। तब hg log के उत्पादन में वापस आ जाएगी आप के लिए क्या देखो:

hg log -r. 
0

आप hg sum

उदाहरण के लिए

इस्तेमाल कर सकते हैं, तो आप दो शाखाओं, ए और बी

[[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 

आपके पास कहना खोज करने के लिए हमेशा एक कीवर्ड के साथ grep का उपयोग कर सकते हैं।

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 
: इस मामले में,

$ hg help | grep branch` 

आप देता है

संबंधित मुद्दे