# HG changeset patch # User rupert.thurner@gmail.com # Date 1187640125 -7200 # Node ID ce4e67533723cea250e1ae36a4d7e069f01763b0 # Parent 6f636d13f6b8629108a03b660713e1f8b1660e1d add import from url capability diff -r 6f636d13f6b8 -r ce4e67533723 mercurial/commands.py --- a/mercurial/commands.py Sun Aug 19 17:38:40 2007 +0200 +++ b/mercurial/commands.py Mon Aug 20 22:02:05 2007 +0200 @@ -1567,8 +1567,10 @@ data = patch.extract(ui, sys.stdin) else: ui.status(_("applying %s\n") % p) - data = patch.extract(ui, file(pf, 'rb')) - + if os.path.exists(pf): + data = patch.extract(ui, file(pf, 'rb')) + else: + data = patch.extract(ui, urllib.urlopen(pf)) tmpname, message, user, date, branch, nodeid, p1, p2 = data if tmpname is None: