##// END OF EJS Templates
Merge with crew-stable
Patrick Mezard -
r9591:012f1244 merge default
parent child Browse files
Show More
@@ -63,6 +63,10 b' def extract(ui, fileobj):'
63
63
64 subject = msg['Subject']
64 subject = msg['Subject']
65 user = msg['From']
65 user = msg['From']
66 if not subject and not user:
67 # Not an email, restore parsed headers if any
68 subject = '\n'.join(': '.join(h) for h in msg.items()) + '\n'
69
66 gitsendmail = 'git-send-email' in msg.get('X-Mailer', '')
70 gitsendmail = 'git-send-email' in msg.get('X-Mailer', '')
67 # should try to parse msg['Date']
71 # should try to parse msg['Date']
68 date = None
72 date = None
@@ -267,7 +267,7 b' def _removedirs(name):'
267 head, tail = os.path.split(head)
267 head, tail = os.path.split(head)
268 while head and tail:
268 while head and tail:
269 try:
269 try:
270 if osutil.listdir(name):
270 if osutil.listdir(head):
271 return
271 return
272 os.rmdir(head)
272 os.rmdir(head)
273 except:
273 except:
@@ -345,3 +345,24 b' hg init oddcreate'
345 cd oddcreate
345 cd oddcreate
346 hg import --no-commit ../create.patch
346 hg import --no-commit ../create.patch
347 cat foo
347 cat foo
348 cd ..
349
350 echo % 'first line mistaken for email headers (issue 1859)'
351 hg init emailconfusion
352 cd emailconfusion
353 cat > a.patch <<EOF
354 module: summary
355
356 description
357
358
359 diff -r 000000000000 -r 9b4c1e343b55 test.txt
360 --- /dev/null
361 +++ b/a
362 @@ -0,0 +1,1 @@
363 +a
364 EOF
365 hg import -d '0 0' a.patch
366 hg parents -v
367 cd ..
368
@@ -295,3 +295,16 b' applying a.patch'
295 % create file when source is not /dev/null
295 % create file when source is not /dev/null
296 applying ../create.patch
296 applying ../create.patch
297 a
297 a
298 % first line mistaken for email headers (issue 1859)
299 applying a.patch
300 changeset: 0:5a681217c0ad
301 tag: tip
302 user: test
303 date: Thu Jan 01 00:00:00 1970 +0000
304 files: a
305 description:
306 module: summary
307
308 description
309
310
@@ -108,3 +108,12 b' remove -A test'
108 echo % dir, options -Af
108 echo % dir, options -Af
109 rm test/bar
109 rm test/bar
110 remove -Af test
110 remove -Af test
111
112 echo 'test remove dropping empty trees (issue1861)'
113 mkdir -p issue1861/b/c
114 echo x > issue1861/x
115 echo y > issue1861/b/c/y
116 hg ci -Am add
117 hg rm issue1861/b
118 hg ci -m remove
119 ls issue1861
@@ -111,3 +111,8 b' R test/foo'
111 ./foo
111 ./foo
112 ./test/foo
112 ./test/foo
113 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
114 test remove dropping empty trees (issue1861)
115 adding issue1861/b/c/y
116 adding issue1861/x
117 removing issue1861/b/c/y
118 x
General Comments 0
You need to be logged in to leave comments. Login now