tests/test-mq-subrepo.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Wed, 27 Jun 2012 22:03:27 +0900
changeset 17153 54da604fefee
parent 17152 f287d4a62031
child 17529 b61a62714346
permissions -rw-r--r--
mq: check subrepo synchronizations against parent of workdir or other appropriate context Before this patch, MQ checks each subrepo synchronizations against the working directory context, so ".hgsubstate" updating is not imported into MQ revision correctly in cases below: - qrefresh when current ".hgsubstate" is already synchronized with each subrepos: you can reproduce this easily by just twice or more qrefresh invocations - qnew just after rollback of commit which updates ".hgsubstate" This patch resolves this by checking subrepo states against: - the parent of "qtop" for qrefresh, or - the parent of working context otherwise
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
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
    97
  $ testadd qnew -m0 0.diff
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
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   102
  % qnew -m0 0.diff
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
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   107
  % qnew -m0 0.diff
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
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   112
  $ testmod qnew -m1 1.diff
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
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   117
  % qnew -m1 1.diff
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
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   122
  % qnew -m1 1.diff
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
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   216
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   217
  $ mkrepo repo-2499-qpush
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   218
  $ mksubrepo sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   219
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   220
  $ hg -R sub ci -m0sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   221
  $ echo sub = sub > .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   222
  $ hg add .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   223
  $ hg qnew -m0 0.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   224
  $ hg debugsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   225
  path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   226
   source   sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   227
   revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   228
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   229
qpop
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   230
  $ hg qpop
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   231
  popping 0.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   232
  patch queue now empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   233
  $ hg status -AS
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   234
  $ hg debugsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   235
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   236
qpush
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   237
  $ hg qpush
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   238
  applying 0.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   239
  now at: 0.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   240
  $ hg status -AS
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   241
  C .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   242
  C .hgsubstate
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   243
  C sub/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   244
  $ hg debugsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   245
  path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   246
   source   sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   247
   revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   248
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   249
  $ cd ..
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   250
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   251
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   252
handle subrepos safely on qrecord
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   253
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   254
  $ mkrepo repo-2499-qrecord
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   255
  $ 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
   256
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   257
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   258
  > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   259
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   260
  % abort when adding .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   261
  A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   262
  A sub/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   263
  % 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
   264
  diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   265
  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
   266
  examine changes to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   267
  abort: uncommitted changes in subrepository sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   268
  [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   269
  % 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
   270
  A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   271
  % 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
   272
  diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   273
  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
   274
  examine changes to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   275
  path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   276
   source   sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   277
   revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
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
  $ 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
   280
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   281
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   282
  > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   283
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   284
  % abort when modifying .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   285
  M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   286
  A sub2/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   287
  % 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
   288
  diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   289
  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
   290
  examine changes to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   291
  @@ -1,1 +1,2 @@
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   292
   sub = sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   293
  +sub2 = sub2
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16073
diff changeset
   294
  record this change 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 sub2
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 modifying .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   298
  M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   299
  % 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
   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
  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
   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
  @@ -1,1 +1,2 @@
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   304
   sub = sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   305
  +sub2 = sub2
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 16073
diff changeset
   306
  record this change to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   307
  path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   308
   source   sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   309
   revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   310
  path sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   311
   source   sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   312
   revision 1f94c7611cc6b74f5a17b16121a1170d44776845
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   313
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   314
  $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   315
  patch queue now empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
   316
  $ 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
   317
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   318
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   319
  > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   320
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   321
  % 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
   322
  M sub3/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   323
  R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   324
  % 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
   325
  diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   326
  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
   327
  examine changes to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   328
  % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   329
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   330
  $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   331
  patch queue now empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
   332
  $ 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
   333
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   334
  > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   335
  > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   336
  adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   337
  % 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
   338
  R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   339
  % 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
   340
  diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   341
  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
   342
  examine changes to '.hgsub'? [Ynesfdaq?] 
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   343
  % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   344
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
   345
  $ cd ..
14898
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   346
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   347
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   348
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
   349
  $ 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
   350
  $ mksubrepo sub
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   351
  adding a
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   352
  $ 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
   353
  $ echo sub = sub >> .hgsub
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   354
  $ hg add .hgsub
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
   355
  $ hg qnew 0.diff
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16324
diff changeset
   356
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16324
diff changeset
   357
  $ 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
   358
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
   359
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
   360
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
   361
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
   362
  $ 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
   363
  $ 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
   364
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
   365
  $ 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
   366
  $ 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
   367
  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
   368
  $ 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
   369
  $ 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
   370
  $ 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
   371
  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
   372
  $ 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
   373
  $ 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
   374
  $ 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
   375
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
   376
  $ 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
   377
  $ 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
   378
  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
   379
  $ 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
   380
  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
   381
  $ hg diff -c tip
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
   382
  diff -r f499373e340c -r b20ffac88564 .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
   383
  --- /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
   384
  +++ 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
   385
  @@ -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
   386
  +sub = 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
   387
  diff -r f499373e340c -r b20ffac88564 .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
   388
  --- /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
   389
  +++ 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
   390
  @@ -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
   391
  +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
   392
  $ 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
   393
  # 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
   394
  # 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
   395
  # 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
   396
  # 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
   397
  
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
  diff -r f499373e340c -r b20ffac88564 .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
   399
  --- /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
   400
  +++ 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
   401
  @@ -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
   402
  +sub = 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
   403
  diff -r f499373e340c -r b20ffac88564 .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
   404
  --- /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
   405
  +++ 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
   406
  @@ -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
   407
  +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
   408
  $ 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
   409
  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
   410
  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
   411
  $ 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
   412
  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
   413
  now at: 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
   414
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
   415
  $ 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
   416
  $ 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
   417
  $ 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
   418
  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
   419
  $ 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
   420
  $ 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
   421
  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
   422
  $ 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
   423
  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
   424
  $ hg diff -c tip
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
   425
  diff -r 44f846335325 -r b3e8c5fa3aaa .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
   426
  --- 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
   427
  +++ 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
   428
  @@ -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
   429
  -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
   430
  +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
   431
  $ 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
   432
  # 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
   433
  # 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
   434
  # User test
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
   435
  # Parent 44f846335325209be6be35dc2c9a4be107278c09
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
   436
  
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
   437
  diff -r 44f846335325 .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
   438
  --- 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
   439
  +++ 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
   440
  @@ -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
   441
  -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
   442
  +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
   443
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
   444
  $ 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
   445
  $ 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
   446
  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
   447
  $ 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
   448
  diff -r 44f846335325 -r b3e8c5fa3aaa .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
   449
  --- 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
   450
  +++ 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
   451
  @@ -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
   452
  -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
   453
  +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
   454
  $ 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
   455
  # 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
   456
  # 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
   457
  # 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
   458
  # Parent 44f846335325209be6be35dc2c9a4be107278c09
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   459
  
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   460
  diff -r 44f846335325 .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
   461
  --- 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
   462
  +++ 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
   463
  @@ -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
   464
  -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
   465
  +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
   466
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   467
  $ 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
   468
  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
   469
  $ 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
   470
  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
   471
  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
   472
  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
   473
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   474
  $ 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
   475
  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
   476
  $ 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
   477
  $ 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
   478
  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
   479
  $ 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
   480
  1 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
   481
  $ hg commit -Am '#2 in parent (but be rollbacked soon)'
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
   482
  $ 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
   483
  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
   484
  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
   485
  $ 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
   486
  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
   487
  $ 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
   488
  $ 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
   489
  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
   490
  $ 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
   491
  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
   492
  $ 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
   493
  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
   494
  --- 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
   495
  +++ 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
   496
  @@ -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
   497
  -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
   498
  +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
   499
  $ 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
   500
  # 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
   501
  # 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
   502
  # 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
   503
  # 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
   504
  
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
  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
   506
  --- 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
   507
  +++ 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
   508
  @@ -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
   509
  -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
   510
  +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
   511
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
   512
  $ 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
   513
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
   514
  $ cd ..