##// END OF EJS Templates
httprepo: long arguments support (issue2126)...
httprepo: long arguments support (issue2126) Send the command arguments in the HTTP headers. The command is still part of the URL. If the server does not have the 'httpheader' capability, the client will send the command arguments in the URL as it did previously. Web servers typically allow more data to be placed within the headers than in the URL, so this approach will: - Avoid HTTP errors due to using a URL that is too large. - Allow Mercurial to implement a more efficient wire protocol. An alternate approach is to send the arguments as part of the request body. This approach has been rejected because it requires the use of POST requests, so it would break any existing configuration that relies on the request type for authentication or caching. Extensibility: - The header size is provided by the server, which makes it possible to introduce an hgrc setting for it. - The client ignores the capability value after the first comma, which allows more information to be included in the future.

File last commit:

r13959:141f88ae merge default
r14093:ce99d887 default
Show More
test-rollback.t
119 lines | 2.9 KiB | text/troff | Tads3Lexer
Matt Mackall
tests: unify test-rollback
r12485
Martin Geisler
tests: remove redundant mkdir...
r13956 $ hg init t
Matt Mackall
tests: unify test-rollback
r12485 $ cd t
$ echo a > a
$ hg add a
$ hg commit -m "test"
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
$ hg parents
changeset: 0:acb14030fe0a
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: test
$ hg status
$ hg rollback
Gilles Moris
rollback: clarifies the message about the reverted state (issue2628)...
r13446 repository tip rolled back to revision -1 (undo commit)
working directory now based on revision -1
Matt Mackall
tests: unify test-rollback
r12485 $ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
$ hg parents
$ hg status
A a
Test issue 902
$ hg commit -m "test2"
$ hg branch test
marked working directory as branch test
$ hg rollback
Gilles Moris
rollback: clarifies the message about the reverted state (issue2628)...
r13446 repository tip rolled back to revision -1 (undo commit)
working directory now based on revision -1
Matt Mackall
tests: unify test-rollback
r12485 $ hg branch
default
Test issue 1635 (commit message saved)
.hg/last-message.txt:
$ cat .hg/last-message.txt ; echo
test2
Test rollback of hg before issue 902 was fixed
$ hg commit -m "test3"
$ hg branch test
marked working directory as branch test
$ rm .hg/undo.branch
$ hg rollback
Gilles Moris
rollback: clarifies the message about the reverted state (issue2628)...
r13446 repository tip rolled back to revision -1 (undo commit)
Martin Geisler
rollback: lower-case warning issued when branch cannot be reset...
r13957 named branch could not be reset, current branch is still: test
Gilles Moris
rollback: clarifies the message about the reverted state (issue2628)...
r13446 working directory now based on revision -1
Matt Mackall
tests: unify test-rollback
r12485 $ hg branch
test
rollback by pretxncommit saves commit message (issue 1635)
$ echo a >> a
$ hg --config hooks.pretxncommit=false commit -m"precious commit message"
transaction abort!
rollback completed
abort: pretxncommit hook exited with status * (glob)
[255]
.hg/last-message.txt:
$ cat .hg/last-message.txt ; echo
precious commit message
Nicolas Dumazet
tests: clean up test-rollback.t...
r13185
same thing, but run $EDITOR
Mads Kiilerich
tests: remove the last traces of $HGTMP...
r12642 $ cat > editor << '__EOF__'
Matt Mackall
tests: unify test-rollback
r12485 > #!/bin/sh
> echo "another precious commit message" > "$1"
> __EOF__
Mads Kiilerich
tests: remove the last traces of $HGTMP...
r12642 $ chmod +x editor
$ HGEDITOR="'`pwd`'"/editor hg --config hooks.pretxncommit=false commit 2>&1
Matt Mackall
tests: unify test-rollback
r12485 transaction abort!
rollback completed
note: commit message saved in .hg/last-message.txt
abort: pretxncommit hook exited with status * (glob)
Mads Kiilerich
tests: remove the last traces of $HGTMP...
r12642 [255]
$ cat .hg/last-message.txt
Matt Mackall
tests: unify test-rollback
r12485 another precious commit message
Martin Geisler
hgweb: detect change based on changelog size too...
r13958 test rollback on served repository
$ hg commit -m "precious commit message"
$ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
$ cd ..
$ hg clone http://localhost:$HGPORT u
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
updating to branch test
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd u
$ hg id default
1df294f7b1a2
now rollback and observe that 'hg serve' reloads the repository and
presents the correct tip changeset:
$ hg -R ../t rollback
repository tip rolled back to revision -1 (undo commit)
working directory now based on revision -1
$ hg id default
000000000000