##// END OF EJS Templates
context: override workingctx.hex() to avoid a crash...
context: override workingctx.hex() to avoid a crash Since node is None for workingctx, it can't use the base class implementation of 'hex(self.node())'. It doesn't appear that there are any current callers of this, but there will be when archive supports 'wdir()'. My first thought was to use "{p1node}+", but that would cause headaches elsewhere [1]. We should probably fix up localrepository.__getitem__ to accept this hash for consistency, as a followup. This works, if the full hash is specified: @@ -480,7 +480,7 @@ return dirstate.dirstate(self.vfs, self.ui, self.root, validate) def __getitem__(self, changeid): - if changeid is None: + if changeid is None or changeid == 'ff' * 20: return context.workingctx(self) if isinstance(changeid, slice): return [context.changectx(self, i) That differs from null, where it will accept any number of 0s, as long as it isn't ambiguous. [1] https://www.selenic.com/pipermail/mercurial-devel/2015-June/071166.html

File last commit:

r25478:d19787db default
r25590:183965a0 default
Show More
test-static-http.t
162 lines | 4.2 KiB | text/troff | Tads3Lexer
/ tests / test-static-http.t
Matt Mackall
tests: replace exit 80 with #require
r22046 #require killdaemons
Matt Mackall
tests: unify test-static-http
r12491
Adrian Buehlmann
test-static-http: partially adapt for Windows
r17020 #if windows
$ hg clone http://localhost:$HGPORT/ copy
abort: * (glob)
[255]
#else
Matt Mackall
tests: unify test-static-http
r12491 $ hg clone http://localhost:$HGPORT/ copy
abort: error: Connection refused
[255]
Adrian Buehlmann
test-static-http: partially adapt for Windows
r17020 #endif
Matt Mackall
tests: unify test-static-http
r12491 $ test -d copy
[1]
This server doesn't do range requests so it's basically only good for
one pull
Mike Hommey
tests: pull common http server setup out of individual tests...
r22959 $ python "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
Patrick Mezard
test-static-http.t: enable on Windows...
r17538 $ cat dumb.pid >> $DAEMON_PIDS
Martin Geisler
tests: remove redundant mkdir...
r13956 $ hg init remote
Matt Mackall
tests: unify test-static-http
r12491 $ cd remote
$ echo foo > bar
Adrian Buehlmann
test-static-http.t: increase test coverage on filenames...
r13209 $ echo c2 > '.dotfile with spaces'
$ hg add
adding .dotfile with spaces
adding bar
Matt Mackall
tests: unify test-static-http
r12491 $ hg commit -m"test"
$ hg tip
Adrian Buehlmann
test-static-http.t: increase test coverage on filenames...
r13209 changeset: 0:02770d679fb8
Matt Mackall
tests: unify test-static-http
r12491 tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: test
$ cd ..
$ hg clone static-http://localhost:$HGPORT/remote local
requesting all changes
adding changesets
adding manifests
adding file changes
Adrian Buehlmann
test-static-http.t: increase test coverage on filenames...
r13209 added 1 changesets with 2 changes to 2 files
Matt Mackall
tests: unify test-static-http
r12491 updating to branch default
Adrian Buehlmann
test-static-http.t: increase test coverage on filenames...
r13209 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
Matt Mackall
tests: unify test-static-http
r12491 $ cd local
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
Adrian Buehlmann
test-static-http.t: increase test coverage on filenames...
r13209 2 files, 1 changesets, 2 total revisions
Matt Mackall
tests: unify test-static-http
r12491 $ cat bar
foo
$ cd ../remote
$ echo baz > quux
$ hg commit -A -mtest2
adding quux
check for HTTP opener failures when cachefile does not exist
jfh
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/...
r13272 $ rm .hg/cache/*
Matt Mackall
tests: unify test-static-http
r12491 $ cd ../local
$ echo '[hooks]' >> .hg/hgrc
Matt Mackall
tests: simplify printenv calls...
r25478 $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc
Matt Mackall
tests: unify test-static-http
r12491 $ hg pull
Mads Kiilerich
tests: reintroduce ":$HGPORT" in test output...
r12643 pulling from static-http://localhost:$HGPORT/remote
Matt Mackall
tests: unify test-static-http
r12491 searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
Pierre-Yves David
transaction: introduce a transaction ID, to be available to all hooks...
r24740 changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT/remote (glob)
Matt Mackall
tests: unify test-static-http
r12491 (run 'hg update' to get a working copy)
trying to push
$ hg update
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo more foo >> bar
$ hg commit -m"test"
$ hg push
Mads Kiilerich
tests: reintroduce ":$HGPORT" in test output...
r12643 pushing to static-http://localhost:$HGPORT/remote
Sune Foldager
peer: introduce canpush and improve error message
r17193 abort: destination does not support push
Matt Mackall
tests: unify test-static-http
r12491 [255]
trying clone -r
$ cd ..
timeless@mozdev.org
spelling: doesn't/does not
r17486 $ hg clone -r doesnotexist static-http://localhost:$HGPORT/remote local0
abort: unknown revision 'doesnotexist'!
Matt Mackall
tests: unify test-static-http
r12491 [255]
$ hg clone -r 0 static-http://localhost:$HGPORT/remote local0
adding changesets
adding manifests
adding file changes
Adrian Buehlmann
test-static-http.t: increase test coverage on filenames...
r13209 added 1 changesets with 2 changes to 2 files
Matt Mackall
tests: unify test-static-http
r12491 updating to branch default
Adrian Buehlmann
test-static-http.t: increase test coverage on filenames...
r13209 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
Matt Mackall
tests: unify test-static-http
r12491
Matt Mackall
tests: fixup issue markers to make check-commit happy
r22183 test with "/" URI (issue747) and subrepo
Matt Mackall
tests: unify test-static-http
r12491
$ hg init
Mads Kiilerich
statichttprepo: don't modify localrepo class variables...
r13440 $ hg init sub
Brad Hall
tag: don't allow tagging the null revision (issue1915)...
r17260 $ touch sub/test
$ hg -R sub commit -A -m "test"
adding test
Mads Kiilerich
statichttprepo: don't modify localrepo class variables...
r13440 $ hg -R sub tag not-empty
$ echo sub=sub > .hgsub
Matt Mackall
tests: unify test-static-http
r12491 $ echo a > a
Mads Kiilerich
statichttprepo: don't modify localrepo class variables...
r13440 $ hg add a .hgsub
$ hg -q ci -ma
Matt Mackall
tests: unify test-static-http
r12491 $ hg clone static-http://localhost:$HGPORT/ local2
requesting all changes
adding changesets
adding manifests
adding file changes
Mads Kiilerich
statichttprepo: don't modify localrepo class variables...
r13440 added 1 changesets with 3 changes to 3 files
Matt Mackall
tests: unify test-static-http
r12491 updating to branch default
Martin Geisler
subrepo: create subrepos using clone instead of pull...
r14281 cloning subrepo sub from static-http://localhost:$HGPORT/sub
Mads Kiilerich
statichttprepo: don't modify localrepo class variables...
r13440 requesting all changes
adding changesets
adding manifests
adding file changes
Brad Hall
tag: don't allow tagging the null revision (issue1915)...
r17260 added 2 changesets with 2 changes to 2 files
Mads Kiilerich
statichttprepo: don't modify localrepo class variables...
r13440 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
Matt Mackall
tests: unify test-static-http
r12491 $ cd local2
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
Mads Kiilerich
statichttprepo: don't modify localrepo class variables...
r13440 3 files, 1 changesets, 3 total revisions
Matt Mackall
tests: unify test-static-http
r12491 $ cat a
a
$ hg paths
Mads Kiilerich
tests: reintroduce ":$HGPORT" in test output...
r12643 default = static-http://localhost:$HGPORT/
Matt Mackall
tests: unify test-static-http
r12491
test with empty repo (issue965)
$ cd ..
$ hg init remotempty
$ hg clone static-http://localhost:$HGPORT/remotempty local3
no changes found
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd local3
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
$ hg paths
Mads Kiilerich
tests: reintroduce ":$HGPORT" in test output...
r12643 default = static-http://localhost:$HGPORT/remotempty
Matt Mackall
tests: unify test-static-http
r12491
test with non-repo
$ cd ..
$ mkdir notarepo
$ hg clone static-http://localhost:$HGPORT/notarepo local3
Mads Kiilerich
tests: reintroduce ":$HGPORT" in test output...
r12643 abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository!
Matt Mackall
tests: unify test-static-http
r12491 [255]
Matt Mackall
tests: drop DAEMON_PIDS from killdaemons calls
r25474 $ killdaemons.py