##// END OF EJS Templates
mq: add ".hgsubstate" to patch target list only if it is not listed up yet...
FUJIWARA Katsunori -
r17151:986df524 default
parent child Browse files
Show More
@@ -1064,6 +1064,11 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 for files in changes[:3]:
1068 if '.hgsubstate' in files:
1069 break # already listed up
1070 else:
1071 # not yet listed up
1067 if substatestate in 'a?':
1072 if substatestate in 'a?':
1068 changes[1].append('.hgsubstate')
1073 changes[1].append('.hgsubstate')
1069 elif substatestate in 'r':
1074 elif substatestate in 'r':
@@ -355,3 +355,63 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