mirror of
https://github.com/frej/fast-export.git
synced 2025-11-03 17:55:49 +01:00
hg-reset.py: Print details for changed branches only
It doesn't make sense to suggest resetting branch HEADs to their current value. Signed-off-by: Rocco Rutte <pdmef@gmx.net>
This commit is contained in:
@@ -76,3 +76,12 @@ def save_cache(filename,cache):
|
||||
f=open(filename,'w+')
|
||||
map(lambda x: f.write(':%s %s\n' % (str(x),str(cache.get(x)))),cache.keys())
|
||||
f.close()
|
||||
|
||||
def get_git_sha1(name,type='heads'):
|
||||
try:
|
||||
f=open(os.getenv('GIT_DIR','/dev/null')+'/refs/'+type+'/'+name)
|
||||
sha1=f.readlines()[0].split('\n')[0]
|
||||
f.close()
|
||||
return sha1
|
||||
except IOError:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user