tests/test-shelve.t
author Boris Feld <boris.feld@octobus.net>
Wed, 06 Jun 2018 02:31:46 +0200
changeset 39744 52dfa1eb0ad4
parent 39519 5d69e2412ec8
child 39745 b2ec79559a4b
permissions -rw-r--r--
shelve: no longer strip internal commit when using internal phase When the internal phase is used, the internal commits we create during shelve will be automatically hidden, and we don't need to strip them. Avoiding strips gives much better performances and is less traumatic for caches. Test changes are all related to revision numbers increasing more quickly since we avoid stripping. At the end of `test-shelve.t` we now need manually strip the shelve-commit in addition to the x.shelve file deletion. This emulates a preexisting shelve after a repository upgrade. Note: The hidden internal commits confuses rebase a bit as shown by a new test added. This will happen when the user have shelve commits on top of a changeset to be rebased. We'll fix this in the next commit. As we still use a backup bundle, rebase can just strip the internal changesets and be fine.
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
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
     2
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
     3
  $ 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
     4
  > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
     5
  > mq =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
     6
  > shelve =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
     7
  > [defaults]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
     8
  > 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
     9
  > qnew = --date '0 0'
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
    10
  > [shelve]
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
    11
  > 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
    12
  > EOF
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    13
39519
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    14
#if phasebased
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    15
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    16
  $ cat <<EOF >> $HGRCPATH
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    17
  > [format]
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    18
  > internal-phase = yes
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    19
  > EOF
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    20
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    21
#endif
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
    22
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    23
  $ hg init repo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    24
  $ cd repo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    25
  $ mkdir a b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    26
  $ echo a > a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    27
  $ echo b > b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    28
  $ echo c > c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    29
  $ echo d > d
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    30
  $ echo x > x
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    31
  $ hg addremove -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    32
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    33
shelve has a help message
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    34
  $ hg shelve -h
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    35
  hg shelve [OPTION]... [FILE]...
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    36
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    37
  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
    38
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    39
      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
    40
      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
    41
      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
    42
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    43
      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
    44
      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
    45
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    46
      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
    47
      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
    48
      shelved.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    49
  
30419
819f96b82fa4 shelve: add missing space in help text
Mads Kiilerich <madski@unity3d.com>
parents: 30152
diff changeset
    50
      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
    51
      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
    52
      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
    53
      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
    54
      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
    55
  
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    56
      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
    57
      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
    58
      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
    59
      different name, use "--name".
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    60
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    61
      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
    62
      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
    63
      --patch" or "--stat" for more details.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    64
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    65
      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
    66
      changes, use "--cleanup".
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    67
  
29974
7109d5ddeb0c help: use single quotes in use warning
timeless <timeless@mozdev.org>
parents: 29593
diff changeset
    68
  (use 'hg help -e shelve' to show help for the shelve extension)
24477
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
  options ([+] can be repeated):
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    71
  
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
    72
   -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
    73
                            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
    74
   -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
    75
      --cleanup             delete all shelved changes
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    76
      --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
    77
   -d --delete              delete the named shelved change(s)
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
    78
   -e --edit                invoke editor on commit messages
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
   -l --list                list current shelves
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    80
   -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
    81
   -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
    82
   -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
    83
                            shelved changes as positional arguments)
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
   -i --interactive         interactive mode, only works while creating a shelve
38714
abcf500d527c shelve: improve help text for --patch and --stat
Danny Hooper <hooper@google.com>
parents: 38619
diff changeset
    85
      --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
    86
                            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
    87
                            arguments)
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    88
   -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
    89
   -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
    90
      --mq                  operate on patch repository
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    91
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    92
  (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
    93
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    94
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
    95
(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
    96
specified)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    97
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
    98
  $ 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
    99
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   100
  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
   101
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   102
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   103
  unshelving change 'default'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   104
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   105
  $ 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
   106
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   107
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   108
  nothing changed
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   109
  [1]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   110
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   111
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
   112
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   113
  $ ls .hg/shelve-backup
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   114
  default.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   115
  default.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   116
  default.shelve
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   117
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   118
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
   119
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
   120
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   121
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
   122
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   123
  $ 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
   124
  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
   125
  [255]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   126
  $ 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
   127
  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
   128
  [255]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   129
  $ 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
   130
  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
   131
  [255]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   132
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   133
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
   134
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   135
  $ 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
   136
  $ 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
   137
  $ hg shelve
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   138
  nothing changed
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   139
  [1]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   140
  $ hg branch .x -q
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   141
  $ 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
   142
  $ 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
   143
  nothing changed
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
   144
  [1]
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   145
  $ 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
   146
  $ 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
   147
  $ 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
   148
  nothing changed
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
   149
  [1]
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   150
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   151
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
   152
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
   153
  $ hg up default -q
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
   154
  $ 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
   155
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
   156
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
   157
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   158
  $ echo n > n
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   159
  $ hg add n
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   160
  $ 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
   161
  $ 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
   162
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   163
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
   164
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   165
  $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   166
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   167
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   168
  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
   169
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   170
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
   171
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   172
  $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   173
  $ 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
   174
  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
   175
  $ hg cp c c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   176
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   177
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   178
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   179
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   180
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   181
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   182
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   183
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   184
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
   185
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   186
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   187
  shelved as default-01
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   188
  2 files updated, 0 files merged, 2 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
   189
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   190
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   191
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
   192
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   193
  $ hg shelve -l
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   194
  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
   195
  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
   196
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   197
  $ 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
   198
  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
   199
  
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   200
  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
   201
  --- a/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   202
  +++ b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   203
  @@ -1,1 +1,2 @@
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   204
   a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   205
  +a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   206
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   207
  $ 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
   208
  abort: options '--list' and '--addremove' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   209
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   210
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   211
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
   212
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   213
  $ 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
   214
  $ 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
   215
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   216
ensure shelve backups aren't overwritten
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   217
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   218
  $ ls .hg/shelve-backup/
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   219
  default-1.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   220
  default-1.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   221
  default-1.shelve
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   222
  default.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   223
  default.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   224
  default.shelve
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   225
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   226
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
   227
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   228
  $ printf "z\na\n" > a/a
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   229
  $ hg unshelve --keep
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   230
  unshelving change 'default-01'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   231
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   232
  rebasing shelved changes
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   233
  merging a/a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   234
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   235
  $ hg revert --all -q
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   236
  $ 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
   237
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   238
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
   239
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
   240
(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
   241
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
   242
30554
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
   243
  $ f -t .hg/shelve-backup/default.patch
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
   244
  .hg/shelve-backup/default.patch: file
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
   245
  $ touch -t 200001010000 .hg/shelve-backup/default.patch
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
   246
  $ f -t .hg/shelve-backup/default-1.patch
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
   247
  .hg/shelve-backup/default-1.patch: file
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
   248
  $ touch -t 200001010000 .hg/shelve-backup/default-1.patch
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
   249
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   250
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   251
  unshelving change 'default-01'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   252
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   253
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   254
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   255
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   256
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   257
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   258
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   259
  $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   260
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
   261
(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
   262
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
   263
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
   264
  $ 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
   265
  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
   266
  default-01.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   267
  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
   268
  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
   269
  default-1.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   270
  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
   271
  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
   272
  default.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   273
  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
   274
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   275
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   276
  abort: no shelved changes to apply!
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   277
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   278
  $ hg unshelve foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   279
  abort: shelved change 'foo' not found
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   280
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   281
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   282
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
   283
(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
   284
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   285
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   286
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   287
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   288
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   289
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   290
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   291
  R b/b
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   292
  $ 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
   293
  wat
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   294
  
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   295
  
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   296
  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
   297
  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
   298
  HG: --
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   299
  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
   300
  HG: branch 'default'
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   301
  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
   302
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   303
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
   304
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   305
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   306
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   307
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   308
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   309
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   310
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   311
  $ hg shelve -l --stat
19855
a3b285882724 shelve: new output format for shelve listings
David Soria Parra <dsp@experimentalworks.net>
parents: 19854
diff changeset
   312
  wibble          (*)    wat (glob)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   313
   a/a |  1 +
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   314
   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
   315
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   316
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
   317
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
   318
  $ cd a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   319
  $ 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
   320
  $ cd ..
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   321
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   322
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   323
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   324
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   325
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   326
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   327
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   328
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   329
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
   330
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   331
  $ ls .hg/shelve-backup/
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   332
  default-01.hg
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   333
  default-01.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   334
  default-01.shelve
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   335
  wibble.hg
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   336
  wibble.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
   337
  wibble.shelve
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   338
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   339
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
   340
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   341
  $ hg shelve -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   342
  $ echo c>>a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   343
  $ hg commit -m second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   344
  $ 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
   345
  a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   346
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   347
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
   348
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   349
  $ mkdir foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   350
  $ echo foo > foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   351
  $ hg add foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   352
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   353
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
   354
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   355
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   356
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   357
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   358
  rebasing shelved changes
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   359
  merging a/a
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   360
  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
   361
  unresolved conflicts (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
   362
  [1]
33771
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   363
  $ 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
   364
  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
   365
  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
   366
  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
   367
  R b/b
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   368
  ? 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
   369
  # 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
   370
  
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   371
  # 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
   372
  # 
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   373
  #     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
   374
  # 
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
   375
  # 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
   376
  
38341
50f5fc232c16 morestatus: remove some extra spaces
Pulkit Goyal <7895pulkit@gmail.com>
parents: 38338
diff changeset
   377
  # To continue:    hg unshelve --continue
50f5fc232c16 morestatus: remove some extra spaces
Pulkit Goyal <7895pulkit@gmail.com>
parents: 38338
diff changeset
   378
  # 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
   379
  
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   380
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   381
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
   382
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   383
#if phasebased
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   384
  $ 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
   385
  8
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   386
  5
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   387
  $ 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
   388
  8
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   389
  5
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   390
#endif
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   391
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   392
#if stripbased
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   393
  $ hg heads -q --template '{rev}\n'
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   394
  5
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   395
  4
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   396
  $ hg parents -q --template '{rev}\n'
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   397
  4
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   398
  5
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   399
#endif
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   400
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   401
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   402
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   403
  M b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   404
  M c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   405
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   406
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   407
  $ hg diff
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   408
  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
   409
  --- a/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   410
  +++ b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   411
  @@ -1,2 +1,6 @@
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   412
   a
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
   413
  +<<<<<<< shelve:       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
   414
   c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   415
  +=======
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   416
  +a
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
   417
  +>>>>>>> working-copy: a68ec3400638 - shelve: changes to: [mq]: second.patch
22905
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   418
  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
   419
  rename from b/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   420
  rename to b.rename/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   421
  diff --git a/c b/c.copy
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   422
  copy from c
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   423
  copy to c.copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   424
  $ hg resolve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   425
  U a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   426
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   427
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   428
  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
   429
  (use 'hg unshelve --continue' or 'hg unshelve --abort')
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   430
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   431
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   432
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
   433
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   434
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   435
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   436
  M b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   437
  M c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   438
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   439
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   440
  $ hg unshelve -a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   441
  unshelve of 'default' aborted
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   442
  $ 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
   443
  [37]:2e69b451d1ea (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   444
  $ hg parents
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   445
  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
   446
  tag:         tip
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   447
  parent:      3:509104101065 (?)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   448
  user:        test
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   449
  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
   450
  summary:     second
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 resolve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   453
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   454
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   455
  ? a/a.orig
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
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
   458
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   459
  $ hg unshelve -c
28124
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   460
  abort: no unshelve in progress
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   461
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   462
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   463
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   464
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   465
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   466
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
   467
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   468
  $ hg unshelve -q
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   469
  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
   470
  unresolved conflicts (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
   471
  [1]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   472
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   473
attempt to continue
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   474
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   475
  $ hg unshelve -c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   476
  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
   477
  (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
   478
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   479
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   480
  $ 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
   481
  $ 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
   482
  (no more unresolved files)
27694
2dc363274702 shelve: hook afterresolvedstates
timeless <timeless@mozdev.org>
parents: 27092
diff changeset
   483
  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
   484
19963
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
   485
  $ 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
   486
  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
   487
  (use 'hg unshelve --continue' or 'hg unshelve --abort')
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
   488
  [255]
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
   489
28124
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   490
  $ hg graft --continue
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   491
  abort: no graft in progress
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   492
  (continue: hg unshelve --continue)
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   493
  [255]
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   494
  $ hg unshelve -c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   495
  unshelve of 'default' complete
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   496
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   497
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
   498
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   499
  $ hg parents
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   500
  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
   501
  tag:         tip
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   502
  parent:      3:509104101065 (?)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   503
  user:        test
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   504
  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
   505
  summary:     second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   506
  
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   507
  $ 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
   508
  [37]:2e69b451d1ea (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   509
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   510
  $ hg status -C
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   511
  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
   512
    b/b
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   513
  A c.copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   514
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   515
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   516
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   517
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   518
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   519
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
   520
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   521
  $ hg shelve -l
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
#if execbit
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
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
   526
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   527
  $ chmod +x a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   528
  $ 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
   529
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   530
  $ hg unshelve -q execbit
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   531
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   532
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   533
  $ hg revert a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   534
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   535
#endif
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   536
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   537
#if symlink
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   538
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   539
  $ rm a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   540
  $ 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
   541
  $ 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
   542
  $ hg status a/a
31021
4189d790e8a4 shelve: add -n/--name option to unshelve (issue5475)
liscju <piotr.listkiewicz@gmail.com>
parents: 30846
diff changeset
   543
  $ 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
   544
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   545
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   546
  $ hg revert a/a
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
#endif
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
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
   551
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   552
  $ hg revert -q -C -a
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   553
  $ 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
   554
  $ echo a >> 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
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   556
  $ echo x >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   557
  $ 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
   558
  $ hg add foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   559
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   560
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
   561
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   562
  $ hg unshelve --tool :merge-other --keep
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   563
  unshelving change 'default'
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   564
  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
   565
  rebasing shelved changes
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   566
  merging a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   567
  $ 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
   568
  (4|13):33f7f61e6c5e (re)
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   569
  $ hg shelve -l
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   570
  default         (*)* changes to: second (glob)
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   571
  $ hg status
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   572
  M a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   573
  A foo/foo
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   574
  $ cat a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   575
  a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   576
  c
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   577
  a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   578
  $ cat > a/a << EOF
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   579
  > a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   580
  > c
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   581
  > x
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   582
  > EOF
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   583
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   584
  $ HGMERGE=true hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   585
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   586
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   587
  rebasing shelved changes
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   588
  merging a/a
38618
c829749e7639 shelve: directly handle the initial parent alignment
Boris Feld <boris.feld@octobus.net>
parents: 38465
diff changeset
   589
  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
   590
  $ 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
   591
  (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
   592
  $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   593
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   594
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   595
  $ cat a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   596
  a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   597
  c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   598
  x
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   599
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   600
test keep and cleanup
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   601
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   602
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   603
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   604
  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
   605
  $ hg shelve --list
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   606
  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
   607
  $ hg unshelve -k
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   608
  unshelving change 'default'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   609
  $ hg shelve --list
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   610
  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
   611
  $ hg shelve --cleanup
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   612
  $ hg shelve --list
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   613
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   614
  $ 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
   615
  abort: options '--cleanup' and '--delete' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   616
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   617
  $ 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
   618
  abort: options '--cleanup' and '--patch' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   619
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   620
  $ 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
   621
  abort: options '--cleanup' and '--message' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   622
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   623
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   624
test bookmarks
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   625
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   626
  $ hg bookmark test
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   627
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   628
   \* 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
   629
  $ hg shelve
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   630
  shelved as test
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   631
  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
   632
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   633
   \* 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
   634
  $ hg unshelve
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   635
  unshelving change 'test'
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   636
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   637
   \* 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
   638
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   639
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
   640
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   641
  $ hg --config extensions.mq=! shelve
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   642
  shelved as test
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   643
  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
   644
  $ 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
   645
  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
   646
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   647
   \* 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
   648
  $ hg --config extensions.mq=! unshelve
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   649
  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
   650
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   651
   \* test                      (4|13):33f7f61e6c5e (re)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   652
22183
4dd9f606d0a6 tests: fixup issue markers to make check-commit happy
Matt Mackall <mpm@selenic.com>
parents: 21947
diff changeset
   653
shelve should leave dirstate clean (issue4055)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   654
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   655
  $ cd ..
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   656
  $ hg init shelverebase
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   657
  $ cd shelverebase
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   658
  $ printf 'x\ny\n' > x
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   659
  $ echo z > z
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   660
  $ hg commit -Aqm xy
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   661
  $ echo z >> x
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   662
  $ hg commit -Aqm z
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
   663
  $ hg up 5c4c67fb7dce
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   664
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   665
  $ printf 'a\nx\ny\nz\n' > x
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   666
  $ hg commit -Aqm xyz
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   667
  $ echo c >> z
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   668
  $ hg shelve
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   669
  shelved as default
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   670
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   671
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   672
#if phasebased
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   673
  $ hg rebase -d 6c103be8f4e4 --config extensions.rebase=
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   674
  rebasing 2:323bfa07f744 "xyz"
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   675
  merging x
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   676
  warning: orphaned descendants detected, not stripping 323bfa07f744 (?)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   677
#endif
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   678
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   679
#if stripbased
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
   680
  $ hg rebase -d 6c103be8f4e4 --config extensions.rebase=
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   681
  rebasing 2:323bfa07f744 "xyz" (tip)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   682
  merging x
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
   683
  saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-78114325-rebase.hg
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   684
#endif
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   685
  $ hg unshelve
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   686
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   687
  rebasing shelved changes
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   688
  $ hg status
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   689
  M z
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   690
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   691
  $ cd ..
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   692
22183
4dd9f606d0a6 tests: fixup issue markers to make check-commit happy
Matt Mackall <mpm@selenic.com>
parents: 21947
diff changeset
   693
shelve should only unshelve pending changes (issue4068)
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   694
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   695
  $ hg init onlypendingchanges
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   696
  $ cd onlypendingchanges
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   697
  $ touch a
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   698
  $ hg ci -Aqm a
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   699
  $ touch b
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   700
  $ hg ci -Aqm b
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
   701
  $ hg up -q 3903775176ed
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   702
  $ touch c
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   703
  $ hg ci -Aqm c
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   704
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   705
  $ touch d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   706
  $ hg add d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   707
  $ hg shelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   708
  shelved as default
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   709
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
   710
  $ hg up -q 0e067c57feba
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   711
  $ hg unshelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   712
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   713
  rebasing shelved changes
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   714
  $ hg status
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   715
  A d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   716
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   717
unshelve should work on an ancestor of the original commit
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   718
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   719
  $ hg shelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   720
  shelved as default
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   721
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
   722
  $ hg up 3903775176ed
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   723
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   724
  $ hg unshelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   725
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   726
  rebasing shelved changes
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   727
  $ hg status
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   728
  A d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   729
20064
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   730
test bug 4073 we need to enable obsolete markers for it
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   731
22955
fab9dda0f2a3 obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents: 22905
diff changeset
   732
  $ cat >> $HGRCPATH << EOF
fab9dda0f2a3 obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents: 22905
diff changeset
   733
  > [experimental]
34866
1644623ab096 config: use 'experimental.evolution.create-markers'
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   734
  > evolution.createmarkers=True
20064
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   735
  > EOF
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   736
  $ hg shelve
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   737
  shelved as default
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   738
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
   739
  $ hg debugobsolete `hg log -r 0e067c57feba -T '{node}'`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33332
diff changeset
   740
  obsoleted 1 changesets
20064
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   741
  $ hg unshelve
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   742
  unshelving change 'default'
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   743
20150
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   744
unshelve should leave unknown files alone (issue4113)
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   745
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   746
  $ echo e > e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   747
  $ hg shelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   748
  shelved as default
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   749
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   750
  $ hg status
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   751
  ? e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   752
  $ hg unshelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   753
  unshelving change 'default'
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   754
  $ hg status
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   755
  A d
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   756
  ? e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   757
  $ cat e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   758
  e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   759
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   760
unshelve should keep a copy of unknown files
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   761
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   762
  $ hg add e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   763
  $ hg shelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   764
  shelved as default
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   765
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   766
  $ echo z > e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   767
  $ hg unshelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   768
  unshelving change 'default'
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   769
  $ cat e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   770
  e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   771
  $ cat e.orig
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   772
  z
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   773
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   774
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   775
unshelve and conflicts with tracked and untracked files
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   776
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   777
 preparing:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   778
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   779
  $ rm *.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   780
  $ hg ci -qm 'commit stuff'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   781
  $ hg phase -p null:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   782
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   783
 no other changes - no merge:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   784
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   785
  $ echo f > f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   786
  $ hg add f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   787
  $ hg shelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   788
  shelved as default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   789
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   790
  $ echo g > f
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   791
  $ hg unshelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   792
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   793
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   794
  A f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   795
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   796
  $ cat f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   797
  f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   798
  $ cat f.orig
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   799
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   800
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   801
 other uncommitted changes - merge:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   802
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   803
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   804
  A f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   805
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   806
  $ hg shelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   807
  shelved as default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   808
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
37346
45a4799174a1 tests: disallow using simple store repo with bundlerepo
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36001
diff changeset
   809
#if repobundlerepo
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   810
  $ hg log -G --template '{rev}  {desc|firstline}  {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()' --hidden
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   811
  o  [48]  changes to: commit stuff  shelve@localhost (re)
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   812
  |
28627
d7af9b4ae7dd graphmod: set default edge styles for ascii graphs (BC)
Martijn Pieters <mjpieters@fb.com>
parents: 28573
diff changeset
   813
  ~
37346
45a4799174a1 tests: disallow using simple store repo with bundlerepo
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36001
diff changeset
   814
#endif
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   815
  $ hg log -G --template '{rev}  {desc|firstline}  {author}'
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   816
  @  [37]  commit stuff  test (re)
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   817
  |
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   818
  | o  2  c  test
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   819
  |/
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   820
  o  0  a  test
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   821
  
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   822
  $ mv f.orig f
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   823
  $ echo 1 > a
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   824
  $ hg unshelve --date '1073741824 0'
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   825
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   826
  temporarily committing pending changes (restore with 'hg unshelve --abort')
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   827
  rebasing shelved changes
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   828
  merging f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   829
  warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   830
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   831
  [1]
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   832
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   833
#if phasebased
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   834
  $ hg log -G --template '{rev}  {desc|firstline}  {author}  {date|isodate}'
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   835
  @  9  pending changes temporary commit  shelve@localhost  2004-01-10 13:37 +0000
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   836
  |
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   837
  | @  8  changes to: commit stuff  shelve@localhost  1970-01-01 00:00 +0000
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   838
  |/
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   839
  o  7  commit stuff  test  1970-01-01 00:00 +0000
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   840
  |
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   841
  | o  2  c  test  1970-01-01 00:00 +0000
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   842
  |/
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   843
  o  0  a  test  1970-01-01 00:00 +0000
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   844
  
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   845
#endif
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   846
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   847
#if stripbased
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   848
  $ hg log -G --template '{rev}  {desc|firstline}  {author}  {date|isodate}'
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   849
  @  5  changes to: commit stuff  shelve@localhost  1970-01-01 00:00 +0000
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   850
  |
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   851
  | @  4  pending changes temporary commit  shelve@localhost  2004-01-10 13:37 +0000
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   852
  |/
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   853
  o  3  commit stuff  test  1970-01-01 00:00 +0000
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   854
  |
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   855
  | o  2  c  test  1970-01-01 00:00 +0000
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   856
  |/
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   857
  o  0  a  test  1970-01-01 00:00 +0000
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   858
  
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   859
#endif
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   860
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   861
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   862
  M f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   863
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   864
  $ cat f
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
   865
  <<<<<<< shelve:       d44eae5c3d33 - shelve: pending changes temporary commit
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   866
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   867
  =======
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   868
  f
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
   869
  >>>>>>> working-copy: aef214a5229c - shelve: changes to: commit stuff
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   870
  $ cat f.orig
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   871
  g
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   872
  $ hg unshelve --abort -t false
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   873
  tool option will be ignored
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   874
  unshelve of 'default' aborted
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   875
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   876
  M a
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   877
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   878
  $ cat f.orig
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   879
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   880
  $ hg unshelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   881
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   882
  temporarily committing pending changes (restore with 'hg unshelve --abort')
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   883
  rebasing shelved changes
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   884
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   885
  M a
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   886
  A f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   887
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   888
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   889
 other committed changes - merge:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   890
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   891
  $ hg shelve f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   892
  shelved as default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   893
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   894
  $ hg ci a -m 'intermediate other change'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   895
  $ mv f.orig f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   896
  $ hg unshelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   897
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   898
  rebasing shelved changes
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   899
  merging f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   900
  warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   901
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   902
  [1]
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   903
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   904
  M f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   905
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   906
  $ cat f
38619
9b077e5fa8ba shelve: use more accurate description in conflict marker
Boris Feld <boris.feld@octobus.net>
parents: 38618
diff changeset
   907
  <<<<<<< shelve:       6b563750f973 - test: intermediate other change
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   908
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   909
  =======
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   910
  f
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
   911
  >>>>>>> working-copy: aef214a5229c - shelve: changes to: commit stuff
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   912
  $ cat f.orig
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   913
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   914
  $ hg unshelve --abort
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   915
  unshelve of 'default' aborted
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   916
  $ hg st
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   917
  ? f.orig
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   918
  $ cat f.orig
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   919
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   920
  $ hg shelve --delete default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   921
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   922
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
   923
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   924
  $ cd ../repo
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
   925
  $ 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
   926
  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
   927
  (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
   928
  $ 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
   929
  $ 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
   930
  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
   931
  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
   932
  $ 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
   933
  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
   934
  (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
   935
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   936
   \* 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
   937
  $ 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
   938
  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
   939
  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
   940
  merging a/a
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   941
  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
   942
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   943
  [1]
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   944
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   945
     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
   946
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   947
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
   948
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
   949
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   950
  $ 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
   951
  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
   952
  $ 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
   953
  (no more unresolved files)
27694
2dc363274702 shelve: hook afterresolvedstates
timeless <timeless@mozdev.org>
parents: 27092
diff changeset
   954
  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
   955
  $ hg unshelve -c
38463
f4776f8b98e0 shelve: directly handle `--continue`
Boris Feld <boris.feld@octobus.net>
parents: 38462
diff changeset
   956
  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
   957
  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
   958
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   959
   \* 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
   960
  $ 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
   961
  $ 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
   962
  ? 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
   963
  ? 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
   964
  $ hg summary
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
   965
  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
   966
   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
   967
  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
   968
  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
   969
  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
   970
  update: (current)
25382
6084926366b9 summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents: 25260
diff changeset
   971
  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
   972
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   973
  $ 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
   974
  abort: options '--delete' and '--stat' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   975
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   976
  $ 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
   977
  abort: options '--delete' and '--name' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   978
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   979
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   980
Test interactive shelve
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   981
  $ cat <<EOF >> $HGRCPATH
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   982
  > [ui]
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   983
  > interactive = true
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   984
  > EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   985
  $ echo 'a' >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   986
  $ cat a/a >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   987
  $ echo 'x' >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   988
  $ mv a/b a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   989
  $ echo 'a' >> foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   990
  $ hg st
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   991
  M a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   992
  ? a/a.orig
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   993
  ? foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   994
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   995
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   996
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   997
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   998
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   999
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1000
  $ cat foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1001
  foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1002
  a
25799
0eb093e40813 shelve: omit incorrect 'commit' suggestion at 'hg shelve -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25774
diff changeset
  1003
  $ 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
  1004
  abort: running non-interactively
0eb093e40813 shelve: omit incorrect 'commit' suggestion at 'hg shelve -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25774
diff changeset
  1005
  [255]
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1006
  $ hg shelve --interactive << EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1007
  > y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1008
  > y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1009
  > n
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1010
  > EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1011
  diff --git a/a/a b/a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1012
  2 hunks, 2 lines changed
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1013
  examine changes to 'a/a'? [Ynesfdaq?] y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1014
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1015
  @@ -1,3 +1,4 @@
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1016
  +a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1017
   a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1018
   c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1019
   x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1020
  record change 1/2 to 'a/a'? [Ynesfdaq?] y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1021
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1022
  @@ -1,3 +2,4 @@
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1023
   a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1024
   c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1025
   x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1026
  +x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1027
  record change 2/2 to 'a/a'? [Ynesfdaq?] n
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1028
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1029
  shelved as test
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1030
  merging a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1031
  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
  1032
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1033
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1034
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1035
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1036
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1037
  $ cat foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1038
  foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1039
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1040
  $ hg st
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1041
  M a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1042
  ? 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
  1043
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1044
   \* test                      (4|13):33f7f61e6c5e (re)
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1045
  $ hg unshelve
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1046
  unshelving change 'test'
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1047
  temporarily committing pending changes (restore with 'hg unshelve --abort')
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1048
  rebasing shelved changes
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1049
  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
  1050
  $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1051
   \* test                      (4|13):33f7f61e6c5e (re)
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1052
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1053
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1054
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1055
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1056
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
  1057
  x
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1058
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1059
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
  1060
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1061
  $ hg up --clean .
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1062
  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
  1063
  (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
  1064
  $ hg shelve --list
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1065
  $ 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
  1066
  $ 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
  1067
  $ hg shelve
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1068
  shelved as default
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1069
  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
  1070
  $ 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
  1071
  $ 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
  1072
  $ hg shelve
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1073
  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
  1074
  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
  1075
  $ 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
  1076
  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
  1077
  
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1078
  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
  1079
  new file mode 100644
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1080
  --- /dev/null
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1081
  +++ b/shelf-patch-b
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1082
  @@ -0,0 +1,1 @@
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1083
  +patch b
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1084
  default         (*)* changes to: create conflict (glob)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1085
  
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1086
  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
  1087
  new file mode 100644
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1088
  --- /dev/null
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1089
  +++ b/shelf-patch-a
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1090
  @@ -0,0 +1,1 @@
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1091
  +patch a
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1092
  $ 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
  1093
  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
  1094
   shelf-patch-b |  1 +
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1095
   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
  1096
  default         (*)* changes to: create conflict (glob)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1097
   shelf-patch-a |  1 +
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1098
   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
  1099
  $ 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
  1100
  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
  1101
  
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1102
  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
  1103
  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
  1104
  --- /dev/null
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1105
  +++ 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
  1106
  @@ -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
  1107
  +patch a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1108
  $ 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
  1109
  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
  1110
   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
  1111
   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
  1112
  $ 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
  1113
  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
  1114
  [255]
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1115
  $ 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
  1116
  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
  1117
  [255]
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1118
  $ hg shelve --patch default nonexistentshelf
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1119
  abort: cannot find shelf nonexistentshelf
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1120
  [255]
38715
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1121
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1122
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
  1123
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
  1124
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1125
  $ 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
  1126
  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
  1127
  
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1128
  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
  1129
  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
  1130
  --- /dev/null
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1131
  +++ 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
  1132
  @@ -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
  1133
  +patch b
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1134
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1135
  $ cd ..
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1136
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1137
you shouldn't be able to ask for the patch/stats of 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
  1138
there are no shelves
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1139
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1140
  $ hg init noshelves
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1141
  $ cd noshelves
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1142
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1143
  $ hg shelve --patch
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1144
  abort: there are no shelves to show
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1145
  [255]
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1146
  $ hg shelve --stat
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
  1147
  abort: there are no shelves to show
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
  1148
  [255]
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1149
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1150
  $ cd ..
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1151
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1152
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
  1153
--------------------------------------------------
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1154
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1155
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
  1156
26914
6839f2d4eea7 test: enforce generaldelta format with the right option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26776
diff changeset
  1157
  $ 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
  1158
  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
  1159
  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
  1160
  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
  1161
  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
  1162
  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
  1163
  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
  1164
  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
  1165
  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
  1166
  $ 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
  1167
  $ 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
  1168
  $ 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
  1169
  $ 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
  1170
  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
  1171
  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
  1172
  $ hg debugbundle .hg/shelved/*.hg
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
  1173
  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
  1174
  $ cd ..
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1175
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1176
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
  1177
26914
6839f2d4eea7 test: enforce generaldelta format with the right option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26776
diff changeset
  1178
  $ 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
  1179
  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
  1180
  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
  1181
  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
  1182
  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
  1183
  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
  1184
  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
  1185
  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
  1186
  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
  1187
  $ 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
  1188
  $ 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
  1189
  $ 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
  1190
  $ 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
  1191
  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
  1192
  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
  1193
  $ 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
  1194
  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
  1195
  changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
  1196
      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
  1197
  $ cd ..
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1198
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1199
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
  1200
------------------------------------------------------------------------
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1201
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1202
  $ cd repo
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1203
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1204
  $ echo xxxx >> x
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1205
  $ 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
  1206
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1207
  $ 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
  1208
  > echo "==== \$1:"
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1209
  > 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
  1210
  > # 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
  1211
  > unset HG_PENDING
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1212
  > 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
  1213
  > echo "===="
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1214
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1215
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1216
  $ 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
  1217
  > [defaults]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1218
  > # 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
  1219
  > 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
  1220
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1221
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1222
"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
  1223
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1224
(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
  1225
(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
  1226
(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
  1227
(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
  1228
(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
  1229
(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
  1230
(7) abort transaction
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1231
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1232
== 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
  1233
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1234
  $ 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
  1235
  > [hooks]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1236
  > 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
  1237
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1238
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1239
  $ echo nnnn >> n
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1240
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1241
  $ 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
  1242
  ==== before-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1243
  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
  1244
  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
  1245
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1246
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1247
  $ 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
  1248
  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
  1249
  rebasing shelved changes
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1250
  ==== preupdate:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1251
  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
  1252
  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
  1253
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1254
  ==== preupdate:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1255
  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
  1256
  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
  1257
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1258
  ==== preupdate:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1259
  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
  1260
  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
  1261
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1262
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1263
  $ 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
  1264
  > [hooks]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1265
  > preupdate.visibility =
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1266
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1267
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1268
  $ 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
  1269
  ==== after-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1270
  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
  1271
  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
  1272
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1273
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1274
== 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
  1275
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
  1276
  $ 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
  1277
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1278
  $ 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
  1279
  > [hooks]
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1280
  > 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
  1281
  > EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1282
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1283
  $ 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
  1284
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1285
  $ 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
  1286
  ==== before-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1287
  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
  1288
  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
  1289
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1290
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1291
  $ 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
  1292
  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
  1293
  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
  1294
  ==== update:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1295
  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
  1296
  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
  1297
  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
  1298
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1299
  ==== update:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1300
  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
  1301
  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
  1302
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1303
  ==== update:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1304
  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
  1305
  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
  1306
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1307
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1308
  $ 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
  1309
  > [hooks]
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1310
  > update.visibility =
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1311
  > EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1312
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1313
  $ 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
  1314
  ==== after-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1315
  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
  1316
  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
  1317
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1318
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1319
  $ cd ..
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1320
26942
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1321
test .orig files go where the user wants them to
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1322
---------------------------------------------------------------
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1323
  $ hg init salvage
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1324
  $ cd salvage
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1325
  $ echo 'content' > root
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1326
  $ hg commit -A -m 'root' -q
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1327
  $ echo '' > root
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1328
  $ hg shelve -q
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1329
  $ echo 'contADDent' > root
26942
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1330
  $ hg unshelve -q --config 'ui.origbackuppath=.hg/origbackups'
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1331
  warning: conflicts while merging root! (edit, then use 'hg resolve --mark')
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1332
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1333
  [1]
26942
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1334
  $ ls .hg/origbackups
34146
9e4f82bc2b0b scmutil: don't append .orig to backups in origbackuppath (BC)
Mark Thomas <mbthomas@fb.com>
parents: 34025
diff changeset
  1335
  root
26942
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1336
  $ rm -rf .hg/origbackups
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1337
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1338
test Abort unshelve always gets user out of the unshelved state
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1339
---------------------------------------------------------------
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1340
38465
a8f99334ae31 shelve: stop testing missing rebase state file
Boris Feld <boris.feld@octobus.net>
parents: 38464
diff changeset
  1341
with a corrupted shelve state file
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1342
  $ sed 's/ae8c668541e8/123456789012/' .hg/shelvedstate > ../corrupt-shelvedstate
38464
920f69c0b549 shelve: actually test corrupted shelve state
Boris Feld <boris.feld@octobus.net>
parents: 38463
diff changeset
  1343
  $ mv ../corrupt-shelvedstate .hg/shelvestate
38338
2313a3599e41 shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents: 38337
diff changeset
  1344
  $ hg unshelve --abort 2>&1 | grep 'aborted'
38465
a8f99334ae31 shelve: stop testing missing rebase state file
Boris Feld <boris.feld@octobus.net>
parents: 38464
diff changeset
  1345
  unshelve of 'default' aborted
38338
2313a3599e41 shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents: 38337
diff changeset
  1346
  $ hg summary
2313a3599e41 shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents: 38337
diff changeset
  1347
  parent: 0:ae8c668541e8 tip
2313a3599e41 shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents: 38337
diff changeset
  1348
   root
2313a3599e41 shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents: 38337
diff changeset
  1349
  branch: default
38465
a8f99334ae31 shelve: stop testing missing rebase state file
Boris Feld <boris.feld@octobus.net>
parents: 38464
diff changeset
  1350
  commit: 1 modified
38338
2313a3599e41 shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents: 38337
diff changeset
  1351
  update: (current)
2313a3599e41 shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net>
parents: 38337
diff changeset
  1352
  phases: 1 draft
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1353
  $ hg up -C .
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1354
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1355
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1356
  $ cd ..
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1357
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1358
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
  1359
-----------------------------------------------------------------------
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1360
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1361
  $ cat <<EOF >> $HGRCPATH
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1362
  > [extensions]
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1363
  > share =
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1364
  > EOF
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1365
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1366
  $ 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
  1367
     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
  1368
  $ 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
  1369
  updating working directory
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1370
  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
  1371
  $ cd share
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1372
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1373
  $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1374
     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
  1375
  $ hg bookmarks foo
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1376
  $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1377
   \* 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
  1378
     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
  1379
  $ echo x >> x
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1380
  $ hg shelve
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1381
  shelved as foo
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1382
  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
  1383
  $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1384
   \* 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
  1385
     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
  1386
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1387
  $ hg unshelve
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1388
  unshelving change 'foo'
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1389
  $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1390
   \* 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
  1391
     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
  1392
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1393
  $ cd ..
27908
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1394
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1395
Shelve and unshelve unknown files. For the purposes of unshelve, a shelved
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1396
unknown file is the same as a shelved added file, except that it will be in
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1397
unknown state after unshelve if and only if it was either absent or unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1398
before the unshelve operation.
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1399
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1400
  $ hg init unknowns
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1401
  $ cd unknowns
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1402
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1403
The simplest case is if I simply have an unknown file that I shelve and unshelve
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1404
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1405
  $ echo unknown > unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1406
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1407
  ? unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1408
  $ hg shelve --unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1409
  shelved as default
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1410
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1411
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1412
  $ hg unshelve
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1413
  unshelving change 'default'
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1414
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1415
  ? unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1416
  $ rm unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1417
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1418
If I shelve, add the file, and unshelve, does it stay added?
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1419
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1420
  $ echo unknown > unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1421
  $ hg shelve -u
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1422
  shelved as default
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1423
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1424
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1425
  $ touch unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1426
  $ hg add unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1427
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1428
  A unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1429
  $ hg unshelve
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1430
  unshelving change 'default'
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1431
  temporarily committing pending changes (restore with 'hg unshelve --abort')
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1432
  rebasing shelved changes
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1433
  merging unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1434
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1435
  A unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1436
  $ hg forget unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1437
  $ rm unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1438
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1439
And if I shelve, commit, then unshelve, does it become modified?
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1440
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1441
  $ echo unknown > unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1442
  $ hg shelve -u
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1443
  shelved as default
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1444
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1445
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1446
  $ touch unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1447
  $ hg add unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1448
  $ hg commit -qm "Add unknown"
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1449
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1450
  $ hg unshelve
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1451
  unshelving change 'default'
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1452
  rebasing shelved changes
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1453
  merging unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1454
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1455
  M unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1456
  $ hg remove --force unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1457
  $ hg commit -qm "Remove unknown"
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1458
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1459
  $ cd ..
28571
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1460
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1461
We expects that non-bare shelve keeps newly created branch in
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1462
working directory.
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1463
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1464
  $ hg init shelve-preserve-new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1465
  $ cd shelve-preserve-new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1466
  $ echo "a" >> a
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1467
  $ hg add a
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1468
  $ echo "b" >> b
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1469
  $ hg add b
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1470
  $ hg commit -m "ab"
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1471
  $ echo "aa" >> a
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1472
  $ echo "bb" >> b
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1473
  $ hg branch new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1474
  marked working directory as branch new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1475
  (branches are permanent and global, did you want a bookmark?)
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1476
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1477
  M a
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1478
  M b
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1479
  $ hg branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1480
  new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1481
  $ hg shelve a
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1482
  shelved as default
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1483
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1484
  $ hg branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1485
  new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1486
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1487
  M b
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1488
  $ touch "c" >> c
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1489
  $ hg add c
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1490
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1491
  M b
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1492
  A c
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1493
  $ hg shelve --exclude c
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1494
  shelved as default-01
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1495
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1496
  $ hg branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1497
  new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1498
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1499
  A c
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1500
  $ hg shelve --include c
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1501
  shelved as default-02
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1502
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1503
  $ hg branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1504
  new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1505
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1506
  $ echo "d" >> d
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1507
  $ hg add d
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1508
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1509
  A d
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1510
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1511
We expect that bare-shelve will not keep branch in current working directory.
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1512
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1513
  $ hg shelve
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1514
  shelved as default-03
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1515
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1516
  $ hg branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1517
  default
30549
9e29d4e4e08b shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents: 30542
diff changeset
  1518
  $ cd ..
28571
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1519
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1520
When i shelve commit on newly created branch i expect
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1521
that after unshelve newly created branch will be preserved.
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1522
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1523
  $ hg init shelve_on_new_branch_simple
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1524
  $ cd shelve_on_new_branch_simple
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1525
  $ echo "aaa" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1526
  $ hg commit -A -m "a"
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1527
  adding a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1528
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1529
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1530
  $ hg branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1531
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1532
  (branches are permanent and global, did you want a bookmark?)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1533
  $ echo "bbb" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1534
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1535
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1536
  $ hg shelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1537
  shelved as default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1538
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1539
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1540
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1541
  $ echo "bbb" >> b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1542
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1543
  ? b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1544
  $ hg unshelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1545
  unshelving change 'default'
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1546
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1547
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1548
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1549
  ? b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1550
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1551
  test
30549
9e29d4e4e08b shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents: 30542
diff changeset
  1552
  $ cd ..
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1553
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1554
When i shelve commit on newly created branch, make
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1555
some changes, unshelve it and running into merge
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1556
conflicts i expect that after fixing them and
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1557
running unshelve --continue newly created branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1558
will be preserved.
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1559
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1560
  $ hg init shelve_on_new_branch_conflict
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1561
  $ cd shelve_on_new_branch_conflict
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1562
  $ echo "aaa" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1563
  $ hg commit -A -m "a"
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1564
  adding a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1565
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1566
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1567
  $ hg branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1568
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1569
  (branches are permanent and global, did you want a bookmark?)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1570
  $ echo "bbb" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1571
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1572
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1573
  $ hg shelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1574
  shelved as default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1575
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1576
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1577
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1578
  $ echo "ccc" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1579
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1580
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1581
  $ hg unshelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1582
  unshelving change 'default'
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1583
  temporarily committing pending changes (restore with 'hg unshelve --abort')
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1584
  rebasing shelved changes
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1585
  merging a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1586
  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1587
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1588
  [1]
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1589
  $ echo "aaabbbccc" > a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1590
  $ rm a.orig
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1591
  $ hg resolve --mark a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1592
  (no more unresolved files)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1593
  continue: hg unshelve --continue
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1594
  $ hg unshelve --continue
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1595
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1596
  unshelve of 'default' complete
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1597
  $ cat a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1598
  aaabbbccc
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1599
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1600
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1601
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1602
  test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1603
  $ hg commit -m "test-commit"
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1604
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1605
When i shelve on test branch, update to default branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1606
and unshelve i expect that it will not preserve previous
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1607
test branch.
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1608
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1609
  $ echo "xxx" > b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1610
  $ hg add b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1611
  $ hg shelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1612
  shelved as test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1613
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
  1614
  $ hg update -r 7049e48789d7
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1615
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1616
  $ hg unshelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1617
  unshelving change 'test'
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1618
  rebasing shelved changes
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1619
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1620
  A b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1621
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1622
  default
30549
9e29d4e4e08b shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents: 30542
diff changeset
  1623
  $ cd ..
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1624
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1625
When i unshelve resulting in merge conflicts and makes saved
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1626
file shelvedstate looks like in previous versions in
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1627
mercurial(without restore branch information in 7th line) i
30332
318a24b52eeb spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com>
parents: 30152
diff changeset
  1628
expect that after resolving conflicts and successfully
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1629
running 'shelve --continue' the branch information won't be
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1630
restored and branch will be unchanged.
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1631
28941
8353d154a9bd test-shelve: shorten a long path so it works on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 28627
diff changeset
  1632
shelve on new branch, conflict with previous shelvedstate
8353d154a9bd test-shelve: shorten a long path so it works on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 28627
diff changeset
  1633
8353d154a9bd test-shelve: shorten a long path so it works on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 28627
diff changeset
  1634
  $ hg init conflict
8353d154a9bd test-shelve: shorten a long path so it works on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 28627
diff changeset
  1635
  $ cd conflict
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1636
  $ echo "aaa" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1637
  $ hg commit -A -m "a"
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1638
  adding a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1639
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1640
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1641
  $ hg branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1642
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1643
  (branches are permanent and global, did you want a bookmark?)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1644
  $ echo "bbb" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1645
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1646
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1647
  $ hg shelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1648
  shelved as default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1649
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1650
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1651
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1652
  $ echo "ccc" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1653
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1654
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1655
  $ hg unshelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1656
  unshelving change 'default'
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1657
  temporarily committing pending changes (restore with 'hg unshelve --abort')
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1658
  rebasing shelved changes
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1659
  merging a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1660
  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1661
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1662
  [1]
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1663
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1664
Removing restore branch information from shelvedstate file(making it looks like
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1665
in previous versions) and running unshelve --continue
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1666
32285
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1667
  $ cp .hg/shelvedstate .hg/shelvedstate_old
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1668
  $ cat .hg/shelvedstate_old | grep -v 'branchtorestore' > .hg/shelvedstate
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1669
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1670
  $ echo "aaabbbccc" > a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1671
  $ rm a.orig
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1672
  $ hg resolve --mark a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1673
  (no more unresolved files)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1674
  continue: hg unshelve --continue
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1675
  $ hg unshelve --continue
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1676
  unshelve of 'default' complete
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1677
  $ cat a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1678
  aaabbbccc
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1679
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1680
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1681
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1682
  default
30549
9e29d4e4e08b shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents: 30542
diff changeset
  1683
  $ cd ..
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1684
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1685
On non bare shelve the branch information shouldn't be restored
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1686
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1687
  $ hg init bare_shelve_on_new_branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1688
  $ cd bare_shelve_on_new_branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1689
  $ echo "aaa" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1690
  $ hg commit -A -m "a"
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1691
  adding a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1692
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1693
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1694
  $ hg branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1695
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1696
  (branches are permanent and global, did you want a bookmark?)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1697
  $ echo "bbb" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1698
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1699
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1700
  $ hg shelve a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1701
  shelved as default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1702
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1703
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1704
  test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1705
  $ hg branch default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1706
  marked working directory as branch default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1707
  (branches are permanent and global, did you want a bookmark?)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1708
  $ echo "bbb" >> b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1709
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1710
  ? b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1711
  $ hg unshelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1712
  unshelving change 'default'
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1713
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1714
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1715
  ? b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1716
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1717
  default
29536
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1718
  $ cd ..
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1719
30332
318a24b52eeb spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com>
parents: 30152
diff changeset
  1720
Prepare unshelve with a corrupted shelvedstate
29536
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1721
  $ hg init r1 && cd r1
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1722
  $ echo text1 > file && hg add file
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1723
  $ hg shelve
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1724
  shelved as default
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1725
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1726
  $ echo text2 > file && hg ci -Am text1
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1727
  adding file
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1728
  $ hg unshelve
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1729
  unshelving change 'default'
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1730
  rebasing shelved changes
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1731
  merging file
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1732
  warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1733
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1734
  [1]
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1735
  $ echo somethingsomething > .hg/shelvedstate
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1736
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1737
Unshelve --continue fails with appropriate message if shelvedstate is corrupted
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1738
  $ hg unshelve --continue
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1739
  abort: corrupted shelved state file
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1740
  (please run hg unshelve --abort to abort unshelve operation)
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1741
  [255]
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1742
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1743
Unshelve --abort works with a corrupted shelvedstate
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1744
  $ hg unshelve --abort
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1745
  could not read shelved state file, your working copy may be in an unexpected state
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1746
  please update to some commit
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1747
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1748
Unshelve --abort fails with appropriate message if there's no unshelve in
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1749
progress
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1750
  $ hg unshelve --abort
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1751
  abort: no unshelve in progress
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1752
  [255]
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1753
  $ cd ..
30522
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1754
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1755
Unshelve respects --keep even if user intervention is needed
30549
9e29d4e4e08b shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents: 30542
diff changeset
  1756
  $ hg init unshelvekeep && cd unshelvekeep
30522
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1757
  $ echo 1 > file && hg ci -Am 1
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1758
  adding file
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1759
  $ echo 2 >> file
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1760
  $ hg shelve
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1761
  shelved as default
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1762
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1763
  $ echo 3 >> file && hg ci -Am 13
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1764
  $ hg shelve --list
36001
9f454a717c43 tests: allow age to go up to triple digits in test-shelve.t
Anton Shestakov <av6@dwimlabs.net>
parents: 35393
diff changeset
  1765
  default         (*s ago) * changes to: 1 (glob)
30522
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1766
  $ hg unshelve --keep
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1767
  unshelving change 'default'
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1768
  rebasing shelved changes
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1769
  merging file
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1770
  warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1771
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1772
  [1]
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1773
  $ hg resolve --mark file
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1774
  (no more unresolved files)
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1775
  continue: hg unshelve --continue
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1776
  $ hg unshelve --continue
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1777
  unshelve of 'default' complete
7b3136bc7bfd shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com>
parents: 30460
diff changeset
  1778
  $ hg shelve --list
36001
9f454a717c43 tests: allow age to go up to triple digits in test-shelve.t
Anton Shestakov <av6@dwimlabs.net>
parents: 35393
diff changeset
  1779
  default         (*s ago) * changes to: 1 (glob)
30549
9e29d4e4e08b shelve: fix use of unexpected working dirs in test-shelve.t
Kostia Balytskyi <ikostia@fb.com>
parents: 30542
diff changeset
  1780
  $ cd ..
30846
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1781
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1782
Unshelving when there are deleted files does not crash (issue4176)
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1783
  $ hg init unshelve-deleted-file && cd unshelve-deleted-file
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1784
  $ echo a > a && echo b > b && hg ci -Am ab
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1785
  adding a
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1786
  adding b
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1787
  $ echo aa > a && hg shelve
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1788
  shelved as default
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1789
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1790
  $ rm b
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1791
  $ hg st
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1792
  ! b
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1793
  $ hg unshelve
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1794
  unshelving change 'default'
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1795
  $ hg shelve
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1796
  shelved as default
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1797
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1798
  $ rm a && echo b > b
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1799
  $ hg st
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1800
  ! a
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1801
  $ hg unshelve
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1802
  unshelving change 'default'
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1803
  abort: shelved change touches missing files
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1804
  (run hg status to see which files are missing)
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1805
  [255]
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1806
  $ hg st
dfc6663f97ca shelve: make unshelve not crash when there are missing files (issue4176)
Kostia Balytskyi <ikostia@fb.com>
parents: 30823
diff changeset
  1807
  ! a
32285
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1808
  $ cd ..
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1809
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1810
New versions of Mercurial know how to read onld shelvedstate files
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1811
  $ hg init oldshelvedstate
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1812
  $ cd oldshelvedstate
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1813
  $ echo root > root && hg ci -Am root
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1814
  adding root
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1815
  $ echo 1 > a
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1816
  $ hg add a
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1817
  $ hg shelve --name ashelve
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1818
  shelved as ashelve
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1819
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1820
  $ echo 2 > a
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1821
  $ hg ci -Am a
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1822
  adding a
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1823
  $ hg unshelve
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1824
  unshelving change 'ashelve'
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1825
  rebasing shelved changes
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1826
  merging a
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1827
  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1828
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1829
  [1]
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1830
putting v1 shelvedstate file in place of a created v2
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1831
  $ cat << EOF > .hg/shelvedstate
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1832
  > 1
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1833
  > ashelve
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1834
  > 8b058dae057a5a78f393f4535d9e363dd5efac9d
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1835
  > 8b058dae057a5a78f393f4535d9e363dd5efac9d
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
  1836
  > 8b058dae057a5a78f393f4535d9e363dd5efac9d f543b27db2cdb41737e2e0008dc524c471da1446
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
  1837
  > f543b27db2cdb41737e2e0008dc524c471da1446
32285
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1838
  > 
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1839
  > nokeep
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1840
  > :no-active-bookmark
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1841
  > EOF
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1842
  $ echo 1 > a
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1843
  $ hg resolve --mark a
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1844
  (no more unresolved files)
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1845
  continue: hg unshelve --continue
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1846
mercurial does not crash
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1847
  $ hg unshelve --continue
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1848
  unshelve of 'ashelve' complete
39387
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1849
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1850
#if phasebased
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1851
39387
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1852
Unshelve without .shelve metadata:
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1853
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1854
  $ hg shelve
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1855
  shelved as default
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1856
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1857
  $ cat .hg/shelved/default.shelve
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1858
  node=82e0cb9893247d12667017593ce1e5655860f1ac
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1859
  $ hg strip --hidden --rev 82e0cb989324 --no-backup
39387
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1860
  $ rm .hg/shelved/default.shelve
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1861
  $ echo 3 > a
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1862
  $ hg unshelve
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1863
  unshelving change 'default'
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1864
  temporarily committing pending changes (restore with 'hg unshelve --abort')
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1865
  rebasing shelved changes
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1866
  merging a
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1867
  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1868
  unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1869
  [1]
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1870
  $ cat .hg/shelved/default.shelve
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1871
  node=82e0cb9893247d12667017593ce1e5655860f1ac
da84cca65036 shelve: fix crash on unshelve without .shelve metadata file
Yuya Nishihara <yuya@tcha.org>
parents: 39376
diff changeset
  1872
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1873
#endif
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
  1874
32285
fe3105e6e051 shelve: make shelvestate use simplekeyvaluefile
Kostia Balytskyi <ikostia@fb.com>
parents: 31228
diff changeset
  1875
  $ cd ..