[go: nahoru, domu]

Skip to content

Commit

Permalink
http: add -f flag to hg_import.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaniv Inbar committed May 30, 2013
1 parent 48aa083 commit 4896888
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions hg_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@
print 'must be run from the root directory of the hg workspace'
sys.exit(1)

url = sys.argv[1]
if '-f' == sys.argv[1]:
i = 2
force = ['-f']
else:
i = 1
force = []
url = sys.argv[i]

subprocess.check_call([hg_cmd, 'import', '--no-commit', url])
subprocess.check_call([hg_cmd, 'import'] + force + ['--no-commit', url])
webFile = urllib.urlopen(url)
for line in webFile.readlines():
# detect file name
Expand Down

0 comments on commit 4896888

Please sign in to comment.