Show More
@@ -1064,12 +1064,17 b' class queue(object):' | |||||
1064 | if commitfiles: |
|
1064 | if commitfiles: | |
1065 | parent = self.qparents(repo, n) |
|
1065 | parent = self.qparents(repo, n) | |
1066 | if inclsubs: |
|
1066 | if inclsubs: | |
1067 |
|
|
1067 | for files in changes[:3]: | |
1068 |
|
|
1068 | if '.hgsubstate' in files: | |
1069 |
|
|
1069 | break # already listed up | |
1070 |
|
|
1070 | else: | |
1071 |
|
|
1071 | # not yet listed up | |
1072 |
|
|
1072 | if substatestate in 'a?': | |
|
1073 | changes[1].append('.hgsubstate') | |||
|
1074 | elif substatestate in 'r': | |||
|
1075 | changes[2].append('.hgsubstate') | |||
|
1076 | else: # modified | |||
|
1077 | changes[0].append('.hgsubstate') | |||
1073 | chunks = patchmod.diff(repo, node1=parent, node2=n, |
|
1078 | chunks = patchmod.diff(repo, node1=parent, node2=n, | |
1074 | changes=changes, opts=diffopts) |
|
1079 | changes=changes, opts=diffopts) | |
1075 | for chunk in chunks: |
|
1080 | for chunk in chunks: |
@@ -355,3 +355,63 b' correctly handle subrepos with patch que' | |||||
355 | $ hg qnew 0.diff |
|
355 | $ hg qnew 0.diff | |
356 |
|
356 | |||
357 | $ cd .. |
|
357 | $ cd .. | |
|
358 | ||||
|
359 | check whether MQ operations can import updated .hgsubstate correctly | |||
|
360 | both into 'revision' and 'patch file under .hg/patches': | |||
|
361 | ||||
|
362 | $ hg init importing-hgsubstate | |||
|
363 | $ cd importing-hgsubstate | |||
|
364 | ||||
|
365 | $ echo a > a | |||
|
366 | $ hg commit -u test -d '0 0' -Am '#0 in parent' | |||
|
367 | adding a | |||
|
368 | $ hg init sub | |||
|
369 | $ echo sa > sub/sa | |||
|
370 | $ hg -R sub commit -u test -d '0 0' -Am '#0 in sub' | |||
|
371 | adding sa | |||
|
372 | $ echo 'sub = sub' > .hgsub | |||
|
373 | $ touch .hgsubstate | |||
|
374 | $ hg add .hgsub .hgsubstate | |||
|
375 | ||||
|
376 | $ hg qnew -u test -d '0 0' import-at-qnew | |||
|
377 | $ hg -R sub parents --template '{node} sub\n' | |||
|
378 | b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub | |||
|
379 | $ cat .hgsubstate | |||
|
380 | b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub | |||
|
381 | $ hg diff -c tip | |||
|
382 | diff -r f499373e340c -r b20ffac88564 .hgsub | |||
|
383 | --- /dev/null | |||
|
384 | +++ b/.hgsub | |||
|
385 | @@ -0,0 +1,1 @@ | |||
|
386 | +sub = sub | |||
|
387 | diff -r f499373e340c -r b20ffac88564 .hgsubstate | |||
|
388 | --- /dev/null | |||
|
389 | +++ b/.hgsubstate | |||
|
390 | @@ -0,0 +1,1 @@ | |||
|
391 | +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub | |||
|
392 | $ cat .hg/patches/import-at-qnew | |||
|
393 | # HG changeset patch | |||
|
394 | # Parent f499373e340cdca5d01dee904aeb42dd2a325e71 | |||
|
395 | # User test | |||
|
396 | # Date 0 0 | |||
|
397 | ||||
|
398 | diff -r f499373e340c -r b20ffac88564 .hgsub | |||
|
399 | --- /dev/null | |||
|
400 | +++ b/.hgsub | |||
|
401 | @@ -0,0 +1,1 @@ | |||
|
402 | +sub = sub | |||
|
403 | diff -r f499373e340c -r b20ffac88564 .hgsubstate | |||
|
404 | --- /dev/null | |||
|
405 | +++ b/.hgsubstate | |||
|
406 | @@ -0,0 +1,1 @@ | |||
|
407 | +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub | |||
|
408 | $ hg qpop | |||
|
409 | popping import-at-qnew | |||
|
410 | patch queue now empty | |||
|
411 | $ hg qpush | |||
|
412 | applying import-at-qnew | |||
|
413 | now at: import-at-qnew | |||
|
414 | ||||
|
415 | $ cd .. | |||
|
416 | ||||
|
417 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now