tests/test-shelve.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Thu, 08 Oct 2015 01:41:30 +0900
changeset 26520 46dec89fe888
parent 26507 ae29cffa05db
child 26614 ef1eb6df7071
permissions -rw-r--r--
bookmarks: use recordchange instead of writing if transaction is active Before this patch, 'bmstore.write()' always write in-memory bookmark changes into '.hg/bookmarks' regardless of transaction activity. If 'bmstore.write()' is invoked inside a transaction and it writes changes into '.hg/bookmarks', then: - original bookmarks aren't restored at failure of that transaction This breaks "all or nothing" policy of the transaction. BTW, "hg rollback" can restore bookmarks successfully even before this patch, because original bookmarks are saved into '.hg/journal.bookmarks' at the beginning of the transaction, and it (actually renamed as '.hg/undo.bookmarks') is used by "hg rollback". - uncommitted bookmark changes are visible to other processes This is a kind of "dirty read" For example, 'rebase.rebase()' implies 'bmstore.write()', and it may be executed inside the transaction of "hg unshelve". Then, intentional aborting at the end of "hg unshelve" transaction doesn't restore original bookmarks (this is obviously a bug). This patch uses 'bmstore.recordchange()' instead of actual writing by 'bmstore._writerepo()', if any transaction is active This patch also removes meaningless restoring bmstore explicitly at the end of "hg shelve". This patch doesn't choose fixing each 'bmstore.write()' callers as like below, because writing similar code here and there is very redundant. before: bmstore.write() after: tr = repo.currenttransaction() if tr: bmstore.recordchange(tr) else: bmstore.write() Even though 'bmstore.write()' itself may have to be discarded by putting bookmark operations into transaction scope, this patch chose fixing it to implement "transactional dirstate" at first.
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
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    39
      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
    40
      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
    41
      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
    42
      different name, use "--name".
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    43
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    44
      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
    45
      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
    46
      --patch" or "--stat" for more details.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    47
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    48
      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
    49
      changes, use "--cleanup".
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    50
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    51
  (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
    52
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    53
  options ([+] can be repeated):
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    54
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    55
   -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
    56
                            shelving
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    57
      --cleanup             delete all shelved changes
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    58
      --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
    59
   -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
    60
   -e --edit                invoke editor on commit messages
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    61
   -l --list                list current shelves
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    62
   -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
    63
   -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
    64
   -p --patch               show patch
25260
8fa3e995a375 selve: make 'shelve --interactive' not experimental
Laurent Charignon <lcharignon@fb.com>
parents: 25111
diff changeset
    65
   -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
    66
      --stat                output diffstat-style summary of changes
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    67
   -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
    68
   -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
    69
      --mq                  operate on patch repository
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    70
  
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
    71
  (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
    72
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    73
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
    74
(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
    75
specified)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    76
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
    77
  $ 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
    78
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    79
  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
    80
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    81
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    82
  unshelving change 'default'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    83
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    84
  $ 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
    85
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    86
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    87
  nothing changed
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    88
  [1]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    89
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
    90
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
    91
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
    92
  $ ls .hg/shelve-backup
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
    93
  default.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
    94
  default.patch
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
    95
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
    96
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
    97
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    98
  $ echo n > n
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
    99
  $ hg add n
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   100
  $ 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
   101
  $ 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
   102
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   103
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
   104
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   105
  $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   106
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   107
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   108
  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
   109
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   110
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
   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 mv b b.rename
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   114
  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
   115
  $ 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
   116
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   117
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   118
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   119
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   120
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   121
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   122
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   123
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   124
prevent some foot-shooting
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   125
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   126
  $ 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
   127
  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
   128
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   129
  $ hg shelve -n .baz
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   130
  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
   131
  [255]
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
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
   134
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   135
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   136
  shelved as default-01
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   137
  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
   138
  $ hg status -C
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
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
   141
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   142
  $ hg shelve -l
24233
b6bcfd160e14 test-shelve: be more lenient about whitespace (issue4124)
Tristan Seligmann <mithrandi@debian.org>
parents: 23835
diff changeset
   143
  default-01      (*)* changes to '[mq]: second.patch' (glob)
b6bcfd160e14 test-shelve: be more lenient about whitespace (issue4124)
Tristan Seligmann <mithrandi@debian.org>
parents: 23835
diff changeset
   144
  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
   145
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   146
  $ hg shelve -l -p default
24233
b6bcfd160e14 test-shelve: be more lenient about whitespace (issue4124)
Tristan Seligmann <mithrandi@debian.org>
parents: 23835
diff changeset
   147
  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
   148
  
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   149
  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
   150
  --- a/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   151
  +++ b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   152
  @@ -1,1 +1,2 @@
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   153
   a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   154
  +a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   155
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   156
  $ 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
   157
  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
   158
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   159
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   160
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
   161
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   162
  $ 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
   163
  $ 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
   164
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   165
ensure shelve backups aren't overwritten
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   166
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   167
  $ ls .hg/shelve-backup/
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   168
  default-1.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   169
  default-1.patch
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   170
  default.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   171
  default.patch
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
   172
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   173
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
   174
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   175
  $ printf "z\na\n" > a/a
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   176
  $ hg unshelve --keep
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   177
  unshelving change 'default-01'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   178
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   179
  rebasing shelved changes
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   180
  rebasing 4:4702e8911fe0 "changes to '[mq]: second.patch'" (tip)
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   181
  merging a/a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   182
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   183
  $ hg revert --all -q
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   184
  $ 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
   185
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   186
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
   187
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
   188
(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
   189
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
   190
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
   191
  $ 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
   192
  .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
   193
  $ 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
   194
  $ 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
   195
  .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
   196
  $ 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
   197
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   198
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   199
  unshelving change 'default-01'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   200
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   201
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   202
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   203
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   204
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   205
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   206
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   207
  $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   208
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
   209
(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
   210
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
   211
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
   212
  $ 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
   213
  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
   214
  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
   215
  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
   216
  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
   217
  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
   218
  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
   219
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   220
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   221
  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
   222
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   223
  $ hg unshelve foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   224
  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
   225
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   226
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   227
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
   228
(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
   229
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   230
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   231
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   232
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   233
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   234
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   235
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   236
  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
   237
  $ 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
   238
  wat
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   239
  
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   240
  
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   241
  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
   242
  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
   243
  HG: --
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   244
  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
   245
  HG: branch 'default'
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
   246
  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
   247
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   248
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
   249
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   250
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   251
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   252
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   253
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   254
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   255
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   256
  $ hg shelve -l --stat
19855
a3b285882724 shelve: new output format for shelve listings
David Soria Parra <dsp@experimentalworks.net>
parents: 19854
diff changeset
   257
  wibble          (*)    wat (glob)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   258
   a/a |  1 +
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   259
   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
   260
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   261
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
   262
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
   263
  $ cd a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   264
  $ 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
   265
  $ cd ..
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   266
  $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   267
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   268
  A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   269
    b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   270
  A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   271
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   272
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   273
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   274
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
   275
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   276
  $ ls .hg/shelve-backup/
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   277
  default-01.hg
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   278
  default-01.patch
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   279
  wibble.hg
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   280
  wibble.patch
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
   281
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   282
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
   283
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   284
  $ hg shelve -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   285
  $ echo c>>a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   286
  $ hg commit -m second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   287
  $ 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
   288
  a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   289
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   290
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
   291
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   292
  $ mkdir foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   293
  $ echo foo > foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   294
  $ hg add foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   295
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   296
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
   297
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   298
  $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   299
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   300
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   301
  rebasing shelved changes
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   302
  rebasing 5:4702e8911fe0 "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
   303
  merging a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   304
  warning: conflicts during merge.
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   305
  merging a/a incomplete! (edit conflicts, then use 'hg resolve --mark')
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   306
  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
   307
  [1]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   308
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   309
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
   310
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   311
  $ hg heads -q --template '{rev}\n'
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   312
  5
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   313
  4
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   314
  $ hg parents -q --template '{rev}\n'
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   315
  4
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   316
  5
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   317
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   318
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   319
  M b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   320
  M c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   321
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   322
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   323
  $ hg diff
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   324
  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
   325
  --- a/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   326
  +++ b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   327
  @@ -1,2 +1,6 @@
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   328
   a
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21541
diff changeset
   329
  +<<<<<<< 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
   330
   c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   331
  +=======
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   332
  +a
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21541
diff changeset
   333
  +>>>>>>> source: 4702e8911fe0 - shelve: changes to '[mq]: second.patch'
22905
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   334
  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
   335
  rename from b/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   336
  rename to b.rename/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   337
  diff --git a/c b/c.copy
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   338
  copy from c
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
   339
  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
   340
  $ hg resolve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   341
  U a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   342
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   343
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   344
  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
   345
  (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
   346
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   347
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   348
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
   349
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   350
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   351
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   352
  M b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   353
  M c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   354
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   355
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   356
  $ hg unshelve -a
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   357
  rebase aborted
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   358
  unshelve of 'default' aborted
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   359
  $ 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
   360
  3:2e69b451d1ea
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   361
  $ 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
   362
  changeset:   3:2e69b451d1ea
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   363
  tag:         tip
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   364
  user:        test
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   365
  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
   366
  summary:     second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   367
  
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   368
  $ hg resolve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   369
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   370
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   371
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   372
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   373
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
   374
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   375
  $ hg unshelve -c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   376
  abort: no unshelve operation underway
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   377
  [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   378
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   379
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   380
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   381
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   382
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
   383
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   384
  $ hg unshelve -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   385
  warning: conflicts during merge.
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   386
  merging a/a incomplete! (edit conflicts, then use 'hg resolve --mark')
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   387
  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
   388
  [1]
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
attempt to continue
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   391
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   392
  $ hg unshelve -c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   393
  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
   394
  (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
   395
  [255]
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 revert -r . a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   398
  $ 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
   399
  (no more unresolved files)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   400
19963
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
   401
  $ 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
   402
  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
   403
  (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
   404
  [255]
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
   405
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   406
  $ hg unshelve -c
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   407
  rebasing 5:4702e8911fe0 "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
   408
  unshelve of 'default' complete
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   409
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   410
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
   411
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   412
  $ 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
   413
  changeset:   3:2e69b451d1ea
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   414
  tag:         tip
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   415
  user:        test
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   416
  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
   417
  summary:     second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   418
  
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   419
  $ 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
   420
  3:2e69b451d1ea
19854
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 status -C
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   423
  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
   424
    b/b
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   425
  A c.copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   426
    c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   427
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   428
  R b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   429
  ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   430
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   431
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
   432
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   433
  $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   434
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   435
#if execbit
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   436
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   437
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
   438
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   439
  $ chmod +x a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   440
  $ 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
   441
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   442
  $ hg unshelve -q execbit
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   443
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   444
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   445
  $ hg revert a/a
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
#endif
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
#if symlink
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   450
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   451
  $ rm a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   452
  $ 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
   453
  $ 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
   454
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   455
  $ hg unshelve -q symlink
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   456
  $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   457
  M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   458
  $ hg revert a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   459
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   460
#endif
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   461
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   462
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
   463
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   464
  $ hg revert -q -C -a
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   465
  $ 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
   466
  $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   467
  $ hg shelve -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   468
  $ echo x >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   469
  $ 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
   470
  $ hg add foo/foo
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
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
   473
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   474
  $ HGMERGE=true hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   475
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   476
  temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   477
  rebasing shelved changes
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   478
  rebasing 6:c5e6910e7601 "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
   479
  merging a/a
23518
2fb0504b8175 rebase: show warning when rebase creates no changes to commit
Mads Kiilerich <madski@unity3d.com>
parents: 23517
diff changeset
   480
  note: rebase of 6:c5e6910e7601 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
   481
  $ hg parents -q
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   482
  4:33f7f61e6c5e
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   483
  $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   484
  $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   485
  A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   486
  $ cat a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   487
  a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   488
  c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   489
  x
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   490
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   491
test keep and cleanup
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   492
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   493
  $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   494
  shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   495
  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
   496
  $ hg shelve --list
20411
66359d8b8d7e shelve: add 'changes to' prefix to default shelve message
Mads Kiilerich <madski@unity3d.com>
parents: 20150
diff changeset
   497
  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
   498
  $ hg unshelve --keep
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   499
  unshelving change 'default'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   500
  $ hg shelve --list
20411
66359d8b8d7e shelve: add 'changes to' prefix to default shelve message
Mads Kiilerich <madski@unity3d.com>
parents: 20150
diff changeset
   501
  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
   502
  $ hg shelve --cleanup
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
   503
  $ hg shelve --list
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   504
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   505
  $ 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
   506
  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
   507
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   508
  $ 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
   509
  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
   510
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   511
  $ 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
   512
  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
   513
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   514
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   515
test bookmarks
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   516
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   517
  $ hg bookmark test
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   518
  $ hg bookmark
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   519
   * test                      4:33f7f61e6c5e
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   520
  $ hg shelve
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   521
  shelved as test
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   522
  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
   523
  $ hg bookmark
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   524
   * test                      4:33f7f61e6c5e
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   525
  $ hg unshelve
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   526
  unshelving change 'test'
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
   527
  $ hg bookmark
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   528
   * test                      4:33f7f61e6c5e
19885
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   529
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   530
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
   531
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   532
  $ hg --config extensions.mq=! shelve
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   533
  shelved as test
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   534
  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
   535
  $ hg --config extensions.mq=! shelve --list
20411
66359d8b8d7e shelve: add 'changes to' prefix to default shelve message
Mads Kiilerich <madski@unity3d.com>
parents: 20150
diff changeset
   536
  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
   537
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   538
   * test                      4:33f7f61e6c5e
19885
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   539
  $ hg --config extensions.mq=! unshelve
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
   540
  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
   541
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   542
   * test                      4:33f7f61e6c5e
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   543
22183
4dd9f606d0a6 tests: fixup issue markers to make check-commit happy
Matt Mackall <mpm@selenic.com>
parents: 21947
diff changeset
   544
shelve should leave dirstate clean (issue4055)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   545
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   546
  $ cd ..
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   547
  $ hg init shelverebase
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   548
  $ cd shelverebase
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   549
  $ printf 'x\ny\n' > x
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   550
  $ echo z > z
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   551
  $ hg commit -Aqm xy
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   552
  $ echo z >> x
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   553
  $ hg commit -Aqm z
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   554
  $ hg up 0
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   555
  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
   556
  $ printf 'a\nx\ny\nz\n' > x
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   557
  $ hg commit -Aqm xyz
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   558
  $ echo c >> z
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   559
  $ hg shelve
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   560
  shelved as default
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   561
  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
   562
  $ 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
   563
  rebasing 2:323bfa07f744 "xyz" (tip)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   564
  merging x
23835
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 23663
diff changeset
   565
  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
   566
  $ hg unshelve
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   567
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   568
  rebasing shelved changes
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   569
  rebasing 4:b8fefe789ed0 "changes to 'xyz'" (tip)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   570
  $ hg status
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   571
  M z
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   572
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
   573
  $ cd ..
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   574
22183
4dd9f606d0a6 tests: fixup issue markers to make check-commit happy
Matt Mackall <mpm@selenic.com>
parents: 21947
diff changeset
   575
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
   576
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   577
  $ hg init onlypendingchanges
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   578
  $ cd onlypendingchanges
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   579
  $ touch a
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   580
  $ hg ci -Aqm a
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   581
  $ touch b
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   582
  $ hg ci -Aqm b
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   583
  $ hg up -q 0
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   584
  $ touch c
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   585
  $ hg ci -Aqm c
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   586
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   587
  $ touch d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   588
  $ hg add d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   589
  $ hg shelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   590
  shelved as default
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   591
  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
   592
  $ hg up -q 1
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   593
  $ hg unshelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   594
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   595
  rebasing shelved changes
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   596
  rebasing 3:0cae6656c016 "changes to 'c'" (tip)
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   597
  $ hg status
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   598
  A d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   599
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   600
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
   601
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   602
  $ hg shelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   603
  shelved as default
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   604
  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
   605
  $ hg up 0
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   606
  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
   607
  $ hg unshelve
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   608
  unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
   609
  rebasing shelved changes
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   610
  rebasing 3:be58f65f55fb "changes to 'b'" (tip)
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   611
  $ hg status
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   612
  A d
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
   613
20064
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   614
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
   615
22955
fab9dda0f2a3 obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents: 22905
diff changeset
   616
  $ cat >> $HGRCPATH << EOF
fab9dda0f2a3 obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents: 22905
diff changeset
   617
  > [experimental]
fab9dda0f2a3 obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents: 22905
diff changeset
   618
  > evolution=createmarkers
20064
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   619
  > EOF
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   620
  $ hg shelve
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   621
  shelved as default
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   622
  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
   623
  $ 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
   624
  $ hg unshelve
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   625
  unshelving change 'default'
99c4b8f79324 shelve: unshelve using an unfiltered repository
David Soria Parra <davidsp@fb.com>
parents: 19973
diff changeset
   626
20150
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   627
unshelve should leave unknown files alone (issue4113)
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   628
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   629
  $ echo e > e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   630
  $ hg shelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   631
  shelved as default
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   632
  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
   633
  $ hg status
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   634
  ? e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   635
  $ hg unshelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   636
  unshelving change 'default'
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   637
  $ hg status
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   638
  A d
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   639
  ? e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   640
  $ cat e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   641
  e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   642
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   643
unshelve should keep a copy of unknown files
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   644
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   645
  $ hg add e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   646
  $ hg shelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   647
  shelved as default
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   648
  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
   649
  $ echo z > e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   650
  $ hg unshelve
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   651
  unshelving change 'default'
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   652
  $ cat e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   653
  e
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   654
  $ cat e.orig
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   655
  z
11dbc38cebc6 unshelve: add tests for unknown files
Durham Goode <durham@fb.com>
parents: 20064
diff changeset
   656
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   657
20961
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   658
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
   659
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   660
 preparing:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   661
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   662
  $ rm *.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   663
  $ 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
   664
  $ hg phase -p null:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   665
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   666
 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
   667
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   668
  $ echo f > f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   669
  $ hg add f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   670
  $ hg shelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   671
  shelved as default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   672
  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
   673
  $ echo g > f
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   674
  $ hg unshelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   675
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   676
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   677
  A f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   678
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   679
  $ cat f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   680
  f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   681
  $ 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
   682
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   683
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   684
 other uncommitted changes - merge:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   685
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   686
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   687
  A f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   688
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   689
  $ hg shelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   690
  shelved as default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   691
  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
   692
  $ hg log -G --template '{rev}  {desc|firstline}  {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()'
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   693
  o  4  changes to 'commit stuff'  shelve@localhost
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
  $ 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
   696
  @  3  commit stuff  test
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   697
  |
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   698
  | o  2  c  test
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   699
  |/
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   700
  o  0  a  test
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   701
  
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   702
  $ 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
   703
  $ 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
   704
  $ 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
   705
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   706
  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
   707
  rebasing shelved changes
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   708
  rebasing 5:23b29cada8ba "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
   709
  merging f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   710
  warning: conflicts during merge.
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   711
  merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   712
  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
   713
  [1]
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   714
  $ hg log -G --template '{rev}  {desc|firstline}  {author}  {date|isodate}'
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   715
  @  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
   716
  |
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   717
  | @  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
   718
  |/
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   719
  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
   720
  |
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   721
  | 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
   722
  |/
20960
8e5b21ce8ee9 shelve: introduce secret option for using fixed date for temporary commit
Mads Kiilerich <madski@unity3d.com>
parents: 20423
diff changeset
   723
  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
   724
  
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   725
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   726
  M f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   727
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   728
  $ cat f
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21541
diff changeset
   729
  <<<<<<< 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
   730
  g
20414
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
  f
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21541
diff changeset
   733
  >>>>>>> source: 23b29cada8ba - 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
   734
  $ 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
   735
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   736
  $ hg unshelve --abort
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   737
  rebase aborted
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   738
  unshelve of 'default' aborted
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   739
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   740
  M a
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   741
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   742
  $ 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
   743
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   744
  $ hg unshelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   745
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   746
  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
   747
  rebasing shelved changes
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   748
  rebasing 5:23b29cada8ba "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
   749
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   750
  M a
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   751
  A f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   752
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   753
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   754
 other committed changes - merge:
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   755
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   756
  $ hg shelve f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   757
  shelved as default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   758
  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
   759
  $ 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
   760
  $ mv f.orig f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   761
  $ hg unshelve
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   762
  unshelving change 'default'
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   763
  rebasing shelved changes
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   764
  rebasing 5:23b29cada8ba "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
   765
  merging f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   766
  warning: conflicts during merge.
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   767
  merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   768
  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
   769
  [1]
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   770
  $ hg st
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   771
  M f
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   772
  ? f.orig
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   773
  $ cat f
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21541
diff changeset
   774
  <<<<<<< 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
   775
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   776
  =======
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   777
  f
21693
9c35f3a8cac4 merge: drop the quotes around commit description
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21541
diff changeset
   778
  >>>>>>> source: 23b29cada8ba - 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
   779
  $ 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
   780
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   781
  $ hg unshelve --abort
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   782
  rebase aborted
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   783
  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
   784
  $ hg st
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   785
  ? f.orig
6c40ea34ecc1 tests: make unshelve tests more tricky - don't depend on size change
Mads Kiilerich <madski@unity3d.com>
parents: 20960
diff changeset
   786
  $ 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
   787
  g
20414
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   788
  $ hg shelve --delete default
022431336f72 shelve: better (and slightly redundant) test coverage for unshelve conflicts
Mads Kiilerich <madski@unity3d.com>
parents: 20413
diff changeset
   789
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   790
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
   791
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   792
  $ 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
   793
  $ 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
   794
  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
   795
  (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
   796
  $ 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
   797
  $ 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
   798
  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
   799
  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
   800
  $ 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
   801
  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
   802
  (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
   803
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   804
   * 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
   805
  $ 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
   806
  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
   807
  rebasing shelved changes
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   808
  rebasing 5:4b555fdb4e96 "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
   809
  merging 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
   810
  warning: conflicts during merge.
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   811
  merging a/a incomplete! (edit conflicts, then use 'hg resolve --mark')
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   812
  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
   813
  [1]
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   814
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   815
     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
   816
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   817
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
   818
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
   819
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   820
  $ 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
   821
  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
   822
  $ 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
   823
  (no more unresolved files)
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
   824
  $ hg unshelve -c
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23172
diff changeset
   825
  rebasing 5:4b555fdb4e96 "changes to 'second'" (tip)
23518
2fb0504b8175 rebase: show warning when rebase creates no changes to commit
Mads Kiilerich <madski@unity3d.com>
parents: 23517
diff changeset
   826
  note: rebase of 5:4b555fdb4e96 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
   827
  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
   828
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   829
   * 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
   830
  $ 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
   831
  $ 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
   832
  ? 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
   833
  ? 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
   834
  $ 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
   835
  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
   836
   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
   837
  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
   838
  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
   839
  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
   840
  update: (current)
25382
6084926366b9 summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents: 25260
diff changeset
   841
  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
   842
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   843
  $ 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
   844
  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
   845
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   846
  $ 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
   847
  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
   848
  [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
   849
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   850
Test interactive shelve
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   851
  $ cat <<EOF >> $HGRCPATH
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   852
  > [ui]
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   853
  > interactive = true
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   854
  > EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   855
  $ echo 'a' >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   856
  $ cat a/a >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   857
  $ echo 'x' >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   858
  $ mv a/b a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   859
  $ echo 'a' >> foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   860
  $ hg st
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   861
  M a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   862
  ? a/a.orig
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   863
  ? foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   864
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   865
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   866
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   867
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   868
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   869
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   870
  $ cat foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   871
  foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   872
  a
25799
0eb093e40813 shelve: omit incorrect 'commit' suggestion at 'hg shelve -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25774
diff changeset
   873
  $ 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
   874
  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
   875
  [255]
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   876
  $ hg shelve --interactive << EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   877
  > y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   878
  > y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   879
  > n
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   880
  > EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   881
  diff --git a/a/a b/a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   882
  2 hunks, 2 lines changed
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   883
  examine changes to 'a/a'? [Ynesfdaq?] y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   884
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   885
  @@ -1,3 +1,4 @@
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   886
  +a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   887
   a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   888
   c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   889
   x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   890
  record change 1/2 to 'a/a'? [Ynesfdaq?] y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   891
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   892
  @@ -1,3 +2,4 @@
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   893
   a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   894
   c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   895
   x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   896
  +x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   897
  record change 2/2 to 'a/a'? [Ynesfdaq?] n
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   898
  
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   899
  shelved as test
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   900
  merging a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   901
  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
   902
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   903
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   904
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   905
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   906
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   907
  $ cat foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   908
  foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   909
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   910
  $ hg st
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   911
  M a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   912
  ? 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
   913
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   914
   * test                      4:33f7f61e6c5e
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   915
  $ hg unshelve
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   916
  unshelving change 'test'
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   917
  temporarily committing pending changes (restore with 'hg unshelve --abort')
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   918
  rebasing shelved changes
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   919
  rebasing 6:65b5d1c34c34 "changes to 'create conflict'" (tip)
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   920
  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
   921
  $ hg bookmark
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
   922
   * test                      4:33f7f61e6c5e
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   923
  $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   924
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   925
  a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   926
  c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   927
  x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
   928
  x
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   929
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   930
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
   931
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   932
  $ hg up --clean .
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   933
  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
   934
  (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
   935
  $ hg shelve --list
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   936
  $ 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
   937
  $ 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
   938
  $ hg shelve
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   939
  shelved as default
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   940
  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
   941
  $ 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
   942
  $ 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
   943
  $ hg shelve
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   944
  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
   945
  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
   946
  $ 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
   947
  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
   948
  [255]
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   949
  $ 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
   950
  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
   951
  [255]
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   952
  $ hg shelve --patch default
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   953
  default         (* ago)    changes to 'create conflict' (glob)
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   954
  
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   955
  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
   956
  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
   957
  --- /dev/null
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   958
  +++ 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
   959
  @@ -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
   960
  +patch a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   961
  $ hg shelve --stat default
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   962
  default         (* ago)    changes to 'create conflict' (glob)
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   963
   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
   964
   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
   965
  $ 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
   966
  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
   967
  [255]
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   968
  $ 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
   969
  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
   970
  [255]
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
   971
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   972
  $ cd ..
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   973
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   974
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
   975
--------------------------------------------------
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   976
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   977
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
   978
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   979
  $ hg clone --pull repo bundle1 --config format.generaldelta=0
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   980
  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
   981
  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
   982
  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
   983
  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
   984
  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
   985
  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
   986
  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
   987
  $ 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
   988
  $ 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
   989
  $ 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
   990
  $ 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
   991
  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
   992
  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
   993
  $ hg debugbundle .hg/shelved/*.hg
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   994
  7e30d8ac6f23cfc84330fd7e698730374615d21a
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   995
  $ cd ..
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   996
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   997
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
   998
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
   999
  $ hg clone --pull repo bundle2 --config format.generaldelta=1
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1000
  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
  1001
  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
  1002
  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
  1003
  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
  1004
  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
  1005
  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
  1006
  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
  1007
  $ 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
  1008
  $ 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
  1009
  $ 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
  1010
  $ 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
  1011
  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
  1012
  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
  1013
  $ hg debugbundle .hg/shelved/*.hg
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1014
  Stream params: {'Compression': 'BZ'}
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1015
  changegroup -- "{'version': '02'}"
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1016
      7e30d8ac6f23cfc84330fd7e698730374615d21a
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
  1017
  $ cd ..