tests/test-mq-subrepo.t
author Gregory Szorc <gregory.szorc@gmail.com>
Sun, 20 Apr 2014 11:29:39 -0700
changeset 21428 3df2ecf8d545
parent 20827 ca5dd216cb62
child 22520 9d4ebb75de53
permissions -rw-r--r--
run-tests: start to report test results against TestResult Previously, our unittest wrapper didn't report results properly. We now properly report failures. We had to rename the local variable to prevent "t" from being overwritten in the local scope.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 14898
diff changeset
     1
  $ echo "[ui]" >> $HGRCPATH
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 14898
diff changeset
     2
  $ echo "commitsubrepos = Yes" >> $HGRCPATH
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     3
  $ echo "[extensions]" >> $HGRCPATH
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     4
  $ echo "mq=" >> $HGRCPATH
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     5
  $ echo "record=" >> $HGRCPATH
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     6
  $ echo "[diff]" >> $HGRCPATH
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     7
  $ echo "nodates=1" >> $HGRCPATH
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
     8
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
     9
  $ stdin=`pwd`/stdin.tmp
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    10
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    11
fn to create new repository w/dirty subrepo, and cd into it
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    12
  $ mkrepo() {
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    13
  >     hg init $1
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    14
  >     cd $1
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    15
  >     hg qinit
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    16
  > }
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    17
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    18
fn to create dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    19
  $ mksubrepo() {
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    20
  >     hg init $1
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    21
  >     cd $1
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    22
  >     echo a > a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    23
  >     hg add
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    24
  >     cd ..
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    25
  > }
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    26
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    27
  $ testadd() {
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    28
  >     cat - > "$stdin"
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    29
  >     mksubrepo sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    30
  >     echo sub = sub >> .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    31
  >     hg add .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    32
  >     echo % abort when adding .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    33
  >     hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    34
  >     echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    35
  >     cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    36
  >     echo [$?]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    37
  >     hg -R sub ci -m0sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    38
  >     echo % update substate when adding .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    39
  >     hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    40
  >     echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    41
  >     cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    42
  >     hg debugsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    43
  > }
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    44
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    45
  $ testmod() {
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    46
  >     cat - > "$stdin"
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    47
  >     mksubrepo sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    48
  >     echo sub2 = sub2 >> .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    49
  >     echo % abort when modifying .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    50
  >     hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    51
  >     echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    52
  >     cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    53
  >     echo [$?]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    54
  >     hg -R sub2 ci -m0sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    55
  >     echo % update substate when modifying .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    56
  >     hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    57
  >     echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    58
  >     cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    59
  >     hg debugsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    60
  > }
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    61
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    62
  $ testrm1() {
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    63
  >     cat - > "$stdin"
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    64
  >     mksubrepo sub3
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    65
  >     echo sub3 = sub3 >> .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    66
  >     hg ci -Aqmsub3
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    67
  >     $EXTRA
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    68
  >     echo b >> sub3/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    69
  >     hg rm .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    70
  >     echo % update substate when removing .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    71
  >     hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    72
  >     echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    73
  >     cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    74
  >     echo % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    75
  >     hg debugsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    76
  > }
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    77
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    78
  $ testrm2() {
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    79
  >     cat - > "$stdin"
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    80
  >     mksubrepo sub4
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    81
  >     echo sub4 = sub4 >> .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    82
  >     hg ci -Aqmsub4
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    83
  >     $EXTRA
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    84
  >     hg rm .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    85
  >     echo % update substate when removing .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    86
  >     hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    87
  >     echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
    88
  >     cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    89
  >     echo % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    90
  >     hg debugsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    91
  > }
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    92
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    93
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    94
handle subrepos safely on qnew
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    95
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    96
  $ mkrepo repo-2499-qnew
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
    97
  $ testadd qnew -X path:no-effect -m0 0.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    98
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    99
  % abort when adding .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   100
  A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   101
  A sub/a
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
   102
  % qnew -X path:no-effect -m0 0.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   103
  abort: uncommitted changes in subrepository sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   104
  [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   105
  % update substate when adding .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   106
  A .hgsub
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
   107
  % qnew -X path:no-effect -m0 0.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   108
  path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   109
   source   sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   110
   revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   111
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
   112
  $ testmod qnew --cwd .. -R repo-2499-qnew -X path:no-effect -m1 1.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   113
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   114
  % abort when modifying .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   115
  M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   116
  A sub2/a
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
   117
  % qnew --cwd .. -R repo-2499-qnew -X path:no-effect -m1 1.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   118
  abort: uncommitted changes in subrepository sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   119
  [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   120
  % update substate when modifying .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   121
  M .hgsub
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
   122
  % qnew --cwd .. -R repo-2499-qnew -X path:no-effect -m1 1.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   123
  path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   124
   source   sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   125
   revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   126
  path sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   127
   source   sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   128
   revision 1f94c7611cc6b74f5a17b16121a1170d44776845
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   129
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   130
  $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   131
  patch queue now empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   132
  $ testrm1 qnew -m2 2.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   133
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   134
  % update substate when removing .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   135
  M sub3/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   136
  R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   137
  % qnew -m2 2.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   138
  % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   139
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   140
  $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   141
  patch queue now empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   142
  $ testrm2 qnew -m3 3.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   143
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   144
  % update substate when removing .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   145
  R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   146
  % qnew -m3 3.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   147
  % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   148
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   149
  $ cd ..
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   150
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   151
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   152
handle subrepos safely on qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   153
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   154
  $ mkrepo repo-2499-qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   155
  $ hg qnew -m0 0.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   156
  $ testadd qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   157
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   158
  % abort when adding .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   159
  A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   160
  A sub/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   161
  % qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   162
  abort: uncommitted changes in subrepository sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   163
  [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   164
  % update substate when adding .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   165
  A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   166
  % qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   167
  path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   168
   source   sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   169
   revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   170
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   171
  $ hg qnew -m1 1.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   172
  $ testmod qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   173
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   174
  % abort when modifying .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   175
  M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   176
  A sub2/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   177
  % qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   178
  abort: uncommitted changes in subrepository sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   179
  [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   180
  % update substate when modifying .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   181
  M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   182
  % qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   183
  path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   184
   source   sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   185
   revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   186
  path sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   187
   source   sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   188
   revision 1f94c7611cc6b74f5a17b16121a1170d44776845
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   189
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   190
  $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   191
  patch queue now empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
   192
  $ EXTRA='hg qnew -m2 2.diff'
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
   193
  $ testrm1 qrefresh
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   194
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   195
  % update substate when removing .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   196
  M sub3/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   197
  R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   198
  % qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   199
  % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   200
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   201
  $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   202
  patch queue now empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
   203
  $ EXTRA='hg qnew -m3 3.diff'
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
   204
  $ testrm2 qrefresh
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   205
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   206
  % update substate when removing .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   207
  R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   208
  % qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   209
  % debugsub should be empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
   210
  $ EXTRA=
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   211
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   212
  $ cd ..
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   213
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   214
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   215
handle subrepos safely on qpush/qpop
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   216
(and we cannot qpop / qpush with a modified subrepo)
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   217
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   218
  $ mkrepo repo-2499-qpush
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   219
  $ mksubrepo sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   220
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   221
  $ hg -R sub ci -m0sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   222
  $ echo sub = sub > .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   223
  $ hg add .hgsub
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   224
  $ hg commit -m0
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   225
  $ hg debugsub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   226
  path sub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   227
   source   sub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   228
   revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   229
  $ echo foo > ./sub/a
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   230
  $ hg -R sub commit -m foo
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   231
  $ hg commit -m1
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   232
  $ hg qimport -r "0:tip"
19638
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
   233
  $ hg -R sub id --id
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
   234
  aa037b301eba
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   235
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   236
qpop
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   237
  $ hg -R sub update 0000
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   238
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   239
  $ hg qpop
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   240
  abort: local changed subrepos found, refresh first
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   241
  [255]
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   242
  $ hg revert sub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   243
  reverting subrepo sub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   244
  adding sub/a
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   245
  $ hg qpop
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   246
  popping 1.diff
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   247
  now at: 0.diff
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   248
  $ hg status -AS
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   249
  C .hgsub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   250
  C .hgsubstate
19638
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
   251
  C sub/a
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
   252
  $ hg -R sub id --id
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
   253
  b2fdb12cd82b
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   254
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   255
qpush
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   256
  $ hg -R sub update 0000
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   257
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   258
  $ hg qpush
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   259
  abort: local changed subrepos found, refresh first
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   260
  [255]
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   261
  $ hg revert sub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   262
  reverting subrepo sub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   263
  adding sub/a
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   264
  $ hg qpush
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   265
  applying 1.diff
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19638
diff changeset
   266
   subrepository sub diverged (local revision: b2fdb12cd82b, remote revision: aa037b301eba)
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19638
diff changeset
   267
  (M)erge, keep (l)ocal or keep (r)emote? m
19638
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
   268
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
   269
  now at: 1.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   270
  $ hg status -AS
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   271
  C .hgsub
19638
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
   272
  C .hgsubstate
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   273
  C sub/a
19638
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
   274
  $ hg -R sub id --id
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
   275
  aa037b301eba
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   276
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   277
  $ cd ..
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   278
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   279
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   280
handle subrepos safely on qrecord
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   281
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   282
  $ mkrepo repo-2499-qrecord
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   283
  $ testadd qrecord --config ui.interactive=1 -m0 0.diff <<EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   284
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   285
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   286
  > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   287
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   288
  % abort when adding .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   289
  A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   290
  A sub/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   291
  % qrecord --config ui.interactive=1 -m0 0.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   292
  diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   293
  new file mode 100644
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16073
diff changeset
   294
  examine changes to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   295
  abort: uncommitted changes in subrepository sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   296
  [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   297
  % update substate when adding .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   298
  A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   299
  % qrecord --config ui.interactive=1 -m0 0.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   300
  diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   301
  new file mode 100644
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16073
diff changeset
   302
  examine changes to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   303
  path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   304
   source   sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   305
   revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   306
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   307
  $ testmod qrecord --config ui.interactive=1 -m1 1.diff <<EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   308
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   309
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   310
  > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   311
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   312
  % abort when modifying .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   313
  M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   314
  A sub2/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   315
  % qrecord --config ui.interactive=1 -m1 1.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   316
  diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   317
  1 hunks, 1 lines changed
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16073
diff changeset
   318
  examine changes to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   319
  @@ -1,1 +1,2 @@
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   320
   sub = sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   321
  +sub2 = sub2
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16073
diff changeset
   322
  record this change to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   323
  abort: uncommitted changes in subrepository sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   324
  [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   325
  % update substate when modifying .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   326
  M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   327
  % qrecord --config ui.interactive=1 -m1 1.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   328
  diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   329
  1 hunks, 1 lines changed
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16073
diff changeset
   330
  examine changes to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   331
  @@ -1,1 +1,2 @@
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   332
   sub = sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   333
  +sub2 = sub2
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16073
diff changeset
   334
  record this change to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   335
  path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   336
   source   sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   337
   revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   338
  path sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   339
   source   sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   340
   revision 1f94c7611cc6b74f5a17b16121a1170d44776845
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   341
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   342
  $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   343
  patch queue now empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
   344
  $ testrm1 qrecord --config ui.interactive=1 -m2 2.diff <<EOF
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   345
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   346
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   347
  > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   348
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   349
  % update substate when removing .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   350
  M sub3/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   351
  R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   352
  % qrecord --config ui.interactive=1 -m2 2.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   353
  diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   354
  deleted file mode 100644
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16073
diff changeset
   355
  examine changes to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   356
  % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   357
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   358
  $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   359
  patch queue now empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
   360
  $ testrm2 qrecord --config ui.interactive=1 -m3 3.diff <<EOF
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   361
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   362
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   363
  > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   364
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   365
  % update substate when removing .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   366
  R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   367
  % qrecord --config ui.interactive=1 -m3 3.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   368
  diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   369
  deleted file mode 100644
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16073
diff changeset
   370
  examine changes to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   371
  % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   372
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   373
  $ cd ..
14898
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   374
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   375
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   376
correctly handle subrepos with patch queues
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   377
  $ mkrepo repo-subrepo-with-queue
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   378
  $ mksubrepo sub
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   379
  adding a
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   380
  $ hg -R sub qnew sub0.diff
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   381
  $ echo sub = sub >> .hgsub
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   382
  $ hg add .hgsub
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   383
  $ hg qnew 0.diff
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16324
diff changeset
   384
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16324
diff changeset
   385
  $ cd ..
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   386
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   387
check whether MQ operations can import updated .hgsubstate correctly
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   388
both into 'revision' and 'patch file under .hg/patches':
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   389
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   390
  $ hg init importing-hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   391
  $ cd importing-hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   392
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   393
  $ echo a > a
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   394
  $ hg commit -u test -d '0 0' -Am '#0 in parent'
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   395
  adding a
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   396
  $ hg init sub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   397
  $ echo sa > sub/sa
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   398
  $ hg -R sub commit -u test -d '0 0' -Am '#0 in sub'
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   399
  adding sa
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   400
  $ echo 'sub = sub' > .hgsub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   401
  $ touch .hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   402
  $ hg add .hgsub .hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   403
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   404
  $ hg qnew -u test -d '0 0' import-at-qnew
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   405
  $ hg -R sub parents --template '{node} sub\n'
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   406
  b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   407
  $ cat .hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   408
  b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   409
  $ hg diff -c tip
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   410
  diff -r f499373e340c -r f69e96d86e75 .hgsub
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   411
  --- /dev/null
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   412
  +++ b/.hgsub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   413
  @@ -0,0 +1,1 @@
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   414
  +sub = sub
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   415
  diff -r f499373e340c -r f69e96d86e75 .hgsubstate
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   416
  --- /dev/null
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   417
  +++ b/.hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   418
  @@ -0,0 +1,1 @@
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   419
  +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   420
  $ cat .hg/patches/import-at-qnew
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   421
  # HG changeset patch
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   422
  # Parent f499373e340cdca5d01dee904aeb42dd2a325e71
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   423
  # User test
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   424
  # Date 0 0
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   425
  
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   426
  diff -r f499373e340c -r f69e96d86e75 .hgsub
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   427
  --- /dev/null
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   428
  +++ b/.hgsub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   429
  @@ -0,0 +1,1 @@
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   430
  +sub = sub
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   431
  diff -r f499373e340c -r f69e96d86e75 .hgsubstate
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   432
  --- /dev/null
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   433
  +++ b/.hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   434
  @@ -0,0 +1,1 @@
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   435
  +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   436
  $ hg parents --template '{node}\n'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   437
  f69e96d86e75a6d4fd88285dc9697acb23951041
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   438
  $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   439
  .hgsub .hgsubstate
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   440
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   441
check also whether qnew not including ".hgsubstate" explicitly causes
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   442
as same result (in node hash) as one including it.
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   443
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   444
  $ hg qpop -a -q
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   445
  patch queue now empty
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   446
  $ hg qdelete import-at-qnew
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   447
  $ echo 'sub = sub' > .hgsub
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   448
  $ hg add .hgsub
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   449
  $ rm -f .hgsubstate
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   450
  $ hg qnew -u test -d '0 0' import-at-qnew
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   451
  $ hg parents --template '{node}\n'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   452
  f69e96d86e75a6d4fd88285dc9697acb23951041
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   453
  $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   454
  .hgsub .hgsubstate
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   455
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   456
check whether qrefresh imports updated .hgsubstate correctly
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   457
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   458
  $ hg qpop
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   459
  popping import-at-qnew
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   460
  patch queue now empty
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   461
  $ hg qpush
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   462
  applying import-at-qnew
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   463
  now at: import-at-qnew
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   464
  $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   465
  .hgsub .hgsubstate
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   466
17152
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   467
  $ hg qnew import-at-qrefresh
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   468
  $ echo sb > sub/sb
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   469
  $ hg -R sub commit -u test -d '0 0' -Am '#1 in sub'
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   470
  adding sb
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   471
  $ hg qrefresh -u test -d '0 0'
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   472
  $ hg -R sub parents --template '{node} sub\n'
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   473
  88ac1bef5ed43b689d1d200b59886b675dec474b sub
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   474
  $ cat .hgsubstate
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   475
  88ac1bef5ed43b689d1d200b59886b675dec474b sub
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   476
  $ hg diff -c tip
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   477
  diff -r 05b056bb9c8c -r d987bec230f4 .hgsubstate
17152
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   478
  --- a/.hgsubstate
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   479
  +++ b/.hgsubstate
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   480
  @@ -1,1 +1,1 @@
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   481
  -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   482
  +88ac1bef5ed43b689d1d200b59886b675dec474b sub
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   483
  $ cat .hg/patches/import-at-qrefresh
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   484
  # HG changeset patch
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   485
  # Date 0 0
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   486
  # User test
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   487
  # Parent 05b056bb9c8c05ff15258b84fd42ab3527271033
17152
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   488
  
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   489
  diff -r 05b056bb9c8c .hgsubstate
17152
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   490
  --- a/.hgsubstate
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   491
  +++ b/.hgsubstate
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   492
  @@ -1,1 +1,1 @@
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   493
  -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   494
  +88ac1bef5ed43b689d1d200b59886b675dec474b sub
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   495
  $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   496
  .hgsubstate
17152
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
   497
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   498
  $ hg qrefresh -u test -d '0 0'
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   499
  $ cat .hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   500
  88ac1bef5ed43b689d1d200b59886b675dec474b sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   501
  $ hg diff -c tip
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   502
  diff -r 05b056bb9c8c -r d987bec230f4 .hgsubstate
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   503
  --- a/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   504
  +++ b/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   505
  @@ -1,1 +1,1 @@
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   506
  -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   507
  +88ac1bef5ed43b689d1d200b59886b675dec474b sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   508
  $ cat .hg/patches/import-at-qrefresh
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   509
  # HG changeset patch
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   510
  # Date 0 0
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   511
  # User test
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   512
  # Parent 05b056bb9c8c05ff15258b84fd42ab3527271033
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   513
  
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   514
  diff -r 05b056bb9c8c .hgsubstate
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   515
  --- a/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   516
  +++ b/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   517
  @@ -1,1 +1,1 @@
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   518
  -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   519
  +88ac1bef5ed43b689d1d200b59886b675dec474b sub
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   520
  $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   521
  .hgsubstate
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   522
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   523
  $ hg update -C tip
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   524
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   525
  $ hg qpop -a
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   526
  popping import-at-qrefresh
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   527
  popping import-at-qnew
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   528
  patch queue now empty
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   529
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   530
  $ hg -R sub update -C 0
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   531
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   532
  $ echo 'sub = sub' > .hgsub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   533
  $ hg commit -Am '#1 in parent'
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   534
  adding .hgsub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   535
  $ hg -R sub update -C 1
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   536
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17537
31f32a96e1e3 Merge spelling fixes
Bryan O'Sullivan <bryano@fb.com>
parents: 17529
diff changeset
   537
  $ hg commit -Am '#2 in parent (but will be rolled back soon)'
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   538
  $ hg rollback
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   539
  repository tip rolled back to revision 1 (undo commit)
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   540
  working directory now based on revision 1
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   541
  $ hg status
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   542
  M .hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   543
  $ hg qnew -u test -d '0 0' checkstate-at-qnew
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   544
  $ hg -R sub parents --template '{node} sub\n'
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   545
  88ac1bef5ed43b689d1d200b59886b675dec474b sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   546
  $ cat .hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   547
  88ac1bef5ed43b689d1d200b59886b675dec474b sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   548
  $ hg diff -c tip
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   549
  diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   550
  --- a/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   551
  +++ b/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   552
  @@ -1,1 +1,1 @@
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   553
  -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   554
  +88ac1bef5ed43b689d1d200b59886b675dec474b sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   555
  $ cat .hg/patches/checkstate-at-qnew
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   556
  # HG changeset patch
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   557
  # Parent 4d91eb2fa1d1b22ec513347b9cd06f6b49d470fa
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   558
  # User test
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   559
  # Date 0 0
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   560
  
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   561
  diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   562
  --- a/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   563
  +++ b/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   564
  @@ -1,1 +1,1 @@
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   565
  -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   566
  +88ac1bef5ed43b689d1d200b59886b675dec474b sub
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   567
  $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   568
  .hgsubstate
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   569
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   570
check whether qrefresh not including ".hgsubstate" explicitly causes
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   571
as same result (in node hash) as one including it.
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   572
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   573
  $ hg update -C -q 0
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   574
  $ hg qpop -a -q
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   575
  patch queue now empty
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   576
  $ hg qnew -u test -d '0 0' add-hgsub-at-qrefresh
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   577
  $ echo 'sub = sub' > .hgsub
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   578
  $ echo > .hgsubstate
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   579
  $ hg add .hgsub .hgsubstate
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   580
  $ hg qrefresh -u test -d '0 0'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   581
  $ hg parents --template '{node}\n'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   582
  7c48c35501aae6770ed9c2517014628615821a8e
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   583
  $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   584
  .hgsub .hgsubstate
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   585
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   586
  $ hg qpop -a -q
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   587
  patch queue now empty
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   588
  $ hg qdelete add-hgsub-at-qrefresh
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   589
  $ hg qnew -u test -d '0 0' add-hgsub-at-qrefresh
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   590
  $ echo 'sub = sub' > .hgsub
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   591
  $ hg add .hgsub
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   592
  $ rm -f .hgsubstate
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   593
  $ hg qrefresh -u test -d '0 0'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   594
  $ hg parents --template '{node}\n'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   595
  7c48c35501aae6770ed9c2517014628615821a8e
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   596
  $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
   597
  .hgsub .hgsubstate
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
   598
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   599
  $ cd ..
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   600
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
   601
  $ cd ..