diff options
Diffstat (limited to 'tests/test-mq-subrepo.t')
-rw-r--r-- | tests/test-mq-subrepo.t | 185 |
1 files changed, 16 insertions, 169 deletions
diff --git a/tests/test-mq-subrepo.t b/tests/test-mq-subrepo.t index 948006a..ffd880c 100644 --- a/tests/test-mq-subrepo.t +++ b/tests/test-mq-subrepo.t @@ -1,5 +1,3 @@ - $ echo "[ui]" >> $HGRCPATH - $ echo "commitsubrepos = Yes" >> $HGRCPATH $ echo "[extensions]" >> $HGRCPATH $ echo "mq=" >> $HGRCPATH $ echo "record=" >> $HGRCPATH @@ -105,6 +103,7 @@ handle subrepos safely on qnew % update substate when adding .hgsub w/clean updated subrepo A .hgsub % qnew -m0 0.diff + committing subrepository sub path sub source sub revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 @@ -120,6 +119,7 @@ handle subrepos safely on qnew % update substate when modifying .hgsub w/clean updated subrepo M .hgsub % qnew -m1 1.diff + committing subrepository sub2 path sub source sub revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 @@ -164,6 +164,7 @@ handle subrepos safely on qrefresh % update substate when adding .hgsub w/clean updated subrepo A .hgsub % qrefresh + committing subrepository sub path sub source sub revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 @@ -180,6 +181,7 @@ handle subrepos safely on qrefresh % update substate when modifying .hgsub w/clean updated subrepo M .hgsub % qrefresh + committing subrepository sub2 path sub source sub revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 @@ -221,6 +223,7 @@ handle subrepos safely on qpush/qpop $ echo sub = sub > .hgsub $ hg add .hgsub $ hg qnew -m0 0.diff + committing subrepository sub $ hg debugsub path sub source sub @@ -263,7 +266,7 @@ handle subrepos safely on qrecord % qrecord --config ui.interactive=1 -m0 0.diff diff --git a/.hgsub b/.hgsub new file mode 100644 - examine changes to '.hgsub'? [Ynesfdaq?] + examine changes to '.hgsub'? [Ynsfdaq?] abort: uncommitted changes in subrepository sub [255] % update substate when adding .hgsub w/clean updated subrepo @@ -271,7 +274,8 @@ handle subrepos safely on qrecord % qrecord --config ui.interactive=1 -m0 0.diff diff --git a/.hgsub b/.hgsub new file mode 100644 - examine changes to '.hgsub'? [Ynesfdaq?] + examine changes to '.hgsub'? [Ynsfdaq?] + committing subrepository sub path sub source sub revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 @@ -287,11 +291,11 @@ handle subrepos safely on qrecord % qrecord --config ui.interactive=1 -m1 1.diff diff --git a/.hgsub b/.hgsub 1 hunks, 1 lines changed - examine changes to '.hgsub'? [Ynesfdaq?] + examine changes to '.hgsub'? [Ynsfdaq?] @@ -1,1 +1,2 @@ sub = sub +sub2 = sub2 - record this change to '.hgsub'? [Ynesfdaq?] + record this change to '.hgsub'? [Ynsfdaq?] abort: uncommitted changes in subrepository sub2 [255] % update substate when modifying .hgsub w/clean updated subrepo @@ -299,11 +303,12 @@ handle subrepos safely on qrecord % qrecord --config ui.interactive=1 -m1 1.diff diff --git a/.hgsub b/.hgsub 1 hunks, 1 lines changed - examine changes to '.hgsub'? [Ynesfdaq?] + examine changes to '.hgsub'? [Ynsfdaq?] @@ -1,1 +1,2 @@ sub = sub +sub2 = sub2 - record this change to '.hgsub'? [Ynesfdaq?] + record this change to '.hgsub'? [Ynsfdaq?] + committing subrepository sub2 path sub source sub revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 @@ -324,7 +329,7 @@ handle subrepos safely on qrecord % qrecord --config ui.interactive=1 -m2 2.diff diff --git a/.hgsub b/.hgsub deleted file mode 100644 - examine changes to '.hgsub'? [Ynesfdaq?] + examine changes to '.hgsub'? [Ynsfdaq?] % debugsub should be empty $ hg qpop -qa @@ -339,7 +344,7 @@ handle subrepos safely on qrecord % qrecord --config ui.interactive=1 -m3 3.diff diff --git a/.hgsub b/.hgsub deleted file mode 100644 - examine changes to '.hgsub'? [Ynesfdaq?] + examine changes to '.hgsub'? [Ynsfdaq?] % debugsub should be empty $ cd .. @@ -353,162 +358,4 @@ correctly handle subrepos with patch queues $ echo sub = sub >> .hgsub $ hg add .hgsub $ hg qnew 0.diff - - $ cd .. - -check whether MQ operations can import updated .hgsubstate correctly -both into 'revision' and 'patch file under .hg/patches': - - $ hg init importing-hgsubstate - $ cd importing-hgsubstate - - $ echo a > a - $ hg commit -u test -d '0 0' -Am '#0 in parent' - adding a - $ hg init sub - $ echo sa > sub/sa - $ hg -R sub commit -u test -d '0 0' -Am '#0 in sub' - adding sa - $ echo 'sub = sub' > .hgsub - $ touch .hgsubstate - $ hg add .hgsub .hgsubstate - - $ hg qnew -u test -d '0 0' import-at-qnew - $ hg -R sub parents --template '{node} sub\n' - b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub - $ cat .hgsubstate - b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub - $ hg diff -c tip - diff -r f499373e340c -r b20ffac88564 .hgsub - --- /dev/null - +++ b/.hgsub - @@ -0,0 +1,1 @@ - +sub = sub - diff -r f499373e340c -r b20ffac88564 .hgsubstate - --- /dev/null - +++ b/.hgsubstate - @@ -0,0 +1,1 @@ - +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub - $ cat .hg/patches/import-at-qnew - # HG changeset patch - # Parent f499373e340cdca5d01dee904aeb42dd2a325e71 - # User test - # Date 0 0 - - diff -r f499373e340c -r b20ffac88564 .hgsub - --- /dev/null - +++ b/.hgsub - @@ -0,0 +1,1 @@ - +sub = sub - diff -r f499373e340c -r b20ffac88564 .hgsubstate - --- /dev/null - +++ b/.hgsubstate - @@ -0,0 +1,1 @@ - +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub - $ hg qpop - popping import-at-qnew - patch queue now empty - $ hg qpush - applying import-at-qnew - now at: import-at-qnew - - $ hg qnew import-at-qrefresh - $ echo sb > sub/sb - $ hg -R sub commit -u test -d '0 0' -Am '#1 in sub' - adding sb - $ hg qrefresh -u test -d '0 0' - $ hg -R sub parents --template '{node} sub\n' - 88ac1bef5ed43b689d1d200b59886b675dec474b sub - $ cat .hgsubstate - 88ac1bef5ed43b689d1d200b59886b675dec474b sub - $ hg diff -c tip - diff -r 44f846335325 -r b3e8c5fa3aaa .hgsubstate - --- a/.hgsubstate - +++ b/.hgsubstate - @@ -1,1 +1,1 @@ - -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub - +88ac1bef5ed43b689d1d200b59886b675dec474b sub - $ cat .hg/patches/import-at-qrefresh - # HG changeset patch - # Date 0 0 - # User test - # Parent 44f846335325209be6be35dc2c9a4be107278c09 - - diff -r 44f846335325 .hgsubstate - --- a/.hgsubstate - +++ b/.hgsubstate - @@ -1,1 +1,1 @@ - -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub - +88ac1bef5ed43b689d1d200b59886b675dec474b sub - - $ hg qrefresh -u test -d '0 0' - $ cat .hgsubstate - 88ac1bef5ed43b689d1d200b59886b675dec474b sub - $ hg diff -c tip - diff -r 44f846335325 -r b3e8c5fa3aaa .hgsubstate - --- a/.hgsubstate - +++ b/.hgsubstate - @@ -1,1 +1,1 @@ - -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub - +88ac1bef5ed43b689d1d200b59886b675dec474b sub - $ cat .hg/patches/import-at-qrefresh - # HG changeset patch - # Date 0 0 - # User test - # Parent 44f846335325209be6be35dc2c9a4be107278c09 - - diff -r 44f846335325 .hgsubstate - --- a/.hgsubstate - +++ b/.hgsubstate - @@ -1,1 +1,1 @@ - -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub - +88ac1bef5ed43b689d1d200b59886b675dec474b sub - - $ hg update -C tip - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ hg qpop -a - popping import-at-qrefresh - popping import-at-qnew - patch queue now empty - - $ hg -R sub update -C 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ echo 'sub = sub' > .hgsub - $ hg commit -Am '#1 in parent' - adding .hgsub - $ hg -R sub update -C 1 - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ hg commit -Am '#2 in parent (but be rollbacked soon)' - $ hg rollback - repository tip rolled back to revision 1 (undo commit) - working directory now based on revision 1 - $ hg status - M .hgsubstate - $ hg qnew -u test -d '0 0' checkstate-at-qnew - $ hg -R sub parents --template '{node} sub\n' - 88ac1bef5ed43b689d1d200b59886b675dec474b sub - $ cat .hgsubstate - 88ac1bef5ed43b689d1d200b59886b675dec474b sub - $ hg diff -c tip - diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate - --- a/.hgsubstate - +++ b/.hgsubstate - @@ -1,1 +1,1 @@ - -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub - +88ac1bef5ed43b689d1d200b59886b675dec474b sub - $ cat .hg/patches/checkstate-at-qnew - # HG changeset patch - # Parent 4d91eb2fa1d1b22ec513347b9cd06f6b49d470fa - # User test - # Date 0 0 - - diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate - --- a/.hgsubstate - +++ b/.hgsubstate - @@ -1,1 +1,1 @@ - -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub - +88ac1bef5ed43b689d1d200b59886b675dec474b sub - - $ cd .. - - $ cd .. + committing subrepository sub |