D5388: tests: split test-shelve.t in two
This revision was automatically updated to reflect the committed changes. Closed by commit rHG1b836cee2d91: tests: split test-shelve.t in two (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5388?vs=12728=12748 REVISION DETAIL https://phab.mercurial-scm.org/D5388 AFFECTED FILES tests/test-shelve.t tests/test-shelve2.t CHANGE DETAILS diff --git a/tests/test-shelve.t b/tests/test-shelve2.t copy from tests/test-shelve.t copy to tests/test-shelve2.t --- a/tests/test-shelve.t +++ b/tests/test-shelve2.t @@ -20,657 +20,8 @@ #endif - $ hg init repo - $ cd repo - $ mkdir a b - $ echo a > a/a - $ echo b > b/b - $ echo c > c - $ echo d > d - $ echo x > x - $ hg addremove -q - -shelve has a help message - $ hg shelve -h - hg shelve [OPTION]... [FILE]... - - save and set aside changes from the working directory - - Shelving takes files that "hg status" reports as not clean, saves the - modifications to a bundle (a shelved change), and reverts the files so - that their state in the working directory becomes clean. - - To restore these changes to the working directory, using "hg unshelve"; - this will work even if you switch to a different commit. - - When no files are specified, "hg shelve" saves all not-clean files. If - specific files or directories are named, only changes to those files are - shelved. - - In bare shelve (when no files are specified, without interactive, include - and exclude option), shelving remembers information if the working - directory was on newly created branch, in other words working directory - was on different branch than its first parent. In this situation - unshelving restores branch information to the working directory. - - Each shelved change has a name that makes it easier to find later. The - name of a shelved change defaults to being based on the active bookmark, - or if there is no active bookmark, the current named branch. To specify a - different name, use "--name". - - To see a list of existing shelved changes, use the "--list" option. For - each shelved change, this will print its name, age, and description; use " - --patch" or "--stat" for more details. - - To delete specific shelved changes, use "--delete". To delete all shelved - changes, use "--cleanup". - - (use 'hg help -e shelve' to show help for the shelve extension) - - options ([+] can be repeated): - - -A --addremove mark new/missing files as added/removed before -shelving - -u --unknown store unknown files in the shelve - --cleanup delete all shelved changes - --date DATE shelve with the specified commit date - -d --delete delete the named shelved change(s) - -e --editinvoke editor on commit messages - -l --listlist current shelves - -m --message TEXTuse text as shelve message - -n --name NAME use the given name for the shelved commit - -p --patch output patches for changes (provide the names of the -shelved changes as positional arguments) - -i --interactive interactive mode, only works while creating a shelve - --statoutput diffstat-style summary of changes (provide -the names of the shelved changes as positional -arguments) - -I --include PATTERN [+] include names matching the given patterns - -X --exclude PATTERN [+] exclude names matching the given patterns - --mq operate on patch repository - - (some details hidden, use --verbose to show complete help) - -shelving in an empty repo should be possible -(this tests also that editor is not invoked, if '--edit' is not -specified) - - $ HGEDITOR=cat hg shelve - shelved as default - 0 files updated, 0 files merged, 5 files removed, 0 files unresolved - - $ hg unshelve - unshelving change 'default' - - $ hg commit -q -m 'initial commit' - - $ hg shelve - nothing changed - [1] - -make sure shelve files were backed up - - $ ls .hg/shelve-backup - default.hg - default.patch - default.shelve - -checks to make sure we dont create a directory or -hidden file while choosing a new shelve name - -when we are given a name - - $ hg shelve -n foo/bar - abort: shelved change names can not contain slashes - [255] - $ hg shelve -n .baz - abort: shelved change names can not start with '.' - [255] - $ hg shelve -n foo\\bar - abort: shelved change names can not contain slashes - [255] - -when shelve has to choose itself - - $ hg branch x/y -q - $ hg commit -q -m "Branch commit 0" - $ hg shelve - nothing changed - [1] - $ hg branch .x -q - $ hg commit -q -m "Branch commit 1" - $ hg shelve - nothing
D5388: tests: split test-shelve.t in two
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY test-shelve.t dominated run time for all shelve tests. Before: Ran 9 tests, 1 skipped, 0 failed. = real0m43.568s user2m15.822s sys 0m40.857s After: Ran 11 tests, 1 skipped, 0 failed. == real0m24.574s user2m21.354s sys 0m40.435s REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5388 AFFECTED FILES tests/test-shelve.t tests/test-shelve2.t CHANGE DETAILS diff --git a/tests/test-shelve.t b/tests/test-shelve2.t copy from tests/test-shelve.t copy to tests/test-shelve2.t --- a/tests/test-shelve.t +++ b/tests/test-shelve2.t @@ -20,657 +20,8 @@ #endif - $ hg init repo - $ cd repo - $ mkdir a b - $ echo a > a/a - $ echo b > b/b - $ echo c > c - $ echo d > d - $ echo x > x - $ hg addremove -q - -shelve has a help message - $ hg shelve -h - hg shelve [OPTION]... [FILE]... - - save and set aside changes from the working directory - - Shelving takes files that "hg status" reports as not clean, saves the - modifications to a bundle (a shelved change), and reverts the files so - that their state in the working directory becomes clean. - - To restore these changes to the working directory, using "hg unshelve"; - this will work even if you switch to a different commit. - - When no files are specified, "hg shelve" saves all not-clean files. If - specific files or directories are named, only changes to those files are - shelved. - - In bare shelve (when no files are specified, without interactive, include - and exclude option), shelving remembers information if the working - directory was on newly created branch, in other words working directory - was on different branch than its first parent. In this situation - unshelving restores branch information to the working directory. - - Each shelved change has a name that makes it easier to find later. The - name of a shelved change defaults to being based on the active bookmark, - or if there is no active bookmark, the current named branch. To specify a - different name, use "--name". - - To see a list of existing shelved changes, use the "--list" option. For - each shelved change, this will print its name, age, and description; use " - --patch" or "--stat" for more details. - - To delete specific shelved changes, use "--delete". To delete all shelved - changes, use "--cleanup". - - (use 'hg help -e shelve' to show help for the shelve extension) - - options ([+] can be repeated): - - -A --addremove mark new/missing files as added/removed before -shelving - -u --unknown store unknown files in the shelve - --cleanup delete all shelved changes - --date DATE shelve with the specified commit date - -d --delete delete the named shelved change(s) - -e --editinvoke editor on commit messages - -l --listlist current shelves - -m --message TEXTuse text as shelve message - -n --name NAME use the given name for the shelved commit - -p --patch output patches for changes (provide the names of the -shelved changes as positional arguments) - -i --interactive interactive mode, only works while creating a shelve - --statoutput diffstat-style summary of changes (provide -the names of the shelved changes as positional -arguments) - -I --include PATTERN [+] include names matching the given patterns - -X --exclude PATTERN [+] exclude names matching the given patterns - --mq operate on patch repository - - (some details hidden, use --verbose to show complete help) - -shelving in an empty repo should be possible -(this tests also that editor is not invoked, if '--edit' is not -specified) - - $ HGEDITOR=cat hg shelve - shelved as default - 0 files updated, 0 files merged, 5 files removed, 0 files unresolved - - $ hg unshelve - unshelving change 'default' - - $ hg commit -q -m 'initial commit' - - $ hg shelve - nothing changed - [1] - -make sure shelve files were backed up - - $ ls .hg/shelve-backup - default.hg - default.patch - default.shelve - -checks to make sure we dont create a directory or -hidden file while choosing a new shelve name - -when we are given a name - - $ hg shelve -n foo/bar - abort: shelved change names can not contain slashes - [255] - $ hg shelve -n .baz - abort: shelved change names can not start with '.' - [255] - $ hg shelve -n foo\\bar - abort: shelved change names can not contain slashes -