mirror of
https://github.com/frej/fast-export.git
synced 2025-11-01 08:55:47 +01:00
Make hg-fast-export work on Windows
* use sys.stdout.write instead of print to avoid end-of-line issues * use os.devnull instead of hard-coding /dev/null
This commit is contained in:
@@ -102,7 +102,7 @@ def save_cache(filename,cache):
|
||||
def get_git_sha1(name,type='heads'):
|
||||
try:
|
||||
# use git-rev-parse to support packed refs
|
||||
cmd="GIT_DIR='%s' git rev-parse --verify refs/%s/%s 2>/dev/null" % (os.getenv('GIT_DIR','/dev/null'),type,name)
|
||||
cmd="git rev-parse --verify refs/%s/%s 2>%s" % (type,name,os.devnull)
|
||||
p=os.popen(cmd)
|
||||
l=p.readline()
|
||||
p.close()
|
||||
|
||||
Reference in New Issue
Block a user