equal
deleted
inserted
replaced
1565 if pf == '-': |
1565 if pf == '-': |
1566 ui.status(_("applying patch from stdin\n")) |
1566 ui.status(_("applying patch from stdin\n")) |
1567 data = patch.extract(ui, sys.stdin) |
1567 data = patch.extract(ui, sys.stdin) |
1568 else: |
1568 else: |
1569 ui.status(_("applying %s\n") % p) |
1569 ui.status(_("applying %s\n") % p) |
1570 data = patch.extract(ui, file(pf, 'rb')) |
1570 if os.path.exists(pf): |
1571 |
1571 data = patch.extract(ui, file(pf, 'rb')) |
|
1572 else: |
|
1573 data = patch.extract(ui, urllib.urlopen(pf)) |
1572 tmpname, message, user, date, branch, nodeid, p1, p2 = data |
1574 tmpname, message, user, date, branch, nodeid, p1, p2 = data |
1573 |
1575 |
1574 if tmpname is None: |
1576 if tmpname is None: |
1575 raise util.Abort(_('no diffs found')) |
1577 raise util.Abort(_('no diffs found')) |
1576 |
1578 |