tests/test-shelve.t
author Joerg Sonnenberger <joerg@bec.de>
Sun, 30 Jun 2024 14:16:43 +0200
changeset 51830 208698117124
parent 51643 96cb63a86ee5
child 52088 51057ab0dffa
permissions -rw-r--r--
http: use urllib's cookie handler Split the logic for loading the cookies based on the configuration in a helper function and otherwise use the library implementation directly.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39519
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
     1
#testcases stripbased phasebased
49507
f0a3aaa07d6a shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48969
diff changeset
     2
#testcases dirstate-v1 dirstate-v2
f0a3aaa07d6a shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48969
diff changeset
     3
f0a3aaa07d6a shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48969
diff changeset
     4
#if dirstate-v2
f0a3aaa07d6a shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48969
diff changeset
     5
  $ cat >> $HGRCPATH << EOF
f0a3aaa07d6a shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48969
diff changeset
     6
  > [format]
f0a3aaa07d6a shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48969
diff changeset
     7
  > use-dirstate-v2=1
f0a3aaa07d6a shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48969
diff changeset
     8
  > [storage]
f0a3aaa07d6a shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48969
diff changeset
     9
  > dirstate-v2.slow-path=allow
f0a3aaa07d6a shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48969
diff changeset
    10
  > EOF
f0a3aaa07d6a shelve: do not add the dirstate backup to the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48969
diff changeset
    11
#endif
39519
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    12
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
    13
  $ cat <<EOF >> $HGRCPATH
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
    14
  > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
    15
  > mq =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
    16
  > [defaults]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
    17
  > diff = --nodates --git
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
    18
  > qnew = --date '0 0'
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
    19
  > [shelve]
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
    20
  > maxbackups = 2
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
    21
  > EOF
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    22
39519
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    23
#if phasebased
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    24
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    25
  $ cat <<EOF >> $HGRCPATH
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    26
  > [format]
49452
74fb1842f8b9 phase: rename the requirement for internal-phase (BC)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49432
diff changeset
    27
  > use-internal-phase = yes
39519
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    28
  > EOF
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    29
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    30
#endif
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    31
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    32
  $ hg init repo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    33
  $ cd repo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    34
  $ mkdir a b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    35
  $ echo a > a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    36
  $ echo b > b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    37
  $ echo c > c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    38
  $ echo d > d
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    39
  $ echo x > x
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    40
  $ hg addremove -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    41
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    42
shelve has a help message
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    43
  $ hg shelve -h
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    44
  hg shelve [OPTION]... [FILE]...
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    45
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    46
  save and set aside changes from the working directory
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    47
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    48
      Shelving takes files that "hg status" reports as not clean, saves the
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    49
      modifications to a bundle (a shelved change), and reverts the files so
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    50
      that their state in the working directory becomes clean.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    51
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    52
      To restore these changes to the working directory, using "hg unshelve";
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    53
      this will work even if you switch to a different commit.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    54
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    55
      When no files are specified, "hg shelve" saves all not-clean files. If
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    56
      specific files or directories are named, only changes to those files are
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    57
      shelved.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    58
  
30419
819f96b82fa4 shelve: add missing space in help text
Mads Kiilerich <madski@unity3d.com>
parents: 30152
diff changeset
    59
      In bare shelve (when no files are specified, without interactive, include
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
    60
      and exclude option), shelving remembers information if the working
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
    61
      directory was on newly created branch, in other words working directory
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
    62
      was on different branch than its first parent. In this situation
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
    63
      unshelving restores branch information to the working directory.
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
    64
  
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    65
      Each shelved change has a name that makes it easier to find later. The
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    66
      name of a shelved change defaults to being based on the active bookmark,
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    67
      or if there is no active bookmark, the current named branch.  To specify a
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    68
      different name, use "--name".
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    69
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    70
      To see a list of existing shelved changes, use the "--list" option. For
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    71
      each shelved change, this will print its name, age, and description; use "
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    72
      --patch" or "--stat" for more details.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    73
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    74
      To delete specific shelved changes, use "--delete". To delete all shelved
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    75
      changes, use "--cleanup".
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    76
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    77
  options ([+] can be repeated):
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    78
  
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    79
   -A --addremove           mark new/missing files as added/removed before
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    80
                            shelving
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    81
   -u --unknown             store unknown files in the shelve
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    82
      --cleanup             delete all shelved changes
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    83
      --date DATE           shelve with the specified commit date
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    84
   -d --delete              delete the named shelved change(s)
41010
e8e2a7656e83 help: hide default value for default-off flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 41009
diff changeset
    85
   -e --edit                invoke editor on commit messages
42011
22278dae287c shelve: new keep option
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 41010
diff changeset
    86
   -k --keep                shelve, but keep changes in the working directory
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    87
   -l --list                list current shelves
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    88
   -m --message TEXT        use text as shelve message
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    89
   -n --name NAME           use the given name for the shelved commit
38714
abcf500d527c shelve: improve help text for --patch and --stat
Danny Hooper <hooper@google.com>
parents: 38619
diff changeset
    90
   -p --patch               output patches for changes (provide the names of the
abcf500d527c shelve: improve help text for --patch and --stat
Danny Hooper <hooper@google.com>
parents: 38619
diff changeset
    91
                            shelved changes as positional arguments)
42623
9eace8d6d537 shelve: modify help text on --interactive
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42616
diff changeset
    92
   -i --interactive         interactive mode
38714
abcf500d527c shelve: improve help text for --patch and --stat
Danny Hooper <hooper@google.com>
parents: 38619
diff changeset
    93
      --stat                output diffstat-style summary of changes (provide
abcf500d527c shelve: improve help text for --patch and --stat
Danny Hooper <hooper@google.com>
parents: 38619
diff changeset
    94
                            the names of the shelved changes as positional
abcf500d527c shelve: improve help text for --patch and --stat
Danny Hooper <hooper@google.com>
parents: 38619
diff changeset
    95
                            arguments)
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    96
   -I --include PATTERN [+] include names matching the given patterns
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    97
   -X --exclude PATTERN [+] exclude names matching the given patterns
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    98
      --mq                  operate on patch repository
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    99
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
   100
  (some details hidden, use --verbose to show complete help)
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
   101
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   102
shelving in an empty repo should be possible
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   103
(this tests also that editor is not invoked, if '--edit' is not
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   104
specified)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   105
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   106
  $ HGEDITOR=cat hg shelve
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   107
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   108
  0 files updated, 0 files merged, 5 files removed, 0 files unresolved
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   109
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   110
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   111
  unshelving change 'default'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   112
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   113
  $ hg commit -q -m 'initial commit'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   114
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   115
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   116
  nothing changed
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   117
  [1]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   118
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   119
make sure shelve files were backed up
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   120
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   121
  $ ls .hg/shelve-backup
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   122
  default.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   123
  default.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   124
  default.shelve
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   125
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   126
checks to make sure we dont create a directory or
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   127
hidden file while choosing a new shelve name
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   128
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   129
when we are given a name
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   130
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   131
  $ hg shelve -n foo/bar
30671
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
   132
  abort: shelved change names can not contain slashes
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   133
  [255]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   134
  $ hg shelve -n .baz
30671
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
   135
  abort: shelved change names can not start with '.'
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   136
  [255]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   137
  $ hg shelve -n foo\\bar
30671
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
   138
  abort: shelved change names can not contain slashes
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   139
  [255]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   140
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   141
when shelve has to choose itself
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   142
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   143
  $ hg branch x/y -q
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   144
  $ hg commit -q -m "Branch commit 0"
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   145
  $ hg shelve
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   146
  nothing changed
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   147
  [1]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   148
  $ hg branch .x -q
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   149
  $ hg commit -q -m "Branch commit 1"
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   150
  $ hg shelve
30671
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
   151
  nothing changed
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
   152
  [1]
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   153
  $ hg branch x\\y -q
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   154
  $ hg commit -q -m "Branch commit 2"
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   155
  $ hg shelve
30671
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
   156
  nothing changed
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
   157
  [1]
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   158
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   159
cleaning the branches made for name checking tests
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   160
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   161
  $ hg up default -q
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
   162
  $ hg strip e9177275307e+6a6d231f43d+882bae7c62c2 -q
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   163
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
   164
create an mq patch - shelving should work fine with a patch applied
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   165
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   166
  $ echo n > n
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   167
  $ hg add n
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   168
  $ hg commit n -m second
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
   169
  $ hg qnew second.patch
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   170
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   171
shelve a change that we will delete later
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   172
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   173
  $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   174
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   175
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   176
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   177
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   178
set up some more complex changes to shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   179
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   180
  $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   181
  $ hg mv b b.rename
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   182
  moving b/b to b.rename/b
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   183
  $ hg cp c c.copy
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   184
  $ hg mv d ghost
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   185
  $ rm ghost
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   186
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   187
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   188
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   189
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   190
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   191
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   192
  R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   193
  R d
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   194
  ! ghost
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   195
    d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   196
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   197
the common case - no options or filenames
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   198
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   199
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   200
  shelved as default-01
44210
d0c3eead515a copies: fix crash when copy source is not in graft base
Martin von Zweigbergk <martinvonz@google.com>
parents: 44209
diff changeset
   201
  3 files updated, 0 files merged, 2 files removed, 0 files unresolved
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   202
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   203
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   204
ensure that our shelved changes exist
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   205
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   206
  $ hg shelve -l
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   207
  default-01      (*)* changes to: [mq]: second.patch (glob)
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   208
  default         (*)* changes to: [mq]: second.patch (glob)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   209
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   210
  $ hg shelve -l -p default
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   211
  default         (*)* changes to: [mq]: second.patch (glob)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   212
  
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   213
  diff --git a/a/a b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   214
  --- a/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   215
  +++ b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   216
  @@ -1,1 +1,2 @@
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   217
   a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   218
  +a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   219
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   220
  $ hg shelve --list --addremove
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   221
  abort: options '--list' and '--addremove' may not be used together
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   222
  [10]
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   223
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   224
delete our older shelved change
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   225
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   226
  $ hg shelve -d default
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
   227
  $ hg qfinish -a -q
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   228
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   229
ensure shelve backups aren't overwritten
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   230
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   231
  $ ls .hg/shelve-backup/
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   232
  default-1.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   233
  default-1.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   234
  default-1.shelve
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   235
  default.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   236
  default.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   237
  default.shelve
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   238
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   239
local edits should not prevent a shelved change from applying
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   240
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   241
  $ printf "z\na\n" > a/a
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   242
  $ hg unshelve --keep
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   243
  unshelving change 'default-01'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   244
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   245
  rebasing shelved changes
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   246
  merging a/a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   247
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   248
  $ hg revert --all -q
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   249
  $ rm a/a.orig b.rename/b c.copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   250
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   251
apply it and make sure our state is as expected
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   252
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   253
(this also tests that same timestamp prevents backups from being
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   254
removed, even though there are more than 'maxbackups' backups)
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   255
49427
c4417029e6c2 phase-shelve: honor and prefer obs shelves for existence and modified time
Jason R. Coombs <jaraco@jaraco.com>
parents: 48969
diff changeset
   256
  $ f -t .hg/shelve-backup/default.shelve
c4417029e6c2 phase-shelve: honor and prefer obs shelves for existence and modified time
Jason R. Coombs <jaraco@jaraco.com>
parents: 48969
diff changeset
   257
  .hg/shelve-backup/default.shelve: file
c4417029e6c2 phase-shelve: honor and prefer obs shelves for existence and modified time
Jason R. Coombs <jaraco@jaraco.com>
parents: 48969
diff changeset
   258
  $ touch -t 200001010000 .hg/shelve-backup/default.shelve
c4417029e6c2 phase-shelve: honor and prefer obs shelves for existence and modified time
Jason R. Coombs <jaraco@jaraco.com>
parents: 48969
diff changeset
   259
  $ f -t .hg/shelve-backup/default-1.shelve
c4417029e6c2 phase-shelve: honor and prefer obs shelves for existence and modified time
Jason R. Coombs <jaraco@jaraco.com>
parents: 48969
diff changeset
   260
  .hg/shelve-backup/default-1.shelve: file
c4417029e6c2 phase-shelve: honor and prefer obs shelves for existence and modified time
Jason R. Coombs <jaraco@jaraco.com>
parents: 48969
diff changeset
   261
  $ touch -t 200001010000 .hg/shelve-backup/default-1.shelve
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   262
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   263
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   264
  unshelving change 'default-01'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   265
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   266
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   267
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   268
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   269
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   270
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   271
  R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   272
  R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   273
  $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   274
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   275
(both of default.hg and default-1.hg should be still kept, because it
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   276
is difficult to decide actual order of them from same timestamp)
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   277
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   278
  $ ls .hg/shelve-backup/
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   279
  default-01.hg
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   280
  default-01.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   281
  default-01.shelve
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   282
  default-1.hg
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   283
  default-1.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   284
  default-1.shelve
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   285
  default.hg
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   286
  default.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   287
  default.shelve
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
   288
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   289
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   290
  abort: no shelved changes to apply!
46272
a68d3386138c shelve: raise more specific errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 46246
diff changeset
   291
  [20]
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   292
  $ hg unshelve foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   293
  abort: shelved change 'foo' not found
46272
a68d3386138c shelve: raise more specific errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 46246
diff changeset
   294
  [10]
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   295
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   296
named shelves, specific filenames, and "commit messages" should all work
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   297
(this tests also that editor is invoked, if '--edit' is specified)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   298
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   299
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   300
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   301
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   302
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   303
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   304
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   305
  R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   306
  R d
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   307
  $ HGEDITOR=cat hg shelve -q -n wibble -m wat -e a
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   308
  wat
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   309
  
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   310
  
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   311
  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   312
  HG: Leave message empty to abort commit.
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   313
  HG: --
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   314
  HG: user: shelve@localhost
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   315
  HG: branch 'default'
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   316
  HG: changed a/a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   317
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   318
expect "a" to no longer be present, but status otherwise unchanged
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   319
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   320
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   321
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   322
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   323
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   324
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   325
  R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   326
  R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   327
  $ hg shelve -l --stat
51643
96cb63a86ee5 test: better glob some timing related line to avoid flakiness
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49587
diff changeset
   328
  wibble +\([^)]+\) +wat (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   329
   a/a |  1 +
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   330
   1 files changed, 1 insertions(+), 0 deletions(-)
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   331
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   332
and now "a/a" should reappear
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   333
19943
4de116871044 shelve: make unshelve work even if it don't run in repository root
Takumi IINO <trot.thunder@gmail.com>
parents: 19887
diff changeset
   334
  $ cd a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   335
  $ hg unshelve -q wibble
19943
4de116871044 shelve: make unshelve work even if it don't run in repository root
Takumi IINO <trot.thunder@gmail.com>
parents: 19887
diff changeset
   336
  $ cd ..
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   337
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   338
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   339
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   340
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   341
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   342
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   343
  R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   344
  R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   345
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   346
ensure old shelve backups are being deleted automatically
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   347
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   348
  $ ls .hg/shelve-backup/
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   349
  default-01.hg
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   350
  default-01.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   351
  default-01.shelve
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   352
  wibble.hg
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   353
  wibble.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   354
  wibble.shelve
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   355
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   356
cause unshelving to result in a merge with 'a' conflicting
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   357
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   358
  $ hg shelve -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   359
  $ echo c>>a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   360
  $ hg commit -m second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   361
  $ hg tip --template '{files}\n'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   362
  a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   363
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   364
add an unrelated change that should be preserved
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   365
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   366
  $ mkdir foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   367
  $ echo foo > foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   368
  $ hg add foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   369
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   370
force a conflicted merge to occur
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   371
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   372
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   373
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   374
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   375
  rebasing shelved changes
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   376
  merging a/a
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   377
  warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark')
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   378
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 44724
diff changeset
   379
  [240]
33771
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   380
  $ hg status -v
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   381
  M a/a
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   382
  M b.rename/b
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   383
  M c.copy
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   384
  R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   385
  R d
33771
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   386
  ? a/a.orig
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   387
  # The repository is in an unfinished *unshelve* state.
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   388
  
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   389
  # Unresolved merge conflicts:
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   390
  # 
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   391
  #     a/a
33771
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   392
  # 
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   393
  # To mark files as resolved:  hg resolve --mark FILE
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   394
  
38341
50f5fc232c16 morestatus: remove some extra spaces
Pulkit Goyal <7895pulkit@gmail.com>
parents: 38338
diff changeset
   395
  # To continue:    hg unshelve --continue
50f5fc232c16 morestatus: remove some extra spaces
Pulkit Goyal <7895pulkit@gmail.com>
parents: 38338
diff changeset
   396
  # To abort:       hg unshelve --abort
33771
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   397
  
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   398
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   399
ensure that we have a merge with unresolved conflicts
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   400
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   401
#if phasebased
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   402
  $ hg heads -q --template '{rev}\n'
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   403
  8
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   404
  5
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   405
  $ hg parents -q --template '{rev}\n'
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   406
  8
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   407
  5
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   408
#endif
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   409
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   410
#if stripbased
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   411
  $ hg heads -q --template '{rev}\n'
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   412
  5
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   413
  4
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   414
  $ hg parents -q --template '{rev}\n'
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   415
  4
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   416
  5
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   417
#endif
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   418
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   419
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   420
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   421
  M b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   422
  M c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   423
  R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   424
  R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   425
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   426
  $ hg diff
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   427
  diff --git a/a/a b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   428
  --- a/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   429
  +++ b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   430
  @@ -1,2 +1,6 @@
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   431
   a
48592
bcc4820242cf shelve: attempt to make merge labels more helpful
Martin von Zweigbergk <martinvonz@google.com>
parents: 48427
diff changeset
   432
  +<<<<<<< working-copy:   2377350b6337 - shelve: pending changes temporary commit
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   433
   c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   434
  +=======
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   435
  +a
48592
bcc4820242cf shelve: attempt to make merge labels more helpful
Martin von Zweigbergk <martinvonz@google.com>
parents: 48427
diff changeset
   436
  +>>>>>>> shelved change: 203c9f771d2b - shelve: changes to: [mq]: second.patch
22905
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   437
  diff --git a/b/b b/b.rename/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   438
  rename from b/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   439
  rename to b.rename/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   440
  diff --git a/c b/c.copy
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   441
  copy from c
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   442
  copy to c.copy
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   443
  diff --git a/d b/d
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   444
  deleted file mode 100644
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   445
  --- a/d
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   446
  +++ /dev/null
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   447
  @@ -1,1 +0,0 @@
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   448
  -d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   449
  $ hg resolve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   450
  U a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   451
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   452
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   453
  abort: unshelve already in progress
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   454
  (use 'hg unshelve --continue' or 'hg unshelve --abort')
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   455
  [20]
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   456
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   457
abort the unshelve and be happy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   458
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   459
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   460
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   461
  M b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   462
  M c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   463
  R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   464
  R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   465
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   466
  $ hg unshelve -a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   467
  unshelve of 'default' aborted
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   468
  $ hg heads -q
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   469
  [37]:2e69b451d1ea (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   470
  $ hg parents
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   471
  changeset:   [37]:2e69b451d1ea (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   472
  tag:         tip
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   473
  parent:      3:509104101065 (?)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   474
  user:        test
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   475
  date:        Thu Jan 01 00:00:00 1970 +0000
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   476
  summary:     second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   477
  
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   478
  $ hg resolve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   479
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   480
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   481
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   482
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   483
try to continue with no unshelve underway
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   484
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   485
  $ hg unshelve -c
28124
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   486
  abort: no unshelve in progress
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   487
  [20]
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   488
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   489
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   490
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   491
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   492
redo the unshelve to get a conflict
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   493
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   494
  $ hg unshelve -q
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   495
  warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark')
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   496
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 44724
diff changeset
   497
  [240]
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   498
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   499
attempt to continue
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   500
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   501
  $ hg unshelve -c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   502
  abort: unresolved conflicts, can't continue
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   503
  (see 'hg resolve', then 'hg unshelve --continue')
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   504
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   505
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   506
  $ hg revert -r . a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   507
  $ hg resolve -m a/a
21947
b081decd9062 resolve: add parenthesis around "no more unresolved files" message
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21852
diff changeset
   508
  (no more unresolved files)
27694
2dc363274702 shelve: hook afterresolvedstates
timeless <timeless@mozdev.org>
parents: 27092
diff changeset
   509
  continue: hg unshelve --continue
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   510
19963
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
   511
  $ hg commit -m 'commit while unshelve in progress'
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
   512
  abort: unshelve already in progress
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
   513
  (use 'hg unshelve --continue' or 'hg unshelve --abort')
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   514
  [20]
19963
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
   515
28124
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   516
  $ hg graft --continue
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   517
  abort: no graft in progress
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   518
  (continue: hg unshelve --continue)
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   519
  [20]
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   520
  $ hg unshelve -c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   521
  unshelve of 'default' complete
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   522
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   523
ensure the repo is as we hope
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   524
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   525
  $ hg parents
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   526
  changeset:   [37]:2e69b451d1ea (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   527
  tag:         tip
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   528
  parent:      3:509104101065 (?)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   529
  user:        test
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   530
  date:        Thu Jan 01 00:00:00 1970 +0000
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   531
  summary:     second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   532
  
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   533
  $ hg heads -q
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   534
  [37]:2e69b451d1ea (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   535
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   536
  $ hg status -C
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   537
  A b.rename/b
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   538
    b/b
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   539
  A c.copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   540
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   541
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   542
  R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
   543
  R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   544
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   545
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   546
there should be no shelves left
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   547
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   548
  $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   549
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   550
#if execbit
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   551
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   552
ensure that metadata-only changes are shelved
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   553
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   554
  $ chmod +x a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   555
  $ hg shelve -q -n execbit a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   556
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   557
  $ hg unshelve -q execbit
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   558
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   559
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   560
  $ hg revert a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   561
39761
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   562
#else
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   563
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   564
Dummy shelve op, to keep rev numbers aligned
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   565
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   566
  $ echo foo > a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   567
  $ hg shelve -q -n dummy a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   568
  $ hg unshelve -q dummy
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   569
  $ hg revert a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   570
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   571
#endif
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   572
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   573
#if symlink
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   574
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   575
  $ rm a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   576
  $ ln -s foo a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   577
  $ hg shelve -q -n symlink a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   578
  $ hg status a/a
31021
4189d790e8a4 shelve: add -n/--name option to unshelve (issue5475)
liscju <piotr.listkiewicz@gmail.com>
parents: 30846
diff changeset
   579
  $ hg unshelve -q -n symlink
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   580
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   581
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   582
  $ hg revert a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   583
39761
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   584
#else
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   585
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   586
Dummy shelve op, to keep rev numbers aligned
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   587
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   588
  $ echo bar > a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   589
  $ hg shelve -q -n dummy a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   590
  $ hg unshelve -q dummy
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   591
  $ hg revert a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
   592
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   593
#endif
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   594
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   595
set up another conflict between a commit and a shelved change
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   596
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   597
  $ hg revert -q -C -a
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   598
  $ rm a/a.orig b.rename/b c.copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   599
  $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   600
  $ hg shelve -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   601
  $ echo x >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   602
  $ hg ci -m 'create conflict'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   603
  $ hg add foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   604
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   605
if we resolve a conflict while unshelving, the unshelve should succeed
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   606
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   607
  $ hg unshelve --tool :merge-other --keep
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   608
  unshelving change 'default'
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   609
  temporarily committing pending changes (restore with 'hg unshelve --abort')
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   610
  rebasing shelved changes
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   611
  merging a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   612
  $ hg parents -q
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   613
  (4|13):33f7f61e6c5e (re)
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   614
  $ hg shelve -l
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   615
  default         (*)* changes to: second (glob)
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   616
  $ hg status
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   617
  M a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   618
  A foo/foo
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   619
  $ cat a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   620
  a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   621
  c
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   622
  a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   623
  $ cat > a/a << EOF
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   624
  > a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   625
  > c
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   626
  > x
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   627
  > EOF
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   628
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   629
  $ HGMERGE=true hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   630
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   631
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   632
  rebasing shelved changes
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   633
  merging a/a
38618
c829749e7639 shelve: directly handle the initial parent alignment
Boris Feld <boris.feld@octobus.net>
parents: 38465
diff changeset
   634
  note: unshelved changes already existed in the working copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   635
  $ hg parents -q
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   636
  (4|13):33f7f61e6c5e (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   637
  $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   638
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   639
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   640
  $ cat a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   641
  a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   642
  c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   643
  x
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   644
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   645
test keep and cleanup
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   646
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   647
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   648
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   649
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   650
  $ hg shelve --list
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   651
  default         (*)* changes to: create conflict (glob)
27019
5cf184398ee7 unshelve: add -k as short form of --keep
Siddharth Agarwal <sid0@fb.com>
parents: 26952
diff changeset
   652
  $ hg unshelve -k
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   653
  unshelving change 'default'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   654
  $ hg shelve --list
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   655
  default         (*)* changes to: create conflict (glob)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   656
  $ hg shelve --cleanup
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   657
  $ hg shelve --list
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   658
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   659
  $ hg shelve --cleanup --delete
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   660
  abort: options '--cleanup' and '--delete' may not be used together
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   661
  [10]
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   662
  $ hg shelve --cleanup --patch
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   663
  abort: options '--cleanup' and '--patch' may not be used together
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   664
  [10]
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   665
  $ hg shelve --cleanup --message MESSAGE
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   666
  abort: options '--cleanup' and '--message' may not be used together
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   667
  [10]
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   668
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   669
test bookmarks
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   670
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   671
  $ hg bookmark test
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   672
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   673
   \* test                      (4|13):33f7f61e6c5e (re)
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   674
  $ hg shelve
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   675
  shelved as test
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   676
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   677
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   678
   \* test                      (4|13):33f7f61e6c5e (re)
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   679
  $ hg unshelve
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   680
  unshelving change 'test'
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   681
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   682
   \* test                      (4|13):33f7f61e6c5e (re)
19885
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   683
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   684
shelve should still work even if mq is disabled
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   685
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   686
  $ hg --config extensions.mq=! shelve
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   687
  shelved as test
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   688
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   689
  $ hg --config extensions.mq=! shelve --list
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   690
  test            (*)* changes to: create conflict (glob)
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   691
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   692
   \* test                      (4|13):33f7f61e6c5e (re)
19885
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   693
  $ hg --config extensions.mq=! unshelve
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   694
  unshelving change 'test'
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   695
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   696
   \* test                      (4|13):33f7f61e6c5e (re)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   697
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   698
Recreate some conflict again
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   699
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
   700
  $ hg up -C -r 2e69b451d1ea
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   701
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   702
  (leaving bookmark test)
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   703
  $ echo y >> a/a
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   704
  $ hg shelve
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   705
  shelved as default
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   706
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   707
  $ hg up test
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   708
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   709
  (activating bookmark test)
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   710
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   711
   \* test                      (4|13):33f7f61e6c5e (re)
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   712
  $ hg unshelve
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   713
  unshelving change 'default'
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   714
  rebasing shelved changes
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   715
  merging a/a
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   716
  warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark')
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   717
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 44724
diff changeset
   718
  [240]
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   719
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   720
     test                      (4|13):33f7f61e6c5e (re)
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   721
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   722
Test that resolving all conflicts in one direction (so that the rebase
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   723
is a no-op), works (issue4398)
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   724
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   725
  $ hg revert -a -r .
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   726
  reverting a/a
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   727
  $ hg resolve -m a/a
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   728
  (no more unresolved files)
27694
2dc363274702 shelve: hook afterresolvedstates
timeless <timeless@mozdev.org>
parents: 27092
diff changeset
   729
  continue: hg unshelve --continue
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   730
  $ hg unshelve -c
38463
f4776f8b98e0 shelve: directly handle `--continue`
Boris Feld <boris.feld@octobus.net>
parents: 38462
diff changeset
   731
  note: unshelved changes already existed in the working copy
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   732
  unshelve of 'default' complete
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   733
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   734
   \* test                      (4|13):33f7f61e6c5e (re)
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   735
  $ hg diff
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   736
  $ hg status
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   737
  ? a/a.orig
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   738
  ? foo/foo
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   739
  $ hg summary
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   740
  parent: (4|13):33f7f61e6c5e tip (re)
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   741
   create conflict
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   742
  branch: default
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   743
  bookmarks: *test
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   744
  commit: 2 unknown (clean)
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   745
  update: (current)
25382
6084926366b9 summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents: 25260
diff changeset
   746
  phases: 5 draft
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   747
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   748
  $ hg shelve --delete --stat
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   749
  abort: options '--delete' and '--stat' may not be used together
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   750
  [10]
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   751
  $ hg shelve --delete --name NAME
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   752
  abort: options '--delete' and '--name' may not be used together
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   753
  [10]
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   754
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   755
Test interactive shelve
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   756
  $ cat <<EOF >> $HGRCPATH
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   757
  > [ui]
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   758
  > interactive = true
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   759
  > EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   760
  $ echo 'a' >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   761
  $ cat a/a >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   762
  $ echo 'x' >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   763
  $ mv a/b a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   764
  $ echo 'a' >> foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   765
  $ hg st
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   766
  M a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   767
  ? a/a.orig
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   768
  ? foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   769
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   770
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   771
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   772
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   773
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   774
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   775
  $ cat foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   776
  foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   777
  a
25799
0eb093e40813 shelve: omit incorrect 'commit' suggestion at 'hg shelve -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25774
diff changeset
   778
  $ hg shelve --interactive --config ui.interactive=false
0eb093e40813 shelve: omit incorrect 'commit' suggestion at 'hg shelve -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25774
diff changeset
   779
  abort: running non-interactively
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   780
  [10]
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   781
  $ hg shelve --interactive << EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   782
  > y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   783
  > y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   784
  > n
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   785
  > EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   786
  diff --git a/a/a b/a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   787
  2 hunks, 2 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
   788
  examine changes to 'a/a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
   789
  (enter ? for help) [Ynesfdaq?] y
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   790
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   791
  @@ -1,3 +1,4 @@
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   792
  +a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   793
   a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   794
   c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   795
   x
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
   796
  record change 1/2 to 'a/a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
   797
  (enter ? for help) [Ynesfdaq?] y
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   798
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   799
  @@ -1,3 +2,4 @@
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   800
   a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   801
   c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   802
   x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   803
  +x
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
   804
  record change 2/2 to 'a/a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
   805
  (enter ? for help) [Ynesfdaq?] n
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   806
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   807
  shelved as test
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   808
  merging a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   809
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   810
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   811
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   812
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   813
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   814
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   815
  $ cat foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   816
  foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   817
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   818
  $ hg st
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   819
  M a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   820
  ? foo/foo
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   821
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   822
   \* test                      (4|13):33f7f61e6c5e (re)
45860
073bb7563931 shelve: clear merge state after partial shelve
Martin von Zweigbergk <martinvonz@google.com>
parents: 45859
diff changeset
   823
there shouldn't be a merge state
45859
781b09790633 tests: show that interactive shelve can leave the repo with a merge state
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
   824
  $ hg resolve -l
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   825
  $ hg unshelve
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   826
  unshelving change 'test'
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   827
  temporarily committing pending changes (restore with 'hg unshelve --abort')
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   828
  rebasing shelved changes
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   829
  merging a/a
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   830
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   831
   \* test                      (4|13):33f7f61e6c5e (re)
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   832
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   833
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   834
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   835
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   836
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   837
  x
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   838
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   839
shelve --patch and shelve --stat should work with valid shelfnames
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   840
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   841
  $ hg up --clean .
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   842
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   843
  (leaving bookmark test)
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   844
  $ hg shelve --list
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   845
  $ echo 'patch a' > shelf-patch-a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   846
  $ hg add shelf-patch-a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   847
  $ hg shelve
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   848
  shelved as default
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   849
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   850
  $ echo 'patch b' > shelf-patch-b
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   851
  $ hg add shelf-patch-b
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   852
  $ hg shelve
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   853
  shelved as default-01
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   854
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   855
  $ hg shelve --patch default default-01
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   856
  default-01      (*)* changes to: create conflict (glob)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   857
  
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   858
  diff --git a/shelf-patch-b b/shelf-patch-b
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   859
  new file mode 100644
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   860
  --- /dev/null
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   861
  +++ b/shelf-patch-b
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   862
  @@ -0,0 +1,1 @@
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   863
  +patch b
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   864
  default         (*)* changes to: create conflict (glob)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   865
  
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   866
  diff --git a/shelf-patch-a b/shelf-patch-a
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   867
  new file mode 100644
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   868
  --- /dev/null
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   869
  +++ b/shelf-patch-a
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   870
  @@ -0,0 +1,1 @@
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   871
  +patch a
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   872
  $ hg shelve --stat default default-01
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   873
  default-01      (*)* changes to: create conflict (glob)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   874
   shelf-patch-b |  1 +
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   875
   1 files changed, 1 insertions(+), 0 deletions(-)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   876
  default         (*)* changes to: create conflict (glob)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   877
   shelf-patch-a |  1 +
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   878
   1 files changed, 1 insertions(+), 0 deletions(-)
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   879
  $ hg shelve --patch default
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   880
  default         (*)* changes to: create conflict (glob)
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   881
  
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   882
  diff --git a/shelf-patch-a b/shelf-patch-a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   883
  new file mode 100644
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   884
  --- /dev/null
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   885
  +++ b/shelf-patch-a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   886
  @@ -0,0 +1,1 @@
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   887
  +patch a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   888
  $ hg shelve --stat default
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   889
  default         (*)* changes to: create conflict (glob)
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   890
   shelf-patch-a |  1 +
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   891
   1 files changed, 1 insertions(+), 0 deletions(-)
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   892
  $ hg shelve --patch nonexistentshelf
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   893
  abort: cannot find shelf nonexistentshelf
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   894
  [255]
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   895
  $ hg shelve --stat nonexistentshelf
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   896
  abort: cannot find shelf nonexistentshelf
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   897
  [255]
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   898
  $ hg shelve --patch default nonexistentshelf
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   899
  abort: cannot find shelf nonexistentshelf
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   900
  [255]
38715
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   901
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   902
when the user asks for a patch, we assume they want the most recent shelve if
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   903
they don't provide a shelve name
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   904
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
   905
  $ hg shelve --patch
38715
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   906
  default-01      (*)* changes to: create conflict (glob)
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   907
  
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   908
  diff --git a/shelf-patch-b b/shelf-patch-b
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   909
  new file mode 100644
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   910
  --- /dev/null
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   911
  +++ b/shelf-patch-b
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   912
  @@ -0,0 +1,1 @@
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   913
  +patch b
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   914
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   915
  $ cd ..
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
   916
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   917
Shelve from general delta repo uses bundle2 on disk
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   918
--------------------------------------------------
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   919
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   920
no general delta
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   921
26914
6839f2d4eea7 test: enforce generaldelta format with the right option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26776
diff changeset
   922
  $ hg clone --pull repo bundle1 --config format.usegeneraldelta=0
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   923
  requesting all changes
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   924
  adding changesets
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   925
  adding manifests
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   926
  adding file changes
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   927
  added 5 changesets with 8 changes to 6 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34198
diff changeset
   928
  new changesets cc01e2b0c59f:33f7f61e6c5e
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   929
  updating to branch default
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   930
  6 files updated, 0 files merged, 0 files removed, 0 files unresolved
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   931
  $ cd bundle1
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   932
  $ echo babar > jungle
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   933
  $ hg add jungle
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   934
  $ hg shelve
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   935
  shelved as default
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   936
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   937
  $ hg debugbundle .hg/shelved/*.hg
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
   938
  330882a04d2ce8487636b1fb292e5beea77fa1e3
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   939
  $ cd ..
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   940
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   941
with general delta
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   942
26914
6839f2d4eea7 test: enforce generaldelta format with the right option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26776
diff changeset
   943
  $ hg clone --pull repo bundle2 --config format.usegeneraldelta=1
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   944
  requesting all changes
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   945
  adding changesets
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   946
  adding manifests
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   947
  adding file changes
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   948
  added 5 changesets with 8 changes to 6 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34198
diff changeset
   949
  new changesets cc01e2b0c59f:33f7f61e6c5e
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   950
  updating to branch default
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   951
  6 files updated, 0 files merged, 0 files removed, 0 files unresolved
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   952
  $ cd bundle2
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   953
  $ echo babar > jungle
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   954
  $ hg add jungle
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   955
  $ hg shelve
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   956
  shelved as default
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   957
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   958
  $ hg debugbundle .hg/shelved/*.hg
34025
626a28f30dbd debugcommands: stabilize output of debugbundle by having a custom repr
Augie Fackler <raf@durin42.com>
parents: 33773
diff changeset
   959
  Stream params: {Compression: BZ}
37841
d618558e4e8b debugbundle: also display if a part is mandatory or advisory
Boris Feld <boris.feld@octobus.net>
parents: 37742
diff changeset
   960
  changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
   961
      330882a04d2ce8487636b1fb292e5beea77fa1e3
42013
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   962
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   963
Test shelve --keep
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   964
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   965
  $ hg unshelve
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   966
  unshelving change 'default'
42020
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
   967
  $ hg shelve --keep --list
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
   968
  abort: options '--list' and '--keep' may not be used together
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   969
  [10]
42020
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
   970
  $ hg shelve --keep --patch
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
   971
  abort: options '--patch' and '--keep' may not be used together
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   972
  [10]
42020
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
   973
  $ hg shelve --keep --delete
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
   974
  abort: options '--delete' and '--keep' may not be used together
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   975
  [10]
42013
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   976
  $ hg shelve --keep
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   977
  shelved as default
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   978
  $ hg diff
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   979
  diff --git a/jungle b/jungle
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   980
  new file mode 100644
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   981
  --- /dev/null
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   982
  +++ b/jungle
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   983
  @@ -0,0 +1,1 @@
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
   984
  +babar
43728
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
   985
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
   986
Test shelve --delete
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
   987
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
   988
  $ hg shelve --list
48969
f64bbba2ee59 tests: fix glob pattern for dynamic timer alignment
pacien <pacien.trangirard@pacien.net>
parents: 48592
diff changeset
   989
  default         (*s ago) * changes to: create conflict (glob)
43728
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
   990
  $ hg shelve --delete doesnotexist
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
   991
  abort: shelved change 'doesnotexist' not found
46272
a68d3386138c shelve: raise more specific errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 46246
diff changeset
   992
  [10]
43728
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
   993
  $ hg shelve --delete default
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
   994
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   995
  $ cd ..
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
   996
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
   997
Test visibility of in-memory changes inside transaction to external hook
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
   998
------------------------------------------------------------------------
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
   999
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1000
  $ cd repo
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1001
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1002
  $ echo xxxx >> x
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1003
  $ hg commit -m "#5: changes to invoke rebase"
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1004
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1005
  $ cat > $TESTTMP/checkvisibility.sh <<EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1006
  > echo "==== \$1:"
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1007
  > hg parents --template "VISIBLE {rev}:{node|short}\n"
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1008
  > # test that pending changes are hidden
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1009
  > unset HG_PENDING
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1010
  > hg parents --template "ACTUAL  {rev}:{node|short}\n"
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1011
  > echo "===="
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1012
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1013
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1014
  $ cat >> .hg/hgrc <<EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1015
  > [defaults]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1016
  > # to fix hash id of temporary revisions
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1017
  > unshelve = --date '0 0'
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1018
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1019
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1020
"hg unshelve" at REV5 implies steps below:
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1021
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1022
(1) commit changes in the working directory (REV6)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1023
(2) unbundle shelved revision (REV7)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1024
(3) rebase: merge REV7 into REV6 (REV6 => REV6, REV7)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1025
(4) rebase: commit merged revision (REV8)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1026
(5) rebase: update to REV6 (REV8 => REV6)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1027
(6) update to REV5 (REV6 => REV5)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1028
(7) abort transaction
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1029
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1030
== test visibility to external preupdate hook
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1031
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1032
  $ cat >> .hg/hgrc <<EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1033
  > [hooks]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1034
  > preupdate.visibility = sh $TESTTMP/checkvisibility.sh preupdate
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1035
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1036
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1037
  $ echo nnnn >> n
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1038
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1039
  $ sh $TESTTMP/checkvisibility.sh before-unshelving
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1040
  ==== before-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1041
  VISIBLE (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1042
  ACTUAL  (5|19):703117a2acfb (re)
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1043
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1044
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1045
  $ hg unshelve --keep default
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1046
  temporarily committing pending changes (restore with 'hg unshelve --abort')
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1047
  rebasing shelved changes
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1048
  ==== preupdate:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1049
  VISIBLE (6|20):54c00d20fb3f (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1050
  ACTUAL  (5|19):703117a2acfb (re)
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1051
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1052
  ==== preupdate:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1053
  VISIBLE (8|21):8efe6f7537dc (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1054
  ACTUAL  (5|19):703117a2acfb (re)
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1055
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1056
  ==== preupdate:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1057
  VISIBLE (6|20):54c00d20fb3f (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1058
  ACTUAL  (5|19):703117a2acfb (re)
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1059
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1060
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1061
  $ cat >> .hg/hgrc <<EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1062
  > [hooks]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1063
  > preupdate.visibility =
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1064
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1065
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1066
  $ sh $TESTTMP/checkvisibility.sh after-unshelving
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1067
  ==== after-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1068
  VISIBLE (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1069
  ACTUAL  (5|19):703117a2acfb (re)
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1070
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1071
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1072
== test visibility to external update hook
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1073
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
  1074
  $ hg update -q -C 703117a2acfb
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1075
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1076
  $ cat >> .hg/hgrc <<EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1077
  > [hooks]
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1078
  > update.visibility = sh $TESTTMP/checkvisibility.sh update
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1079
  > EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1080
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1081
  $ echo nnnn >> n
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1082
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1083
  $ sh $TESTTMP/checkvisibility.sh before-unshelving
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1084
  ==== before-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1085
  VISIBLE (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1086
  ACTUAL  (5|19):703117a2acfb (re)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1087
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1088
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1089
  $ hg unshelve --keep default
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1090
  temporarily committing pending changes (restore with 'hg unshelve --abort')
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1091
  rebasing shelved changes
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1092
  ==== update:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1093
  VISIBLE (6|20):54c00d20fb3f (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1094
  VISIBLE 1?7:492ed9d705e5 (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1095
  ACTUAL  (5|19):703117a2acfb (re)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1096
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1097
  ==== update:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1098
  VISIBLE (6|20):54c00d20fb3f (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1099
  ACTUAL  (5|19):703117a2acfb (re)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1100
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1101
  ==== update:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1102
  VISIBLE (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1103
  ACTUAL  (5|19):703117a2acfb (re)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1104
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1105
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1106
  $ cat >> .hg/hgrc <<EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1107
  > [hooks]
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1108
  > update.visibility =
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1109
  > EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1110
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1111
  $ sh $TESTTMP/checkvisibility.sh after-unshelving
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1112
  ==== after-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1113
  VISIBLE (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1114
  ACTUAL  (5|19):703117a2acfb (re)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1115
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1116
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1117
  $ cd ..
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1118
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1119
Keep active bookmark while (un)shelving even on shared repo (issue4940)
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1120
-----------------------------------------------------------------------
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1121
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1122
  $ cat <<EOF >> $HGRCPATH
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1123
  > [extensions]
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1124
  > share =
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1125
  > EOF
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1126
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1127
  $ hg bookmarks -R repo
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1128
     test                      (4|13):33f7f61e6c5e (re)
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1129
  $ hg share -B repo share
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1130
  updating working directory
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1131
  6 files updated, 0 files merged, 0 files removed, 0 files unresolved
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1132
  $ cd share
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1133
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1134
  $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1135
     test                      (4|13):33f7f61e6c5e (re)
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1136
  $ hg bookmarks foo
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1137
  $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1138
   \* foo                       (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1139
     test                      (4|13):33f7f61e6c5e (re)
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1140
  $ echo x >> x
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1141
  $ hg shelve
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1142
  shelved as foo
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1143
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1144
  $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1145
   \* foo                       (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1146
     test                      (4|13):33f7f61e6c5e (re)
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1147
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1148
  $ hg unshelve
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1149
  unshelving change 'foo'
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1150
  $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1151
   \* foo                       (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1152
     test                      (4|13):33f7f61e6c5e (re)
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1153
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1154
  $ cd ..
42050
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1155
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1156
Abort unshelve while merging (issue5123)
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1157
----------------------------------------
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1158
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1159
  $ hg init issue5123
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1160
  $ cd issue5123
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1161
  $ echo > a
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1162
  $ hg ci -Am a
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1163
  adding a
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1164
  $ hg co null
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1165
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1166
  $ echo > b
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1167
  $ hg ci -Am b
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1168
  adding b
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1169
  created new head
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1170
  $ echo > c
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1171
  $ hg add c
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1172
  $ hg shelve
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1173
  shelved as default
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1174
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1175
  $ hg co 1
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1176
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1177
  $ hg merge 0
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1178
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1179
  (branch merge, don't forget to commit)
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1180
-- successful merge with two parents
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1181
  $ hg log -G
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1182
  @  changeset:   1:406bf70c274f
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1183
     tag:         tip
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1184
     parent:      -1:000000000000
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1185
     user:        test
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1186
     date:        Thu Jan 01 00:00:00 1970 +0000
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1187
     summary:     b
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1188
  
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1189
  @  changeset:   0:ada8c9eb8252
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1190
     user:        test
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1191
     date:        Thu Jan 01 00:00:00 1970 +0000
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1192
     summary:     a
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1193
  
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1194
-- trying to pull in the shelve bits
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1195
-- unshelve should abort otherwise, it'll eat my second parent.
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1196
  $ hg unshelve
42532
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 42050
diff changeset
  1197
  abort: outstanding uncommitted merge
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 42050
diff changeset
  1198
  (use 'hg commit' or 'hg merge --abort')
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
  1199
  [20]
42050
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1200
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
  1201
  $ cd ..
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1202
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1203
-- test for interactive mode on unshelve
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1204
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1205
  $ hg init a
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1206
  $ cd a
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1207
  $ echo > b
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1208
  $ hg ci -Am b
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1209
  adding b
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1210
  $ echo > c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1211
  $ echo > d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1212
  $ hg add .
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1213
  adding c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1214
  adding d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1215
  $ hg shelve
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1216
  shelved as default
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1217
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1218
  $ echo > e
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1219
  $ hg add e
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1220
  $ hg ci -m e
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1221
  $ hg shelve --patch
48969
f64bbba2ee59 tests: fix glob pattern for dynamic timer alignment
pacien <pacien.trangirard@pacien.net>
parents: 48592
diff changeset
  1222
  default         (*s ago) * changes to: b (glob)
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1223
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1224
  diff --git a/c b/c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1225
  new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1226
  --- /dev/null
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1227
  +++ b/c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1228
  @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1229
  +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1230
  diff --git a/d b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1231
  new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1232
  --- /dev/null
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1233
  +++ b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1234
  @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1235
  +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1236
  $ hg unshelve -i <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1237
  > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1238
  > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1239
  > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1240
  > n
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1241
  > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1242
  unshelving change 'default'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1243
  rebasing shelved changes
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1244
  diff --git a/c b/c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1245
  new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1246
  examine changes to 'c'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1247
  (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1248
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1249
  @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1250
  +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1251
  record change 1/2 to 'c'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1252
  (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1253
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1254
  diff --git a/d b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1255
  new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1256
  examine changes to 'd'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1257
  (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1258
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1259
  @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1260
  +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1261
  record change 2/2 to 'd'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1262
  (enter ? for help) [Ynesfdaq?] n
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1263
  
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 44374
diff changeset
  1264
  $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 44374
diff changeset
  1265
  .hg
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1266
  b
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1267
  c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1268
  e
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1269
-- shelve should not contain `c` now
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1270
  $ hg shelve --patch
48969
f64bbba2ee59 tests: fix glob pattern for dynamic timer alignment
pacien <pacien.trangirard@pacien.net>
parents: 48592
diff changeset
  1271
  default         (*s ago) * changes to: b (glob)
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1272
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1273
  diff --git a/d b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1274
  new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1275
  --- /dev/null
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1276
  +++ b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1277
  @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1278
  +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1279
  $ hg unshelve -i <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1280
  > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1281
  > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1282
  > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1283
  unshelving change 'default'
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
  1284
  temporarily committing pending changes (restore with 'hg unshelve --abort')
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1285
  rebasing shelved changes
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1286
  diff --git a/d b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1287
  new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1288
  examine changes to 'd'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1289
  (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1290
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1291
  @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1292
  +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1293
  record this change to 'd'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1294
  (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1295
  
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
  1296
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
  1297
  $ hg status -v
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
  1298
  A c
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
  1299
  A d
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 44374
diff changeset
  1300
  $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 44374
diff changeset
  1301
  .hg
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1302
  b
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1303
  c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1304
  d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1305
  e
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1306
  $ hg shelve --list
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1307
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1308
-- now, unshelve selected changes from a file
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1309
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1310
  $ echo B > foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1311
  $ hg add foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1312
  $ hg ci -m 'add B to foo'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1313
  $ cat > foo <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1314
  > A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1315
  > B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1316
  > C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1317
  > EOF
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1318
  $ echo > garbage
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1319
  $ hg st
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1320
  M foo
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1321
  ? garbage
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1322
  $ hg shelve --unknown
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1323
  shelved as default
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1324
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1325
  $ cat foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1326
  B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1327
  $ hg unshelve -i <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1328
  > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1329
  > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1330
  > n
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1331
  > y
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1332
  > y
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1333
  > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1334
  unshelving change 'default'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1335
  rebasing shelved changes
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1336
  diff --git a/foo b/foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1337
  2 hunks, 2 lines changed
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1338
  examine changes to 'foo'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1339
  (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1340
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1341
  @@ -1,1 +1,2 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1342
  +A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1343
   B
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1344
  record change 1/3 to 'foo'?
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1345
  (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1346
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1347
  @@ -1,1 +2,2 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1348
   B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1349
  +C
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1350
  record change 2/3 to 'foo'?
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1351
  (enter ? for help) [Ynesfdaq?] n
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1352
  
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1353
  diff --git a/garbage b/garbage
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1354
  new file mode 100644
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1355
  examine changes to 'garbage'?
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1356
  (enter ? for help) [Ynesfdaq?] y
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1357
  
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1358
  @@ -0,0 +1,1 @@
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1359
  +
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1360
  record change 3/3 to 'garbage'?
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1361
  (enter ? for help) [Ynesfdaq?] y
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1362
  
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1363
  $ hg st
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1364
  M foo
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
  1365
  ? garbage
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1366
  $ cat foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1367
  A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1368
  B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1369
  $ hg shelve --patch
48969
f64bbba2ee59 tests: fix glob pattern for dynamic timer alignment
pacien <pacien.trangirard@pacien.net>
parents: 48592
diff changeset
  1370
  default         (*s ago) * changes to: add B to foo (glob)
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1371
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1372
  diff --git a/foo b/foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1373
  --- a/foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1374
  +++ b/foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1375
  @@ -1,2 +1,3 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1376
   A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1377
   B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1378
  +C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1379
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1380
-- unshelve interactive on conflicts
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1381
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1382
  $ echo A >> bar1
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1383
  $ echo A >> bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1384
  $ hg add bar1 bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1385
  $ hg ci -m 'add A to bars'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1386
  $ echo B >> bar1
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1387
  $ echo B >> bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1388
  $ hg shelve
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1389
  shelved as default-01
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1390
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1391
  $ echo C >> bar1
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1392
  $ echo C >> bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1393
  $ hg ci -m 'add C to bars'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1394
  $ hg unshelve -i
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1395
  unshelving change 'default-01'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1396
  rebasing shelved changes
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1397
  merging bar1
48427
38941a28406a mergestate: merge `preresolve()` into `resolve()`
Martin von Zweigbergk <martinvonz@google.com>
parents: 46272
diff changeset
  1398
  warning: conflicts while merging bar1! (edit, then use 'hg resolve --mark')
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1399
  merging bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1400
  warning: conflicts while merging bar2! (edit, then use 'hg resolve --mark')
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1401
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 44724
diff changeset
  1402
  [240]
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1403
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1404
  $ cat > bar1 <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1405
  > A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1406
  > B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1407
  > C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1408
  > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1409
  $ cat > bar2 <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1410
  > A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1411
  > B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1412
  > C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1413
  > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1414
  $ hg resolve -m bar1 bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1415
  (no more unresolved files)
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1416
  continue: hg unshelve --continue
42668
52a383451739 unshelve: add abort on using continue and interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42662
diff changeset
  1417
52a383451739 unshelve: add abort on using continue and interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42662
diff changeset
  1418
-- using --continue with --interactive should throw an error
52a383451739 unshelve: add abort on using continue and interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42662
diff changeset
  1419
  $ hg unshelve --continue -i
52a383451739 unshelve: add abort on using continue and interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42662
diff changeset
  1420
  abort: cannot use both continue and interactive
46272
a68d3386138c shelve: raise more specific errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 46246
diff changeset
  1421
  [10]
42668
52a383451739 unshelve: add abort on using continue and interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42662
diff changeset
  1422
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1423
  $ cat bar1
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1424
  A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1425
  B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1426
  C
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1427
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1428
#if stripbased
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1429
  $ hg log -r 3:: -G
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
  1430
  @  changeset:   5:f1d5f53e397b
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1431
  |  tag:         tip
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
  1432
  |  parent:      3:e28fd7fa7938
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1433
  |  user:        shelve@localhost
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1434
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1435
  |  summary:     changes to: add A to bars
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1436
  |
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
  1437
  | @  changeset:   4:fe451a778c81
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1438
  |/   user:        test
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1439
  |    date:        Thu Jan 01 00:00:00 1970 +0000
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1440
  |    summary:     add C to bars
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1441
  |
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
  1442
  o  changeset:   3:e28fd7fa7938
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1443
  |  user:        test
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1444
  ~  date:        Thu Jan 01 00:00:00 1970 +0000
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1445
     summary:     add A to bars
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1446
  
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1447
#endif
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1448
42662
ee86ad6f50fe unshelve: store information about interactive mode in shelvedstate
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42626
diff changeset
  1449
  $ hg unshelve --continue <<EOF
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1450
  > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1451
  > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1452
  > y
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1453
  > n
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1454
  > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1455
  diff --git a/bar1 b/bar1
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1456
  1 hunks, 1 lines changed
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1457
  examine changes to 'bar1'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1458
  (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1459
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1460
  @@ -1,2 +1,3 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1461
   A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1462
  +B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1463
   C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1464
  record change 1/2 to 'bar1'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1465
  (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1466
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1467
  diff --git a/bar2 b/bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1468
  1 hunks, 1 lines changed
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1469
  examine changes to 'bar2'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1470
  (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1471
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1472
  @@ -1,2 +1,3 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1473
   A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1474
  +B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1475
   C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1476
  record change 2/2 to 'bar2'?
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1477
  (enter ? for help) [Ynesfdaq?] n
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1478
  
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
  1479
  unshelve of 'default-01' complete
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1480
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1481
#if stripbased
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1482
  $ hg log -r 3:: -G
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
  1483
  @  changeset:   4:fe451a778c81
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1484
  |  tag:         tip
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1485
  |  user:        test
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1486
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1487
  |  summary:     add C to bars
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1488
  |
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
  1489
  o  changeset:   3:e28fd7fa7938
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1490
  |  user:        test
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1491
  ~  date:        Thu Jan 01 00:00:00 1970 +0000
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1492
     summary:     add A to bars
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1493
  
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
  1494
#endif
42703
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1495
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1496
  $ hg unshelve --continue
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1497
  abort: no unshelve in progress
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
  1498
  [20]
42703
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1499
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1500
  $ hg shelve --list
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1501
  default-01      (*)* changes to: add A to bars (glob)
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1502
  default         (*)* changes to: add B to foo (glob)
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1503
  $ hg unshelve -n default-01 -i <<EOF
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1504
  > y
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1505
  > y
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1506
  > EOF
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1507
  temporarily committing pending changes (restore with 'hg unshelve --abort')
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1508
  rebasing shelved changes
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1509
  diff --git a/bar2 b/bar2
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1510
  1 hunks, 1 lines changed
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1511
  examine changes to 'bar2'?
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1512
  (enter ? for help) [Ynesfdaq?] y
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1513
  
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1514
  @@ -1,2 +1,3 @@
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1515
   A
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1516
  +B
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1517
   C
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1518
  record this change to 'bar2'?
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1519
  (enter ? for help) [Ynesfdaq?] y
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
  1520
  
42761
5c285c8e4f98 unshelve: abort on using --keep and --interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42733
diff changeset
  1521
-- test for --interactive --keep
5c285c8e4f98 unshelve: abort on using --keep and --interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42733
diff changeset
  1522
  $ hg unshelve -i --keep
5c285c8e4f98 unshelve: abort on using --keep and --interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42733
diff changeset
  1523
  abort: --keep on --interactive is not yet supported
46272
a68d3386138c shelve: raise more specific errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 46246
diff changeset
  1524
  [10]
46246
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1525
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1526
  $ hg update -q --clean .
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1527
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1528
Test that we can successfully shelve and unshelve a file with a trailing space
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1529
in the filename. Such filenames are supposedly unsupported on Windows, so we
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1530
wrap it in the no-windows check. Also test `hg patch` of the .patch file
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1531
produced by `hg shelve`.
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1532
#if no-windows
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1533
  $ echo hi > 'my filename '
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1534
  $ hg add 'my filename '
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1535
  warning: filename ends with ' ', which is not allowed on Windows: 'my filename '
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1536
  $ hg shelve
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1537
  shelved as default-01
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1538
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1539
  $ cp .hg/shelved/default-01.patch test_patch.patch
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1540
  $ hg unshelve
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1541
  unshelving change 'default-01'
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1542
  $ cat 'my filename '
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1543
  hi
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1544
  $ hg update -q --clean .
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1545
  $ hg patch -p1 test_patch.patch
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1546
  applying test_patch.patch
49454
34dddc5d2e2f shelve: in test for trailing whitespace, strip commit (issue6735)
Jason R. Coombs <jaraco@jaraco.com>
parents: 49453
diff changeset
  1547
34dddc5d2e2f shelve: in test for trailing whitespace, strip commit (issue6735)
Jason R. Coombs <jaraco@jaraco.com>
parents: 49453
diff changeset
  1548
  $ hg strip -q -r .
46246
416ecdaa12df patch: handle filenames with trailing spaces
Kyle Lippincott <spectral@google.com>
parents: 45860
diff changeset
  1549
#endif
49428
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1550
49453
ffb130cd3f27 shelve: demonstrate that the state is different across platforms (issue6735)
Jason R. Coombs <jaraco@jaraco.com>
parents: 49452
diff changeset
  1551
Check the comment of the last commit for consistency
ffb130cd3f27 shelve: demonstrate that the state is different across platforms (issue6735)
Jason R. Coombs <jaraco@jaraco.com>
parents: 49452
diff changeset
  1552
ffb130cd3f27 shelve: demonstrate that the state is different across platforms (issue6735)
Jason R. Coombs <jaraco@jaraco.com>
parents: 49452
diff changeset
  1553
  $ hg log -r . --template '{desc}\n'
ffb130cd3f27 shelve: demonstrate that the state is different across platforms (issue6735)
Jason R. Coombs <jaraco@jaraco.com>
parents: 49452
diff changeset
  1554
  add C to bars
ffb130cd3f27 shelve: demonstrate that the state is different across platforms (issue6735)
Jason R. Coombs <jaraco@jaraco.com>
parents: 49452
diff changeset
  1555
49428
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1556
-- if phasebased, shelve works without patch and bundle
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1557
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1558
  $ hg update -q --clean .
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1559
  $ rm -r .hg/shelve*
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1560
  $ echo import antigravity >> somefile.py
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1561
  $ hg add somefile.py
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1562
  $ hg shelve -q
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1563
#if phasebased
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1564
  $ rm .hg/shelved/default.hg
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1565
  $ rm .hg/shelved/default.patch
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1566
#endif
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1567
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1568
shelve --list --patch should work even with no patch file.
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1569
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1570
  $ hg shelve --list --patch
49455
744b341782f4 shelve: remove strip and rely on prior state (issue6735)
Jason R. Coombs <jaraco@jaraco.com>
parents: 49454
diff changeset
  1571
  default         (*s ago) * changes to: add C to bars (glob)
49428
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1572
  
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1573
  diff --git a/somefile.py b/somefile.py
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1574
  new file mode 100644
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1575
  --- /dev/null
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1576
  +++ b/somefile.py
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1577
  @@ -0,0 +1,1 @@
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1578
  +import antigravity
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1579
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1580
  $ hg unshelve
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1581
  unshelving change 'default'
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1582
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1583
#if phasebased
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1584
  $ ls .hg/shelve-backup
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1585
  default.shelve
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1586
#endif
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1587
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1588
#if stripbased
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1589
  $ ls .hg/shelve-backup
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1590
  default.hg
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1591
  default.patch
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1592
  default.shelve
cc7eb0b558c0 phase-shelve: expand the tests to capture use-cases supported
Jason R. Coombs <jaraco@jaraco.com>
parents: 49427
diff changeset
  1593
#endif
49431
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1594
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1595
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1596
-- allow for phase-based shelves to be disabled
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1597
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1598
  $ hg update -q --clean .
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1599
  $ hg strip -q --hidden -r 0
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1600
  $ rm -r .hg/shelve*
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1601
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1602
#if phasebased
49587
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1603
  $ cp $HGRCPATH $TESTTMP/hgrc-saved
49431
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1604
  $ cat <<EOF >> $HGRCPATH
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1605
  > [shelve]
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1606
  > store = strip
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1607
  > EOF
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1608
#endif
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1609
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1610
  $ echo import this >> somefile.py
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1611
  $ hg add somefile.py
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1612
  $ hg shelve -q
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1613
  $ hg log --hidden
49432
b4535c88a05b phase-shelve: also capture the state of shelve prior to unshelve
Jason R. Coombs <jaraco@jaraco.com>
parents: 49431
diff changeset
  1614
  $ ls .hg/shelved
b4535c88a05b phase-shelve: also capture the state of shelve prior to unshelve
Jason R. Coombs <jaraco@jaraco.com>
parents: 49431
diff changeset
  1615
  default.hg
b4535c88a05b phase-shelve: also capture the state of shelve prior to unshelve
Jason R. Coombs <jaraco@jaraco.com>
parents: 49431
diff changeset
  1616
  default.patch
b4535c88a05b phase-shelve: also capture the state of shelve prior to unshelve
Jason R. Coombs <jaraco@jaraco.com>
parents: 49431
diff changeset
  1617
  default.shelve
49431
ad1db3861a8b phase-shelve: Add test for shelve technique config
Jason R. Coombs <jaraco@jaraco.com>
parents: 49428
diff changeset
  1618
  $ hg unshelve -q
49457
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1619
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1620
Override the disabling, re-enabling phase-based shelves
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1621
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1622
  $ hg shelve --config shelve.store=internal -q
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1623
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1624
#if phasebased
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1625
  $ hg log --hidden --template '{user}\n'
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1626
  shelve@localhost
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1627
#endif
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1628
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1629
#if stripbased
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1630
  $ hg log --hidden --template '{user}\n'
53229e170496 phase-shelve: correct unicode string to honor 'shelve.store=internal'
Jason R. Coombs <jaraco@jaraco.com>
parents: 49455
diff changeset
  1631
#endif
49587
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1632
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1633
clean up
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1634
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1635
#if phasebased
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1636
  $ mv $TESTTMP/hgrc-saved $HGRCPATH
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1637
#endif
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1638
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1639
changed files should be reachable in all shelves
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1640
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1641
create an extension that emits changed files
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1642
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1643
  $ cat > shelve-changed-files.py << EOF
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1644
  > """Command to emit changed files for a shelf"""
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1645
  > 
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1646
  > from mercurial import registrar, shelve
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1647
  > 
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1648
  > cmdtable = {}
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1649
  > command = registrar.command(cmdtable)
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1650
  > 
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1651
  > 
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1652
  > @command(b'shelve-changed-files')
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1653
  > def shelve_changed_files(ui, repo, name):
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1654
  >     shelf = shelve.ShelfDir(repo).get(name)
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1655
  >     for file in shelf.changed_files(ui, repo):
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1656
  >         ui.write(file + b'\n')
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1657
  > EOF
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1658
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1659
  $ hg --config extensions.shelve-changed-files=shelve-changed-files.py shelve-changed-files default
8a8005025d1c shelve: add test for Shelf.changed_files
Jason R. Coombs <jaraco@jaraco.com>
parents: 49527
diff changeset
  1660
  somefile.py