Show More
@@ -34,7 +34,7 b' from mercurial.node import bin, hex, sho' | |||
|
34 | 34 | from mercurial.repo import RepoError |
|
35 | 35 | from mercurial import commands, cmdutil, hg, patch, revlog, util |
|
36 | 36 | from mercurial import repair |
|
37 | import os, sys, re, errno | |
|
37 | import os, sys, re, errno, urllib | |
|
38 | 38 | |
|
39 | 39 | commands.norepo += " qclone" |
|
40 | 40 | |
@@ -1499,7 +1499,10 b' class queue:' | |||
|
1499 | 1499 | raise util.Abort(_('need --name to import a patch from -')) |
|
1500 | 1500 | text = sys.stdin.read() |
|
1501 | 1501 | else: |
|
1502 |
|
|
|
1502 | if os.path.exists(filename): | |
|
1503 | text = file(filename, 'rb').read() | |
|
1504 | else: | |
|
1505 | text = urllib.urlopen(filename).read() | |
|
1503 | 1506 | except IOError: |
|
1504 | 1507 | raise util.Abort(_("unable to read %s") % filename) |
|
1505 | 1508 | if not patchname: |
@@ -27,6 +27,15 b' cd repo' | |||
|
27 | 27 | echo % qimport non-existing-file |
|
28 | 28 | hg qimport non-existing-file |
|
29 | 29 | |
|
30 | echo % import URL | |
|
31 | echo foo >> foo | |
|
32 | hg add foo | |
|
33 | hg diff > $HGTMP/url.diff | |
|
34 | hg revert --no-backup foo | |
|
35 | rm foo | |
|
36 | hg qimport file://$HGTMP/url.diff | |
|
37 | hg qun | |
|
38 | ||
|
30 | 39 | echo % build diff with CRLF |
|
31 | 40 | python ../writelines.py b 5 'a\n' 5 'a\r\n' |
|
32 | 41 | hg ci -Am addb |
General Comments 0
You need to be logged in to leave comments.
Login now