##// END OF EJS Templates
Add -q option to import...
mpm@selenic.com -
r50:0263ce8b default
parent child Browse files
Show More
@@ -133,12 +133,15 b' elif cmd == "commit" or cmd == "checkin"'
133 133 elif cmd == "import" or cmd == "patch":
134 134 ioptions = {}
135 135 opts = [('p', 'strip', 1, 'path strip'),
136 ('b', 'base', "", 'base path')]
136 ('b', 'base', "", 'base path'),
137 ('q', 'quiet', "", 'silence diff')
138 ]
137 139
138 140 args = fancyopts.fancyopts(args, opts, ioptions,
139 141 'hg import [options] <patch names>')
140 142 d = ioptions["base"]
141 143 strip = ioptions["strip"]
144 quiet = ioptions["quiet"] and "> /dev/null" or ""
142 145
143 146 for patch in args:
144 147 ui.status("applying %s\n" % patch)
@@ -149,7 +152,8 b' elif cmd == "import" or cmd == "patch":'
149 152 if l[:3] == "---": break
150 153 text += l
151 154
152 os.system("patch -p%d < %s > /dev/null" % (strip, pf))
155 if os.system("patch -p%d < %s %s" % (strip, pf, quiet)):
156 raise "patch failed!"
153 157 f = os.popen("lsdiff --strip %d %s" % (strip, pf))
154 158 files = f.read().splitlines()
155 159 f.close()
General Comments 0
You need to be logged in to leave comments. Login now