tests/test-shelve.t
author Gregory Szorc <gregory.szorc@gmail.com>
Sun, 17 Jul 2016 15:10:30 -0700
changeset 29592 37cccad55410
parent 29536 b17a6e3cd2ac
child 29593 953839de96ab
permissions -rw-r--r--
util: implement a deterministic __repr__ on sortdict `hg debugbundle` is calling repr() on bundle2 part params, which are now util.sortdict instances. Unfortunately, repr() doesn't appear to be deterministic for util.sortdict. So, we implement one. We include the type name because that's the common convention for __repr__ implementations. Having the type name in `hg debugbundle` is a bit ugly. But it's a debug command and I don't care enough to fix it.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
     1
  $ 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
     2
  > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
     3
  > mq =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
     4
  > shelve =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
     5
  > [defaults]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
     6
  > 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
     7
  > qnew = --date '0 0'
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
     8
  > [shelve]
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
     9
  > 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
    10
  > EOF
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    11
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    12
  $ hg init repo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    13
  $ cd repo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    14
  $ mkdir a b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    15
  $ echo a > a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    16
  $ echo b > b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    17
  $ echo c > c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    18
  $ echo d > d
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    19
  $ echo x > x
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    20
  $ hg addremove -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    21
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    22
shelve has a help message
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    23
  $ hg shelve -h
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    24
  hg shelve [OPTION]... [FILE]...
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    25
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    26
  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
    27
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    28
      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
    29
      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
    30
      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
    31
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    32
      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
    33
      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
    34
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    35
      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
    36
      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
    37
      shelved.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    38
  
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
    39
      In bare shelve(when no files are specified, without interactive, include
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
    40
      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
    41
      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
    42
      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
    43
      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
    44
  
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    45
      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
    46
      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
    47
      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
    48
      different name, use "--name".
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    49
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    50
      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
    51
      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
    52
      --patch" or "--stat" for more details.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    53
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    54
      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
    55
      changes, use "--cleanup".
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    56
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    57
  (use "hg help -e shelve" to show help for the shelve extension)
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    58
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    59
  options ([+] can be repeated):
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
   -A --addremove           mark new/missing files as added/removed before
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    62
                            shelving
27921
158bdc896572 shelve: lowercase flag description
timeless <timeless@mozdev.org>
parents: 27908
diff changeset
    63
   -u --unknown             store unknown files in the shelve
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    64
      --cleanup             delete all shelved changes
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    65
      --date DATE           shelve with the specified commit date
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    66
   -d --delete              delete the named shelved change(s)
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    67
   -e --edit                invoke editor on commit messages
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    68
   -l --list                list current shelves
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    69
   -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
    70
   -n --name NAME           use the given name for the shelved commit
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    71
   -p --patch               show patch
25260
8fa3e995a375 selve: make 'shelve --interactive' not experimental
Laurent Charignon <lcharignon@fb.com>
parents: 25111
diff changeset
    72
   -i --interactive         interactive mode, only works while creating a shelve
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    73
      --stat                output diffstat-style summary of changes
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    74
   -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
    75
   -X --exclude PATTERN [+] exclude names matching the given patterns
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    76
      --mq                  operate on patch repository
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    77
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    78
  (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
    79
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    80
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
    81
(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
    82
specified)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    83
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
    84
  $ 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
    85
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    86
  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
    87
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    88
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    89
  unshelving change 'default'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    90
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    91
  $ 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
    92
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    93
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    94
  nothing changed
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    95
  [1]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    96
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
    97
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
    98
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
    99
  $ ls .hg/shelve-backup
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   100
  default.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   101
  default.patch
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   102
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
   103
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
   104
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   105
  $ echo n > n
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   106
  $ hg add n
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   107
  $ 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
   108
  $ 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
   109
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   110
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
   111
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   112
  $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   113
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   114
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   115
  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
   116
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   117
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
   118
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   119
  $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   120
  $ hg mv b b.rename
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   121
  moving b/b to b.rename/b (glob)
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   122
  $ 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
   123
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   124
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   125
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   126
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   127
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   128
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   129
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   130
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   131
prevent some foot-shooting
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   132
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   133
  $ hg shelve -n foo/bar
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   134
  abort: shelved change names may not contain slashes
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   135
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   136
  $ hg shelve -n .baz
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   137
  abort: shelved change names may not start with '.'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   138
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   139
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   140
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
   141
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   142
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   143
  shelved as default-01
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   144
  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
   145
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   146
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   147
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
   148
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   149
  $ hg shelve -l
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   150
  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
   151
  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
   152
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   153
  $ 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
   154
  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
   155
  
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   156
  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
   157
  --- a/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   158
  +++ b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   159
  @@ -1,1 +1,2 @@
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   160
   a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   161
  +a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   162
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   163
  $ 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
   164
  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
   165
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   166
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   167
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
   168
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   169
  $ 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
   170
  $ 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
   171
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   172
ensure shelve backups aren't overwritten
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   173
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   174
  $ ls .hg/shelve-backup/
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   175
  default-1.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   176
  default-1.patch
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   177
  default.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   178
  default.patch
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   179
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   180
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
   181
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   182
  $ printf "z\na\n" > a/a
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   183
  $ hg unshelve --keep
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   184
  unshelving change 'default-01'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   185
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   186
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   187
  rebasing 4:32c69314e062 "changes to: [mq]: second.patch" (tip)
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   188
  merging a/a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   189
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   190
  $ hg revert --all -q
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   191
  $ 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
   192
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   193
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
   194
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
   195
(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
   196
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
   197
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
   198
  $ f -t .hg/shelve-backup/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
   199
  .hg/shelve-backup/default.hg: file
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
   200
  $ touch -t 200001010000 .hg/shelve-backup/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
   201
  $ f -t .hg/shelve-backup/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
   202
  .hg/shelve-backup/default-1.hg: file
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
   203
  $ touch -t 200001010000 .hg/shelve-backup/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
   204
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   205
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   206
  unshelving change 'default-01'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   207
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   208
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   209
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   210
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   211
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   212
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   213
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   214
  $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   215
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
   216
(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
   217
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
   218
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
   219
  $ 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
   220
  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
   221
  default-01.patch
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
   222
  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
   223
  default-1.patch
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
   224
  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
   225
  default.patch
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
   226
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   227
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   228
  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
   229
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   230
  $ hg unshelve foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   231
  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
   232
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   233
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   234
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
   235
(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
   236
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   237
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   238
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   239
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   240
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   241
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   242
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   243
  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
   244
  $ 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
   245
  wat
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   246
  
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   247
  
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   248
  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
   249
  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
   250
  HG: --
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   251
  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
   252
  HG: branch 'default'
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   253
  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
   254
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   255
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
   256
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   257
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   258
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   259
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   260
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   261
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   262
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   263
  $ hg shelve -l --stat
19855
a3b285882724 shelve: new output format for shelve listings
David Soria Parra <dsp@experimentalworks.net>
parents: 19854
diff changeset
   264
  wibble          (*)    wat (glob)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   265
   a/a |  1 +
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   266
   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
   267
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   268
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
   269
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
   270
  $ cd a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   271
  $ 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
   272
  $ cd ..
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   273
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   274
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   275
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   276
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   277
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   278
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   279
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   280
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   281
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
   282
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   283
  $ ls .hg/shelve-backup/
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   284
  default-01.hg
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   285
  default-01.patch
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   286
  wibble.hg
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   287
  wibble.patch
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   288
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   289
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
   290
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   291
  $ hg shelve -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   292
  $ echo c>>a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   293
  $ hg commit -m second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   294
  $ 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
   295
  a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   296
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   297
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
   298
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   299
  $ mkdir foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   300
  $ echo foo > foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   301
  $ hg add foo/foo
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
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
   304
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   305
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   306
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   307
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   308
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   309
  rebasing 5:32c69314e062 "changes to: [mq]: second.patch" (tip)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   310
  merging a/a
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   311
  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
   312
  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
   313
  [1]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   314
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   315
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
   316
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   317
  $ hg heads -q --template '{rev}\n'
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   318
  5
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   319
  4
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   320
  $ hg parents -q --template '{rev}\n'
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   321
  4
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   322
  5
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   323
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   324
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   325
  M b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   326
  M c.copy
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
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   329
  $ hg diff
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   330
  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
   331
  --- a/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   332
  +++ b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   333
  @@ -1,2 +1,6 @@
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   334
   a
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21541
diff changeset
   335
  +<<<<<<< dest:   *  - shelve: pending changes temporary commit (glob)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   336
   c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   337
  +=======
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   338
  +a
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   339
  +>>>>>>> source: 32c69314e062 - shelve: changes to: [mq]: second.patch
22905
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   340
  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
   341
  rename from b/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   342
  rename to b.rename/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   343
  diff --git a/c b/c.copy
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   344
  copy from c
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   345
  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
   346
  $ hg resolve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   347
  U a/a
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
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   350
  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
   351
  (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
   352
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   353
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   354
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
   355
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   356
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   357
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   358
  M b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   359
  M c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   360
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   361
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   362
  $ hg unshelve -a
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   363
  rebase aborted
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   364
  unshelve of 'default' aborted
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   365
  $ hg heads -q
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
   366
  3:2e69b451d1ea
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   367
  $ hg parents
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
   368
  changeset:   3:2e69b451d1ea
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   369
  tag:         tip
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   370
  user:        test
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   371
  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
   372
  summary:     second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   373
  
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   374
  $ hg resolve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   375
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   376
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   377
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   378
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   379
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
   380
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   381
  $ hg unshelve -c
28124
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   382
  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
   383
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   384
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   385
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   386
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   387
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   388
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
   389
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   390
  $ hg unshelve -q
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   391
  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
   392
  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
   393
  [1]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   394
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   395
attempt to continue
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   396
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   397
  $ hg unshelve -c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   398
  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
   399
  (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
   400
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   401
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   402
  $ 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
   403
  $ 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
   404
  (no more unresolved files)
27694
2dc363274702 shelve: hook afterresolvedstates
timeless <timeless@mozdev.org>
parents: 27092
diff changeset
   405
  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
   406
19963
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
   407
  $ 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
   408
  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
   409
  (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
   410
  [255]
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
   411
28124
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   412
  $ hg graft --continue
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   413
  abort: no graft in progress
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   414
  (continue: hg unshelve --continue)
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
   415
  [255]
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   416
  $ hg unshelve -c
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   417
  rebasing 5:32c69314e062 "changes to: [mq]: second.patch" (tip)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   418
  unshelve of 'default' complete
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   419
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   420
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
   421
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   422
  $ hg parents
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
   423
  changeset:   3:2e69b451d1ea
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   424
  tag:         tip
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   425
  user:        test
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   426
  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
   427
  summary:     second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   428
  
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   429
  $ hg heads -q
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
   430
  3:2e69b451d1ea
19854
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
  $ hg status -C
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   433
  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
   434
    b/b
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   435
  A c.copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   436
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   437
  A foo/foo
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
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   441
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
   442
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   443
  $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   444
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   445
#if execbit
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   446
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   447
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
   448
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   449
  $ chmod +x a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   450
  $ 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
   451
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   452
  $ hg unshelve -q execbit
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   453
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   454
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   455
  $ hg revert a/a
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
#endif
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
#if symlink
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   460
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   461
  $ rm a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   462
  $ 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
   463
  $ 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
   464
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   465
  $ hg unshelve -q symlink
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   466
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   467
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   468
  $ hg revert a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   469
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   470
#endif
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   471
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   472
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
   473
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   474
  $ hg revert -q -C -a
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   475
  $ 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
   476
  $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   477
  $ hg shelve -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   478
  $ echo x >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   479
  $ 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
   480
  $ hg add foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   481
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   482
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
   483
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   484
  $ hg unshelve --tool :merge-other --keep
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   485
  unshelving change 'default'
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   486
  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
   487
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   488
  rebasing 6:2f694dd83a13 "changes to: second" (tip)
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   489
  merging a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   490
  $ hg parents -q
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   491
  4:33f7f61e6c5e
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   492
  $ hg shelve -l
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   493
  default         (*)* changes to: second (glob)
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   494
  $ hg status
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   495
  M a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   496
  A foo/foo
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   497
  $ cat a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   498
  a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   499
  c
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   500
  a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   501
  $ cat > a/a << EOF
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   502
  > a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   503
  > c
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   504
  > x
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   505
  > EOF
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   506
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   507
  $ HGMERGE=true hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   508
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   509
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   510
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   511
  rebasing 6:2f694dd83a13 "changes to: second" (tip)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   512
  merging a/a
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   513
  note: rebase of 6:2f694dd83a13 created no changes to commit
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   514
  $ hg parents -q
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   515
  4:33f7f61e6c5e
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   516
  $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   517
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   518
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   519
  $ cat a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   520
  a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   521
  c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   522
  x
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   523
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   524
test keep and cleanup
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   525
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   526
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   527
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   528
  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
   529
  $ hg shelve --list
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   530
  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
   531
  $ hg unshelve -k
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   532
  unshelving change 'default'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   533
  $ hg shelve --list
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   534
  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
   535
  $ hg shelve --cleanup
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   536
  $ hg shelve --list
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   537
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   538
  $ 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
   539
  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
   540
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   541
  $ 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
   542
  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
   543
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   544
  $ 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
   545
  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
   546
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   547
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   548
test bookmarks
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   549
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   550
  $ hg bookmark test
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   551
  $ hg bookmark
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   552
   * test                      4:33f7f61e6c5e
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   553
  $ hg shelve
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   554
  shelved as test
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   555
  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
   556
  $ hg bookmark
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   557
   * test                      4:33f7f61e6c5e
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   558
  $ hg unshelve
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   559
  unshelving change 'test'
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   560
  $ hg bookmark
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   561
   * test                      4:33f7f61e6c5e
19885
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   562
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   563
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
   564
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   565
  $ hg --config extensions.mq=! shelve
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   566
  shelved as test
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   567
  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
   568
  $ 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
   569
  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
   570
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   571
   * test                      4:33f7f61e6c5e
19885
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   572
  $ hg --config extensions.mq=! unshelve
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   573
  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
   574
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   575
   * test                      4:33f7f61e6c5e
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   576
22183
4dd9f606d0a6 tests: fixup issue markers to make check-commit happy
Matt Mackall <mpm@selenic.com>
parents: 21947
diff changeset
   577
shelve should leave dirstate clean (issue4055)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   578
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   579
  $ cd ..
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   580
  $ hg init shelverebase
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   581
  $ cd shelverebase
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   582
  $ printf 'x\ny\n' > x
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   583
  $ echo z > z
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   584
  $ hg commit -Aqm xy
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   585
  $ echo z >> x
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   586
  $ hg commit -Aqm z
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   587
  $ hg up 0
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   588
  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
   589
  $ printf 'a\nx\ny\nz\n' > x
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   590
  $ hg commit -Aqm xyz
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   591
  $ echo c >> z
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   592
  $ hg shelve
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   593
  shelved as default
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   594
  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
   595
  $ hg rebase -d 1 --config extensions.rebase=
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   596
  rebasing 2:323bfa07f744 "xyz" (tip)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   597
  merging x
23835
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 23663
diff changeset
   598
  saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-78114325-backup.hg (glob)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   599
  $ hg unshelve
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   600
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   601
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   602
  rebasing 4:82a0d7d6ba61 "changes to: xyz" (tip)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   603
  $ hg status
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   604
  M z
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   605
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   606
  $ cd ..
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   607
22183
4dd9f606d0a6 tests: fixup issue markers to make check-commit happy
Matt Mackall <mpm@selenic.com>
parents: 21947
diff changeset
   608
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
   609
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   610
  $ hg init onlypendingchanges
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   611
  $ cd onlypendingchanges
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   612
  $ touch a
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   613
  $ hg ci -Aqm a
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   614
  $ touch b
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   615
  $ hg ci -Aqm b
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   616
  $ hg up -q 0
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   617
  $ touch c
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   618
  $ hg ci -Aqm c
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   619
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   620
  $ touch d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   621
  $ hg add d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   622
  $ hg shelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   623
  shelved as default
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   624
  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
   625
  $ hg up -q 1
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   626
  $ hg unshelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   627
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   628
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   629
  rebasing 3:958bcbd1776e "changes to: c" (tip)
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   630
  $ hg status
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   631
  A d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   632
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   633
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
   634
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   635
  $ hg shelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   636
  shelved as default
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   637
  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
   638
  $ hg up 0
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   639
  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
   640
  $ hg unshelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   641
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   642
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   643
  rebasing 3:013284d9655e "changes to: b" (tip)
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   644
  $ hg status
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   645
  A d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   646
20064
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   647
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
   648
22955
fab9dda0f2a3 obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents: 22905
diff changeset
   649
  $ cat >> $HGRCPATH << EOF
fab9dda0f2a3 obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents: 22905
diff changeset
   650
  > [experimental]
fab9dda0f2a3 obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents: 22905
diff changeset
   651
  > evolution=createmarkers
20064
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   652
  > EOF
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   653
  $ hg shelve
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   654
  shelved as default
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   655
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   656
  $ hg debugobsolete `hg --debug id -i -r 1`
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   657
  $ hg unshelve
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   658
  unshelving change 'default'
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   659
20150
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   660
unshelve should leave unknown files alone (issue4113)
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   661
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   662
  $ echo e > e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   663
  $ hg shelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   664
  shelved as default
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   665
  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
   666
  $ hg status
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   667
  ? e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   668
  $ hg unshelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   669
  unshelving change 'default'
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   670
  $ hg status
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   671
  A d
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   672
  ? e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   673
  $ cat e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   674
  e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   675
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   676
unshelve should keep a copy of unknown files
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   677
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   678
  $ hg add e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   679
  $ hg shelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   680
  shelved as default
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   681
  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
   682
  $ echo z > e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   683
  $ hg unshelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   684
  unshelving change 'default'
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   685
  $ cat e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   686
  e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   687
  $ cat e.orig
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   688
  z
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   689
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   690
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   691
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
   692
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   693
 preparing:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   694
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   695
  $ rm *.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   696
  $ 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
   697
  $ hg phase -p null:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   698
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   699
 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
   700
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   701
  $ echo f > f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   702
  $ hg add f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   703
  $ hg shelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   704
  shelved as default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   705
  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
   706
  $ echo g > f
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   707
  $ hg unshelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   708
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   709
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   710
  A f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   711
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   712
  $ cat f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   713
  f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   714
  $ 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
   715
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   716
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   717
 other uncommitted changes - merge:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   718
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   719
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   720
  A f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   721
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   722
  $ hg shelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   723
  shelved as default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   724
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
20423
ada289dfceb0 tests: rewrite path in test-shelve.t for not being mangled on msys
Simon Heimberg <simohe@besonet.ch>
parents: 20414
diff changeset
   725
  $ hg log -G --template '{rev}  {desc|firstline}  {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()'
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   726
  o  4  changes to: commit stuff  shelve@localhost
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   727
  |
28627
d7af9b4ae7dd graphmod: set default edge styles for ascii graphs (BC)
Martijn Pieters <mjpieters@fb.com>
parents: 28573
diff changeset
   728
  ~
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   729
  $ hg log -G --template '{rev}  {desc|firstline}  {author}'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   730
  @  3  commit stuff  test
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   731
  |
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   732
  | o  2  c  test
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   733
  |/
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   734
  o  0  a  test
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   735
  
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   736
  $ 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
   737
  $ 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
   738
  $ 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
   739
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   740
  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
   741
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   742
  rebasing 5:81152db69da7 "changes to: commit stuff" (tip)
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   743
  merging f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   744
  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
   745
  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
   746
  [1]
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   747
  $ 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
   748
  @  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
   749
  |
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   750
  | @  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
   751
  |/
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   752
  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
   753
  |
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   754
  | 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
   755
  |/
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   756
  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
   757
  
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   758
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   759
  M f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   760
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   761
  $ cat f
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21541
diff changeset
   762
  <<<<<<< dest:   5f6b880e719b  - 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
   763
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   764
  =======
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   765
  f
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   766
  >>>>>>> source: 81152db69da7 - 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
   767
  $ 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
   768
  g
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   769
  $ hg unshelve --abort -t false
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
   770
  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
   771
  rebase aborted
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   772
  unshelve of 'default' aborted
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   773
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   774
  M a
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   775
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   776
  $ 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
   777
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   778
  $ hg unshelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   779
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   780
  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
   781
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   782
  rebasing 5:81152db69da7 "changes to: commit stuff" (tip)
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   783
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   784
  M a
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   785
  A f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   786
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   787
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   788
 other committed changes - merge:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   789
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   790
  $ hg shelve f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   791
  shelved as default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   792
  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
   793
  $ 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
   794
  $ mv f.orig f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   795
  $ hg unshelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   796
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   797
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   798
  rebasing 5:81152db69da7 "changes to: commit stuff" (tip)
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   799
  merging f
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   800
  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
   801
  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
   802
  [1]
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
  M 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
  $ cat f
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21541
diff changeset
   807
  <<<<<<< dest:   *  - test: intermediate other change (glob)
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   808
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   809
  =======
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   810
  f
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   811
  >>>>>>> source: 81152db69da7 - 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
   812
  $ 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
   813
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   814
  $ hg unshelve --abort
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   815
  rebase aborted
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   816
  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
   817
  $ hg st
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   818
  ? f.orig
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   819
  $ 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
   820
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   821
  $ hg shelve --delete default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   822
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   823
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
   824
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   825
  $ cd ../repo
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   826
  $ hg up -C -r 3
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   827
  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
   828
  (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
   829
  $ 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
   830
  $ 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
   831
  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
   832
  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
   833
  $ 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
   834
  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
   835
  (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
   836
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   837
   * test                      4:33f7f61e6c5e
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   838
  $ 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
   839
  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
   840
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   841
  rebasing 5:e42a7da90865 "changes to: second" (tip)
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   842
  merging a/a
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
   843
  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
   844
  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
   845
  [1]
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   846
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   847
     test                      4:33f7f61e6c5e
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   848
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   849
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
   850
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
   851
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   852
  $ hg revert -a -r .
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   853
  reverting a/a (glob)
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   854
  $ 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
   855
  (no more unresolved files)
27694
2dc363274702 shelve: hook afterresolvedstates
timeless <timeless@mozdev.org>
parents: 27092
diff changeset
   856
  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
   857
  $ hg unshelve -c
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   858
  rebasing 5:e42a7da90865 "changes to: second" (tip)
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   859
  note: rebase of 5:e42a7da90865 created no changes to commit
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   860
  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
   861
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   862
   * test                      4:33f7f61e6c5e
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   863
  $ 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
   864
  $ 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
   865
  ? 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
   866
  ? 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
   867
  $ hg summary
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   868
  parent: 4:33f7f61e6c5e tip
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   869
   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
   870
  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
   871
  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
   872
  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
   873
  update: (current)
25382
6084926366b9 summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents: 25260
diff changeset
   874
  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
   875
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   876
  $ 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
   877
  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
   878
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   879
  $ 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
   880
  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
   881
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   882
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   883
Test interactive shelve
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   884
  $ cat <<EOF >> $HGRCPATH
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   885
  > [ui]
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   886
  > interactive = true
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   887
  > EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   888
  $ echo 'a' >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   889
  $ cat a/a >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   890
  $ echo 'x' >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   891
  $ mv a/b a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   892
  $ echo 'a' >> foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   893
  $ hg st
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   894
  M a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   895
  ? a/a.orig
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   896
  ? foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   897
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   898
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   899
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   900
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   901
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   902
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   903
  $ cat foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   904
  foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   905
  a
25799
0eb093e40813 shelve: omit incorrect 'commit' suggestion at 'hg shelve -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25774
diff changeset
   906
  $ 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
   907
  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
   908
  [255]
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   909
  $ hg shelve --interactive << EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   910
  > y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   911
  > y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   912
  > n
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   913
  > EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   914
  diff --git a/a/a b/a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   915
  2 hunks, 2 lines changed
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   916
  examine changes to 'a/a'? [Ynesfdaq?] y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   917
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   918
  @@ -1,3 +1,4 @@
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   919
  +a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   920
   a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   921
   c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   922
   x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   923
  record change 1/2 to 'a/a'? [Ynesfdaq?] y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   924
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   925
  @@ -1,3 +2,4 @@
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   926
   a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   927
   c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   928
   x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   929
  +x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   930
  record change 2/2 to 'a/a'? [Ynesfdaq?] n
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   931
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   932
  shelved as test
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   933
  merging a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   934
  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
   935
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   936
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   937
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   938
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   939
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   940
  $ cat foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   941
  foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   942
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   943
  $ hg st
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   944
  M a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   945
  ? 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
   946
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   947
   * test                      4:33f7f61e6c5e
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   948
  $ hg unshelve
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   949
  unshelving change 'test'
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   950
  temporarily committing pending changes (restore with 'hg unshelve --abort')
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   951
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
   952
  rebasing 6:96a1354f65f6 "changes to: create conflict" (tip)
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   953
  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
   954
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   955
   * test                      4:33f7f61e6c5e
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   956
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   957
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   958
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   959
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   960
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   961
  x
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   962
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   963
shelve --patch and shelve --stat should work with a single valid shelfname
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   964
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   965
  $ hg up --clean .
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   966
  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
   967
  (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
   968
  $ hg shelve --list
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   969
  $ 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
   970
  $ 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
   971
  $ hg shelve
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   972
  shelved as default
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   973
  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
   974
  $ 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
   975
  $ 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
   976
  $ hg shelve
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   977
  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
   978
  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
   979
  $ hg shelve --patch default default-01
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   980
  abort: --patch expects a single shelf
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   981
  [255]
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   982
  $ hg shelve --stat default default-01
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   983
  abort: --stat expects a single shelf
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   984
  [255]
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   985
  $ 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
   986
  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
   987
  
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   988
  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
   989
  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
   990
  --- /dev/null
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   991
  +++ 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
   992
  @@ -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
   993
  +patch a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   994
  $ 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
   995
  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
   996
   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
   997
   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
   998
  $ 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
   999
  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
  1000
  [255]
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1001
  $ 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
  1002
  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
  1003
  [255]
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
  1004
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1005
  $ cd ..
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1006
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1007
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
  1008
--------------------------------------------------
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1009
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1010
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
  1011
26914
6839f2d4eea7 test: enforce generaldelta format with the right option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26776
diff changeset
  1012
  $ 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
  1013
  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
  1014
  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
  1015
  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
  1016
  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
  1017
  added 5 changesets with 8 changes to 6 files
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1018
  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
  1019
  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
  1020
  $ 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
  1021
  $ 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
  1022
  $ 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
  1023
  $ 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
  1024
  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
  1025
  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
  1026
  $ hg debugbundle .hg/shelved/*.hg
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
  1027
  45993d65fe9dc3c6d8764b9c3b07fa831ee7d92d
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1028
  $ cd ..
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1029
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1030
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
  1031
26914
6839f2d4eea7 test: enforce generaldelta format with the right option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26776
diff changeset
  1032
  $ 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
  1033
  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
  1034
  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
  1035
  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
  1036
  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
  1037
  added 5 changesets with 8 changes to 6 files
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1038
  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
  1039
  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
  1040
  $ 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
  1041
  $ 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
  1042
  $ 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
  1043
  $ 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
  1044
  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
  1045
  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
  1046
  $ hg debugbundle .hg/shelved/*.hg
29592
37cccad55410 util: implement a deterministic __repr__ on sortdict
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29536
diff changeset
  1047
  Stream params: sortdict([('Compression', 'BZ')])
37cccad55410 util: implement a deterministic __repr__ on sortdict
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29536
diff changeset
  1048
  changegroup -- "sortdict([('version', '02')])"
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
  1049
      45993d65fe9dc3c6d8764b9c3b07fa831ee7d92d
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1050
  $ cd ..
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1051
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1052
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
  1053
------------------------------------------------------------------------
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1054
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1055
  $ cd repo
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1056
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1057
  $ echo xxxx >> x
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1058
  $ 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
  1059
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1060
  $ 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
  1061
  > echo "==== \$1:"
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1062
  > 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
  1063
  > # 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
  1064
  > unset HG_PENDING
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1065
  > 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
  1066
  > echo "===="
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1067
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1068
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1069
  $ 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
  1070
  > [defaults]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1071
  > # 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
  1072
  > 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
  1073
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1074
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1075
"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
  1076
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1077
(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
  1078
(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
  1079
(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
  1080
(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
  1081
(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
  1082
(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
  1083
(7) abort transaction
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1084
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1085
== 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
  1086
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1087
  $ 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
  1088
  > [hooks]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1089
  > 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
  1090
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1091
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1092
  $ echo nnnn >> n
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1093
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1094
  $ 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
  1095
  ==== before-unshelving:
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1096
  VISIBLE 5:703117a2acfb
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1097
  ACTUAL  5:703117a2acfb
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1098
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1099
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1100
  $ 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
  1101
  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
  1102
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
  1103
  rebasing 7:206bf5d4f922 "changes to: create conflict" (tip)
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1104
  ==== preupdate:
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1105
  VISIBLE 6:66b86db80ee4
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1106
  ACTUAL  5:703117a2acfb
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1107
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1108
  ==== preupdate:
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
  1109
  VISIBLE 8:a0e04704317e
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1110
  ACTUAL  5:703117a2acfb
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1111
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1112
  ==== preupdate:
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1113
  VISIBLE 6:66b86db80ee4
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1114
  ACTUAL  5:703117a2acfb
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1115
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1116
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1117
  $ 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
  1118
  > [hooks]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1119
  > preupdate.visibility =
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1120
  > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1121
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1122
  $ 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
  1123
  ==== after-unshelving:
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1124
  VISIBLE 5:703117a2acfb
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1125
  ACTUAL  5:703117a2acfb
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1126
  ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1127
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1128
== 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
  1129
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1130
  $ hg update -q -C 5
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1131
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1132
  $ 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
  1133
  > [hooks]
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1134
  > 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
  1135
  > EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1136
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1137
  $ 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
  1138
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1139
  $ 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
  1140
  ==== before-unshelving:
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1141
  VISIBLE 5:703117a2acfb
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1142
  ACTUAL  5:703117a2acfb
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1143
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1144
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1145
  $ 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
  1146
  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
  1147
  rebasing shelved changes
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
  1148
  rebasing 7:206bf5d4f922 "changes to: create conflict" (tip)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1149
  ==== update:
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1150
  VISIBLE 6:66b86db80ee4
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
  1151
  VISIBLE 7:206bf5d4f922
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1152
  ACTUAL  5:703117a2acfb
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1153
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1154
  ==== update:
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1155
  VISIBLE 6:66b86db80ee4
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1156
  ACTUAL  5:703117a2acfb
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1157
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1158
  ==== update:
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1159
  VISIBLE 5:703117a2acfb
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1160
  ACTUAL  5:703117a2acfb
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1161
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1162
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1163
  $ 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
  1164
  > [hooks]
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1165
  > update.visibility =
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1166
  > EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1167
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1168
  $ 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
  1169
  ==== after-unshelving:
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1170
  VISIBLE 5:703117a2acfb
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1171
  ACTUAL  5:703117a2acfb
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1172
  ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
  1173
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1174
  $ cd ..
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
  1175
26942
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1176
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
  1177
---------------------------------------------------------------
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1178
  $ hg init salvage
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1179
  $ cd salvage
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1180
  $ echo 'content' > root
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1181
  $ 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
  1182
  $ echo '' > root
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1183
  $ hg shelve -q
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1184
  $ echo 'contADDent' > root
26942
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1185
  $ 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
  1186
  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
  1187
  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
  1188
  [1]
26942
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1189
  $ ls .hg/origbackups
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1190
  root.orig
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1191
  $ rm -rf .hg/origbackups
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1192
d55d22840592 shelve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents: 26934
diff changeset
  1193
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
  1194
---------------------------------------------------------------
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1195
Wreak havoc on the unshelve process
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1196
  $ rm .hg/unshelverebasestate
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1197
  $ hg unshelve --abort
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1198
  unshelve of 'default' aborted
26952
4e566f513fd8 tests: tolerate differences between Linux and Windows error strings
Matt Harbison <matt_harbison@yahoo.com>
parents: 26942
diff changeset
  1199
  abort: (No such file or directory|The system cannot find the file specified) (re)
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1200
  [255]
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1201
Can the user leave the current state?
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1202
  $ hg up -C .
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1203
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1204
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1205
Try again but with a corrupted shelve state file
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1206
  $ hg strip -r 2 -r 1 -q
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1207
  $ hg up -r 0 -q
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1208
  $ echo '' > root
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1209
  $ hg shelve -q
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1210
  $ echo 'contADDent' > root
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1211
  $ hg unshelve -q
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1212
  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
  1213
  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
  1214
  [1]
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1215
  $ sed 's/ae8c668541e8/123456789012/' .hg/shelvedstate > ../corrupt-shelvedstate
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1216
  $ mv ../corrupt-shelvedstate .hg/histedit-state
26776
f69c79395fb7 test-shelve: do not use non-portable pipe-and
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
  1217
  $ hg unshelve --abort 2>&1 | grep 'rebase aborted'
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1218
  rebase aborted
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1219
  $ hg up -C .
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
  1220
  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
  1221
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1222
  $ cd ..
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1223
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1224
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
  1225
-----------------------------------------------------------------------
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1226
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1227
  $ cat <<EOF >> $HGRCPATH
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1228
  > [extensions]
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1229
  > share =
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1230
  > EOF
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1231
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1232
  $ hg bookmarks -R repo
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1233
     test                      4:33f7f61e6c5e
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1234
  $ 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
  1235
  updating working directory
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1236
  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
  1237
  $ cd share
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1238
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1239
  $ hg bookmarks
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1240
     test                      4:33f7f61e6c5e
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1241
  $ hg bookmarks foo
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1242
  $ hg bookmarks
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1243
   * foo                       5:703117a2acfb
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1244
     test                      4:33f7f61e6c5e
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1245
  $ echo x >> x
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1246
  $ hg shelve
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1247
  shelved as foo
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1248
  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
  1249
  $ hg bookmarks
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1250
   * foo                       5:703117a2acfb
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1251
     test                      4:33f7f61e6c5e
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1252
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1253
  $ hg unshelve
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1254
  unshelving change 'foo'
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1255
  $ hg bookmarks
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1256
   * foo                       5:703117a2acfb
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1257
     test                      4:33f7f61e6c5e
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1258
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
  1259
  $ cd ..
27908
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1260
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1261
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
  1262
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
  1263
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
  1264
before the unshelve operation.
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1265
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1266
  $ hg init unknowns
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1267
  $ cd unknowns
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1268
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1269
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
  1270
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1271
  $ echo unknown > unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1272
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1273
  ? unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1274
  $ hg shelve --unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1275
  shelved as default
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1276
  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
  1277
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1278
  $ hg unshelve
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1279
  unshelving change 'default'
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1280
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1281
  ? unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1282
  $ rm unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1283
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1284
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
  1285
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1286
  $ echo unknown > unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1287
  $ hg shelve -u
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1288
  shelved as default
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1289
  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
  1290
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1291
  $ touch unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1292
  $ hg add unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1293
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1294
  A unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1295
  $ hg unshelve
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1296
  unshelving change 'default'
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1297
  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
  1298
  rebasing shelved changes
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1299
  rebasing 1:098df96e7410 "(changes in empty repository)" (tip)
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1300
  merging unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1301
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1302
  A unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1303
  $ hg forget unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1304
  $ rm unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1305
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1306
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
  1307
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1308
  $ echo unknown > unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1309
  $ hg shelve -u
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1310
  shelved as default
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1311
  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
  1312
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1313
  $ touch unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1314
  $ hg add unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1315
  $ hg commit -qm "Add unknown"
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1316
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1317
  $ hg unshelve
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1318
  unshelving change 'default'
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1319
  rebasing shelved changes
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1320
  rebasing 1:098df96e7410 "(changes in empty repository)" (tip)
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1321
  merging unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1322
  $ hg status
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1323
  M unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1324
  $ hg remove --force unknown
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1325
  $ hg commit -qm "Remove unknown"
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1326
d73a5ab18015 shelve: permit shelves to contain unknown files
Simon Farnsworth <simonfar@fb.com>
parents: 27694
diff changeset
  1327
  $ cd ..
28571
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1328
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1329
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
  1330
working directory.
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1331
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1332
  $ 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
  1333
  $ 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
  1334
  $ 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
  1335
  $ 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
  1336
  $ 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
  1337
  $ 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
  1338
  $ 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
  1339
  $ 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
  1340
  $ 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
  1341
  $ 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
  1342
  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
  1343
  (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
  1344
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1345
  M a
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1346
  M b
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1347
  $ hg branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1348
  new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1349
  $ 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
  1350
  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
  1351
  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
  1352
  $ hg branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1353
  new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1354
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1355
  M b
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1356
  $ 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
  1357
  $ 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
  1358
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1359
  M b
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1360
  A c
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1361
  $ 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
  1362
  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
  1363
  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
  1364
  $ hg branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1365
  new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1366
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1367
  A c
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1368
  $ 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
  1369
  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
  1370
  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
  1371
  $ hg branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1372
  new-branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1373
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1374
  $ 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
  1375
  $ 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
  1376
  $ hg status
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1377
  A d
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1378
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1379
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
  1380
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1381
  $ hg shelve
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1382
  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
  1383
  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
  1384
  $ hg branch
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1385
  default
3f0e25e89e28 shelve: preserve newly created branch on non-bare shelve in wctx (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28124
diff changeset
  1386
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1387
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
  1388
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
  1389
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1390
  $ 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
  1391
  $ cd shelve_on_new_branch_simple
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1392
  $ echo "aaa" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1393
  $ hg commit -A -m "a"
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1394
  adding a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1395
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1396
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1397
  $ hg branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1398
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1399
  (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
  1400
  $ echo "bbb" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1401
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1402
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1403
  $ hg shelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1404
  shelved as default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1405
  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
  1406
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1407
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1408
  $ echo "bbb" >> b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1409
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1410
  ? b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1411
  $ hg unshelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1412
  unshelving change 'default'
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1413
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1414
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1415
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1416
  ? b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1417
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1418
  test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1419
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1420
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
  1421
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
  1422
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
  1423
running unshelve --continue newly created branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1424
will be preserved.
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1425
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1426
  $ 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
  1427
  $ cd shelve_on_new_branch_conflict
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1428
  $ echo "aaa" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1429
  $ hg commit -A -m "a"
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1430
  adding a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1431
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1432
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1433
  $ hg branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1434
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1435
  (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
  1436
  $ echo "bbb" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1437
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1438
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1439
  $ hg shelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1440
  shelved as default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1441
  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
  1442
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1443
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1444
  $ echo "ccc" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1445
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1446
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1447
  $ hg unshelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1448
  unshelving change 'default'
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1449
  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
  1450
  rebasing shelved changes
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1451
  rebasing 2:425c97ef07f3 "changes to: a" (tip)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1452
  merging a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1453
  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
  1454
  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
  1455
  [1]
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1456
  $ echo "aaabbbccc" > a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1457
  $ rm a.orig
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1458
  $ hg resolve --mark a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1459
  (no more unresolved files)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1460
  continue: hg unshelve --continue
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1461
  $ hg unshelve --continue
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1462
  rebasing 2:425c97ef07f3 "changes to: a" (tip)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1463
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1464
  unshelve of 'default' complete
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1465
  $ cat a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1466
  aaabbbccc
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1467
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1468
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1469
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1470
  test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1471
  $ hg commit -m "test-commit"
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1472
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1473
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
  1474
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
  1475
test branch.
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1476
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1477
  $ echo "xxx" > b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1478
  $ hg add b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1479
  $ hg shelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1480
  shelved as test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1481
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1482
  $ hg update -r default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1483
  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
  1484
  $ hg unshelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1485
  unshelving change 'test'
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1486
  rebasing shelved changes
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1487
  rebasing 2:357525f34729 "changes to: test-commit" (tip)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1488
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1489
  A b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1490
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1491
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1492
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1493
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
  1494
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
  1495
mercurial(without restore branch information in 7th line) i
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1496
expect that after resolving conflicts and succesfully
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1497
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
  1498
restored and branch will be unchanged.
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1499
28941
8353d154a9bd test-shelve: shorten a long path so it works on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 28627
diff changeset
  1500
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
  1501
8353d154a9bd test-shelve: shorten a long path so it works on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 28627
diff changeset
  1502
  $ 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
  1503
  $ cd conflict
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1504
  $ echo "aaa" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1505
  $ hg commit -A -m "a"
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1506
  adding a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1507
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1508
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1509
  $ hg branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1510
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1511
  (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
  1512
  $ echo "bbb" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1513
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1514
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1515
  $ hg shelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1516
  shelved as default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1517
  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
  1518
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1519
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1520
  $ echo "ccc" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1521
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1522
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1523
  $ hg unshelve
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1524
  unshelving change 'default'
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1525
  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
  1526
  rebasing shelved changes
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1527
  rebasing 2:425c97ef07f3 "changes to: a" (tip)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1528
  merging a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1529
  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
  1530
  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
  1531
  [1]
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1532
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1533
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
  1534
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
  1535
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1536
  $ head -n 6 < .hg/shelvedstate > .hg/shelvedstate_oldformat
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1537
  $ rm .hg/shelvedstate
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1538
  $ mv .hg/shelvedstate_oldformat .hg/shelvedstate
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1539
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1540
  $ echo "aaabbbccc" > a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1541
  $ rm a.orig
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1542
  $ hg resolve --mark a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1543
  (no more unresolved files)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1544
  continue: hg unshelve --continue
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1545
  $ hg unshelve --continue
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1546
  rebasing 2:425c97ef07f3 "changes to: a" (tip)
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1547
  unshelve of 'default' complete
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1548
  $ cat a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1549
  aaabbbccc
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1550
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1551
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1552
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1553
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1554
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1555
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
  1556
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1557
  $ 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
  1558
  $ cd bare_shelve_on_new_branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1559
  $ echo "aaa" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1560
  $ hg commit -A -m "a"
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1561
  adding a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1562
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1563
  default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1564
  $ hg branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1565
  marked working directory as branch test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1566
  (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
  1567
  $ echo "bbb" >> a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1568
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1569
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1570
  $ hg shelve a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1571
  shelved as default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1572
  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
  1573
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1574
  test
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1575
  $ hg branch default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1576
  marked working directory as branch default
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1577
  (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
  1578
  $ echo "bbb" >> b
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
  ? b
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
  $ hg status
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1584
  M a
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1585
  ? b
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1586
  $ hg branch
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
  1587
  default
29536
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1588
  $ cd ..
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1589
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1590
Prepare unshleve with a corrupted shelvedstate
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1591
  $ 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
  1592
  $ 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
  1593
  $ hg shelve
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1594
  shelved as default
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1595
  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
  1596
  $ 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
  1597
  adding file
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1598
  $ hg unshelve
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1599
  unshelving change 'default'
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1600
  rebasing shelved changes
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1601
  rebasing 1:396ea74229f9 "(changes in empty repository)" (tip)
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1602
  merging file
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1603
  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
  1604
  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
  1605
  [1]
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1606
  $ echo somethingsomething > .hg/shelvedstate
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1607
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1608
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
  1609
  $ hg unshelve --continue
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1610
  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
  1611
  (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
  1612
  [255]
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1613
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1614
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
  1615
  $ hg unshelve --abort
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1616
  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
  1617
  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
  1618
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1619
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
  1620
progress
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1621
  $ hg unshelve --abort
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1622
  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
  1623
  [255]
b17a6e3cd2ac shelve: make unshelve be able to abort in any case
Kostia Balytskyi <ikostia@fb.com>
parents: 28941
diff changeset
  1624
  $ cd ..