Mercurial > public > mercurial-scm > hg-stable
changeset 30249:eab274469952 stable 4.0
merge with i18n
author | Kevin Bullock <kbullock+mercurial@ringworld.org> |
---|---|
date | Tue, 01 Nov 2016 13:03:42 -0500 |
parents | 27addd7e8eca (diff) 8b2056d9a7dd (current diff) |
children | 3726ad73db1e |
files | |
diffstat | 26 files changed, 277 insertions(+), 114 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Tue Nov 01 04:27:41 2016 +0900 +++ b/contrib/check-code.py Tue Nov 01 13:03:42 2016 -0500 @@ -444,6 +444,17 @@ ] ] +allfilesfilters = [] + +allfilespats = [ + [ + (r'(http|https)://[a-zA-Z0-9./]*selenic.com/', + 'use mercurial-scm.org domain URL'), + ], + # warnings + [], +] + checks = [ ('python', r'.*\.(py|cgi)$', r'^#!.*python', pyfilters, pypats), ('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats), @@ -456,6 +467,8 @@ ('txt', r'.*\.txt$', '', txtfilters, txtpats), ('web template', r'mercurial/templates/.*\.tmpl', '', webtemplatefilters, webtemplatepats), + ('all except for .po', r'.*(?<!\.po)$', '', + allfilesfilters, allfilespats), ] def _preparepats(): @@ -537,6 +550,7 @@ return result for name, match, magic, filters, pats in checks: + post = pre # discard filtering result of previous check if debug: print(name, f) fc = 0
--- a/hgext/largefiles/reposetup.py Tue Nov 01 04:27:41 2016 +0900 +++ b/hgext/largefiles/reposetup.py Tue Nov 01 13:03:42 2016 -0500 @@ -217,7 +217,7 @@ # standin. Removing a file as a side effect of # running status is gross, but the alternatives (if # any) are worse. - self.wvfs.unlink(standin) + self.wvfs.unlinkpath(standin, ignoremissing=True) # Filter result lists result = list(result)
--- a/mercurial/commands.py Tue Nov 01 04:27:41 2016 +0900 +++ b/mercurial/commands.py Tue Nov 01 13:03:42 2016 -0500 @@ -1520,7 +1520,7 @@ - clone a remote repository to a new directory named hg/:: - hg clone http://selenic.com/hg + hg clone https://www.mercurial-scm.org/repo/hg/ - create a lightweight local clone:: @@ -1541,7 +1541,7 @@ - clone (and track) a particular named branch:: - hg clone http://selenic.com/hg#stable + hg clone https://www.mercurial-scm.org/repo/hg/#stable See :hg:`help urls` for details on specifying URLs. @@ -4740,7 +4740,7 @@ - check the most recent revision of a remote repository:: - hg id -r tip http://selenic.com/hg/ + hg id -r tip https://www.mercurial-scm.org/repo/hg/ See :hg:`log` for generating more information about specific revisions, including full hash identifiers. @@ -4943,7 +4943,7 @@ - import a changeset from an hgweb server:: - hg import http://www.selenic.com/hg/rev/5ca8c111e9aa + hg import https://www.mercurial-scm.org/repo/hg/rev/5ca8c111e9aa - import all the patches in an Unix-style mbox:: @@ -7077,7 +7077,8 @@ raise error.Abort(_('uncommitted merge')) bheads = repo.branchheads() if not opts.get('force') and bheads and p1 not in bheads: - raise error.Abort(_('not at a branch head (use -f to force)')) + raise error.Abort(_('working directory is not at a branch head ' + '(use -f to force)')) r = scmutil.revsingle(repo, rev_).node() if not message:
--- a/mercurial/help/hg-ssh.8.txt Tue Nov 01 04:27:41 2016 +0900 +++ b/mercurial/help/hg-ssh.8.txt Tue Nov 01 13:03:42 2016 -0500 @@ -58,9 +58,9 @@ """"""""" Main Web Site: https://mercurial-scm.org/ -Source code repository: http://selenic.com/hg +Source code repository: https://www.mercurial-scm.org/repo/hg -Mailing list: http://selenic.com/mailman/listinfo/mercurial +Mailing list: https://www.mercurial-scm.org/mailman/listinfo/mercurial/ Copying """""""
--- a/mercurial/help/hg.1.txt Tue Nov 01 04:27:41 2016 +0900 +++ b/mercurial/help/hg.1.txt Tue Nov 01 13:03:42 2016 -0500 @@ -106,9 +106,9 @@ """"""""" Main Web Site: https://mercurial-scm.org/ -Source code repository: http://selenic.com/hg +Source code repository: https://www.mercurial-scm.org/repo/hg -Mailing list: http://selenic.com/mailman/listinfo/mercurial +Mailing list: https://www.mercurial-scm.org/mailman/listinfo/mercurial/ Copying """""""
--- a/mercurial/httppeer.py Tue Nov 01 04:27:41 2016 +0900 +++ b/mercurial/httppeer.py Tue Nov 01 13:03:42 2016 -0500 @@ -63,8 +63,9 @@ self.requestbuilder = urlreq.request def __del__(self): - if self.urlopener: - for h in self.urlopener.handlers: + urlopener = getattr(self, 'urlopener', None) + if urlopener: + for h in urlopener.handlers: h.close() getattr(h, "close_all", lambda : None)()
--- a/mercurial/templater.py Tue Nov 01 04:27:41 2016 +0900 +++ b/mercurial/templater.py Tue Nov 01 13:03:42 2016 -0500 @@ -837,16 +837,14 @@ # i18n: "shortest" is a keyword _("shortest() expects an integer minlength")) - cl = mapping['ctx']._repo.changelog + # _partialmatch() of filtered changelog could take O(len(repo)) time, + # which would be unacceptably slow. so we look for hash collision in + # unfiltered space, which means some hashes may be slightly longer. + cl = mapping['ctx']._repo.unfiltered().changelog def isvalid(test): try: - try: - cl.index.partialmatch(test) - except AttributeError: - # Pure mercurial doesn't support partialmatch on the index. - # Fallback to the slow way. - if cl._partialmatch(test) is None: - return False + if cl._partialmatch(test) is None: + return False try: i = int(test)
--- a/tests/hghave.py Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/hghave.py Tue Nov 01 13:03:42 2016 -0500 @@ -346,6 +346,26 @@ finally: os.unlink(fn) +@check("rmcwd", "can remove current working directory") +def has_rmcwd(): + ocwd = os.getcwd() + temp = tempfile.mkdtemp(dir='.', prefix=tempprefix) + try: + os.chdir(temp) + # On Linux, 'rmdir .' isn't allowed, but the other names are okay. + # On Solaris and Windows, the cwd can't be removed by any names. + os.rmdir(os.getcwd()) + return True + except OSError: + return False + finally: + os.chdir(ocwd) + # clean up temp dir on platforms where cwd can't be removed + try: + os.rmdir(temp) + except OSError: + pass + @check("tla", "GNU Arch tla client") def has_tla(): return matchoutput('tla --version 2>&1', br'The GNU Arch Revision')
--- a/tests/test-bundle.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-bundle.t Tue Nov 01 13:03:42 2016 -0500 @@ -216,8 +216,10 @@ Pull ../full.hg into empty (with hook) - $ echo "[hooks]" >> .hg/hgrc - $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > [hooks] + > changegroup = sh -c "printenv.py changegroup" + > EOF doesn't work (yet ?) @@ -230,7 +232,7 @@ adding manifests adding file changes added 9 changesets with 7 changes to 4 files (+1 heads) - changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:../full.hg (glob) + changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle?../full.hg (glob) (run 'hg heads' to see heads, 'hg merge' to merge) Rollback empty
--- a/tests/test-command-template.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-command-template.t Tue Nov 01 13:03:42 2016 -0500 @@ -31,10 +31,10 @@ Test arithmetic operators have the right precedence: - $ hg log -l 1 -T '{date(date, "%s") + 5 * 10} {date(date, "%s") - 2 * 3}\n' - 1500051 1499995 - $ hg log -l 1 -T '{date(date, "%s") * 5 + 10} {date(date, "%s") * 3 - 2}\n' - 7500015 4500001 + $ hg log -l 1 -T '{date(date, "%Y") + 5 * 10} {date(date, "%Y") - 2 * 3}\n' + 2020 1964 + $ hg log -l 1 -T '{date(date, "%Y") * 5 + 10} {date(date, "%Y") * 3 - 2}\n' + 9860 5908 Test division: @@ -3413,8 +3413,77 @@ hg: parse error: shortest() expects an integer minlength [255] + $ cd .. + +Test shortest(node) with the repo having short hash collision: + + $ hg init hashcollision + $ cd hashcollision + $ cat <<EOF >> .hg/hgrc + > [experimental] + > evolution = createmarkers + > EOF + $ echo 0 > a + $ hg ci -qAm 0 + $ for i in 17 129 248 242 480 580 617 1057 2857 4025; do + > hg up -q 0 + > echo $i > a + > hg ci -qm $i + > done + $ hg up -q null + $ hg log -r0: -T '{rev}:{node}\n' + 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a + 1:11424df6dc1dd4ea255eae2b58eaca7831973bbc + 2:11407b3f1b9c3e76a79c1ec5373924df096f0499 + 3:11dd92fe0f39dfdaacdaa5f3997edc533875cfc4 + 4:10776689e627b465361ad5c296a20a487e153ca4 + 5:a00be79088084cb3aff086ab799f8790e01a976b + 6:a0b0acd79b4498d0052993d35a6a748dd51d13e6 + 7:a0457b3450b8e1b778f1163b31a435802987fe5d + 8:c56256a09cd28e5764f32e8e2810d0f01e2e357a + 9:c5623987d205cd6d9d8389bfc40fff9dbb670b48 + 10:c562ddd9c94164376c20b86b0b4991636a3bf84f + $ hg debugobsolete a00be79088084cb3aff086ab799f8790e01a976b + $ hg debugobsolete c5623987d205cd6d9d8389bfc40fff9dbb670b48 + $ hg debugobsolete c562ddd9c94164376c20b86b0b4991636a3bf84f + + nodes starting with '11' (we don't have the revision number '11' though) + + $ hg log -r 1:3 -T '{rev}:{shortest(node, 0)}\n' + 1:1142 + 2:1140 + 3:11d + + '5:a00' is hidden, but still we have two nodes starting with 'a0' + + $ hg log -r 6:7 -T '{rev}:{shortest(node, 0)}\n' + 6:a0b + 7:a04 + + node '10' conflicts with the revision number '10' even if it is hidden + (we could exclude hidden revision numbers, but currently we don't) + + $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' + 4:107 + $ hg log -r 4 -T '{rev}:{shortest(node, 0)}\n' --hidden + 4:107 + + node 'c562' should be unique if the other 'c562' nodes are hidden + (but we don't try the slow path to filter out hidden nodes for now) + + $ hg log -r 8 -T '{rev}:{node|shortest}\n' + 8:c5625 + $ hg log -r 8:10 -T '{rev}:{node|shortest}\n' --hidden + 8:c5625 + 9:c5623 + 10:c562d + + $ cd .. + Test pad function + $ cd r + $ hg log --template '{pad(rev, 20)} {author|user}\n' 2 test 1 {node|short}
--- a/tests/test-commit-amend.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-commit-amend.t Tue Nov 01 13:03:42 2016 -0500 @@ -1156,6 +1156,8 @@ rev offset length delta linkrev nodeid p1 p2 0 0 88 -1 3 34a4d536c0c0 000000000000 000000000000 +#if execbit + Test if amend preserves executable bit changes $ chmod +x newdirname/commonfile.py $ hg ci -m chmod @@ -1174,3 +1176,4 @@ old mode 100644 new mode 100755 +#endif
--- a/tests/test-commit-interactive-curses.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-commit-interactive-curses.t Tue Nov 01 13:03:42 2016 -0500 @@ -1,3 +1,5 @@ +#require tic + Set up a repo $ cp $HGRCPATH $HGRCPATH.pretest
--- a/tests/test-hook.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-hook.t Tue Nov 01 13:03:42 2016 -0500 @@ -16,9 +16,9 @@ > precommit = sh -c "HG_LOCAL= HG_NODE= HG_TAG= printenv.py precommit" > pretxncommit = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxncommit" > pretxncommit.tip = hg -q tip - > pre-identify = printenv.py pre-identify 1 - > pre-cat = printenv.py pre-cat - > post-cat = printenv.py post-cat + > pre-identify = sh -c "printenv.py pre-identify 1" + > pre-cat = sh -c "printenv.py pre-cat" + > post-cat = sh -c "printenv.py post-cat" > pretxnopen = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnopen" > pretxnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnclose" > txnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py txnclose" @@ -47,9 +47,9 @@ $ cat > .hg/hgrc <<EOF > [hooks] - > prechangegroup = printenv.py prechangegroup - > changegroup = printenv.py changegroup - > incoming = printenv.py incoming + > prechangegroup = sh -c "printenv.py prechangegroup" + > changegroup = sh -c "printenv.py changegroup" + > incoming = sh -c "printenv.py incoming" > EOF pretxncommit and commit hooks can see both parents of merge @@ -122,7 +122,7 @@ $ cd ../a $ cat >> .hg/hgrc <<EOF - > pretag = printenv.py pretag + > pretag = sh -c "printenv.py pretag" > tag = sh -c "HG_PARENT1= HG_PARENT2= printenv.py tag" > EOF $ hg tag -d '3 0' a @@ -142,7 +142,9 @@ pretag hook can forbid tagging - $ echo "pretag.forbid = printenv.py pretag.forbid 1" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > pretag.forbid = sh -c "printenv.py pretag.forbid 1" + > EOF $ hg tag -d '4 0' fa pretag hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa pretag.forbid hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa @@ -157,8 +159,10 @@ pretxncommit hook can see changeset, can roll back txn, changeset no more there after - $ echo "pretxncommit.forbid0 = hg tip -q" >> .hg/hgrc - $ echo "pretxncommit.forbid1 = printenv.py pretxncommit.forbid 1" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > pretxncommit.forbid0 = sh -c "hg tip -q" + > pretxncommit.forbid1 = sh -c "printenv.py pretxncommit.forbid 1" + > EOF $ echo z > z $ hg add z $ hg -q tip @@ -196,7 +200,9 @@ precommit hook can prevent commit - $ echo "precommit.forbid = printenv.py precommit.forbid 1" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > precommit.forbid = sh -c "printenv.py precommit.forbid 1" + > EOF $ hg commit -m 'fail' -d '4 0' precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 precommit.forbid hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 @@ -207,14 +213,18 @@ preupdate hook can prevent update - $ echo "preupdate = printenv.py preupdate" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > preupdate = sh -c "printenv.py preupdate" + > EOF $ hg update 1 preupdate hook: HG_PARENT1=ab228980c14d 0 files updated, 0 files merged, 2 files removed, 0 files unresolved update hook - $ echo "update = printenv.py update" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > update = sh -c "printenv.py update" + > EOF $ hg update preupdate hook: HG_PARENT1=539e4b31b6dc update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc @@ -222,7 +232,9 @@ pushkey hook - $ echo "pushkey = printenv.py pushkey" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > pushkey = sh -c "printenv.py pushkey" + > EOF $ cd ../b $ hg bookmark -r null foo $ hg push -B foo ../a @@ -239,7 +251,9 @@ listkeys hook - $ echo "listkeys = printenv.py listkeys" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > listkeys = sh -c "printenv.py listkeys" + > EOF $ hg bookmark -r null bar pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) @@ -255,7 +269,9 @@ test that prepushkey can prevent incoming keys - $ echo "prepushkey = printenv.py prepushkey.forbid 1" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > prepushkey = sh -c "printenv.py prepushkey.forbid 1" + > EOF $ cd ../b $ hg bookmark -r null baz $ hg push -B baz ../a @@ -273,7 +289,9 @@ test that prelistkeys can prevent listing keys - $ echo "prelistkeys = printenv.py prelistkeys.forbid 1" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > prelistkeys = sh -c "printenv.py prelistkeys.forbid 1" + > EOF $ hg bookmark -r null quux pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) @@ -294,7 +312,7 @@ 3:07f3376c1e65 $ cat > .hg/hgrc <<EOF > [hooks] - > prechangegroup.forbid = printenv.py prechangegroup.forbid 1 + > prechangegroup.forbid = sh -c "printenv.py prechangegroup.forbid 1" > EOF $ hg pull ../a pulling from ../a @@ -309,7 +327,7 @@ $ cat > .hg/hgrc <<EOF > [hooks] > pretxnchangegroup.forbid0 = hg tip -q - > pretxnchangegroup.forbid1 = printenv.py pretxnchangegroup.forbid 1 + > pretxnchangegroup.forbid1 = sh -c "printenv.py pretxnchangegroup.forbid 1" > EOF $ hg pull ../a pulling from ../a @@ -332,8 +350,8 @@ $ rm .hg/hgrc $ cat > ../a/.hg/hgrc <<EOF > [hooks] - > preoutgoing = printenv.py preoutgoing - > outgoing = printenv.py outgoing + > preoutgoing = sh -c "printenv.py preoutgoing" + > outgoing = sh -c "printenv.py outgoing" > EOF $ hg pull ../a pulling from ../a @@ -351,7 +369,9 @@ preoutgoing hook can prevent outgoing changes - $ echo "preoutgoing.forbid = printenv.py preoutgoing.forbid 1" >> ../a/.hg/hgrc + $ cat >> ../a/.hg/hgrc <<EOF + > preoutgoing.forbid = sh -c "printenv.py preoutgoing.forbid 1" + > EOF $ hg pull ../a pulling from ../a searching for changes @@ -365,8 +385,8 @@ $ cd .. $ cat > a/.hg/hgrc <<EOF > [hooks] - > preoutgoing = printenv.py preoutgoing - > outgoing = printenv.py outgoing + > preoutgoing = sh -c "printenv.py preoutgoing" + > outgoing = sh -c "printenv.py outgoing" > EOF $ hg clone a c preoutgoing hook: HG_SOURCE=clone @@ -377,7 +397,9 @@ preoutgoing hook can prevent outgoing changes for local clones - $ echo "preoutgoing.forbid = printenv.py preoutgoing.forbid 1" >> a/.hg/hgrc + $ cat >> a/.hg/hgrc <<EOF + > preoutgoing.forbid = sh -c "printenv.py preoutgoing.forbid 1" + > EOF $ hg clone a zzz preoutgoing hook: HG_SOURCE=clone preoutgoing.forbid hook: HG_SOURCE=clone @@ -750,7 +772,7 @@ $ cd .. $ cat << EOF >> hgrc-with-post-init-hook > [hooks] - > post-init = printenv.py post-init + > post-init = sh -c "printenv.py post-init" > EOF $ HGRCPATH=hgrc-with-post-init-hook hg init to post-init hook: HG_ARGS=init to HG_OPTS={'insecure': None, 'remotecmd': '', 'ssh': ''} HG_PATS=['to'] HG_RESULT=0
--- a/tests/test-http-bundle1.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-http-bundle1.t Tue Nov 01 13:03:42 2016 -0500 @@ -127,8 +127,10 @@ pull $ cd copy-pull - $ echo '[hooks]' >> .hg/hgrc - $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > [hooks] + > changegroup = sh -c "printenv.py changegroup" + > EOF $ hg pull pulling from http://localhost:$HGPORT1/ searching for changes
--- a/tests/test-http.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-http.t Tue Nov 01 13:03:42 2016 -0500 @@ -118,8 +118,10 @@ pull $ cd copy-pull - $ echo '[hooks]' >> .hg/hgrc - $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > [hooks] + > changegroup = sh -c "printenv.py changegroup" + > EOF $ hg pull pulling from http://localhost:$HGPORT1/ searching for changes
--- a/tests/test-https.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-https.t Tue Nov 01 13:03:42 2016 -0500 @@ -203,8 +203,10 @@ pull without cacert $ cd copy-pull - $ echo '[hooks]' >> .hg/hgrc - $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > [hooks] + > changegroup = sh -c "printenv.py changegroup" + > EOF $ hg pull $DISABLECACERTS pulling from https://localhost:$HGPORT/ warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?)
--- a/tests/test-journal-share.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-journal-share.t Tue Nov 01 13:03:42 2016 -0500 @@ -35,12 +35,12 @@ $ cd repo $ hg bookmark bm $ touch file0 - $ hg commit -Am 'file0 added' + $ hg commit -Am file0-added adding file0 $ hg journal --all previous locations of the working copy and bookmarks: - 5640b525682e . commit -Am 'file0 added' - 5640b525682e bm commit -Am 'file0 added' + 0fd3805711f9 . commit -Am file0-added + 0fd3805711f9 bm commit -Am file0-added A shared working copy initially receives the same bookmarks and working copy @@ -51,7 +51,7 @@ $ cd shared1 $ hg journal --all previous locations of the working copy and bookmarks: - 5640b525682e . share repo shared1 + 0fd3805711f9 . share repo shared1 unless you explicitly share bookmarks @@ -62,26 +62,26 @@ $ cd shared2 $ hg journal --all previous locations of the working copy and bookmarks: - 5640b525682e . share --bookmarks repo shared2 - 5640b525682e bm commit -Am 'file0 added' + 0fd3805711f9 . share --bookmarks repo shared2 + 0fd3805711f9 bm commit -Am file0-added Moving the bookmark in the original repository is only shown in the repository that shares bookmarks $ cd ../repo $ touch file1 - $ hg commit -Am "file1 added" + $ hg commit -Am file1-added adding file1 $ cd ../shared1 $ hg journal --all previous locations of the working copy and bookmarks: - 5640b525682e . share repo shared1 + 0fd3805711f9 . share repo shared1 $ cd ../shared2 $ hg journal --all previous locations of the working copy and bookmarks: - 6432d239ac5d bm commit -Am 'file1 added' - 5640b525682e . share --bookmarks repo shared2 - 5640b525682e bm commit -Am 'file0 added' + 4f354088b094 bm commit -Am file1-added + 0fd3805711f9 . share --bookmarks repo shared2 + 0fd3805711f9 bm commit -Am file0-added But working copy changes are always 'local' @@ -91,26 +91,26 @@ (leaving bookmark bm) $ hg journal --all previous locations of the working copy and bookmarks: - 5640b525682e . up 0 - 6432d239ac5d . commit -Am 'file1 added' - 6432d239ac5d bm commit -Am 'file1 added' - 5640b525682e . commit -Am 'file0 added' - 5640b525682e bm commit -Am 'file0 added' + 0fd3805711f9 . up 0 + 4f354088b094 . commit -Am file1-added + 4f354088b094 bm commit -Am file1-added + 0fd3805711f9 . commit -Am file0-added + 0fd3805711f9 bm commit -Am file0-added $ cd ../shared2 $ hg journal --all previous locations of the working copy and bookmarks: - 6432d239ac5d bm commit -Am 'file1 added' - 5640b525682e . share --bookmarks repo shared2 - 5640b525682e bm commit -Am 'file0 added' + 4f354088b094 bm commit -Am file1-added + 0fd3805711f9 . share --bookmarks repo shared2 + 0fd3805711f9 bm commit -Am file0-added $ hg up tip 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg up 0 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg journal previous locations of '.': - 5640b525682e up 0 - 6432d239ac5d up tip - 5640b525682e share --bookmarks repo shared2 + 0fd3805711f9 up 0 + 4f354088b094 up tip + 0fd3805711f9 share --bookmarks repo shared2 Unsharing works as expected; the journal remains consistent @@ -118,16 +118,16 @@ $ hg unshare $ hg journal --all previous locations of the working copy and bookmarks: - 5640b525682e . share repo shared1 + 0fd3805711f9 . share repo shared1 $ cd ../shared2 $ hg unshare $ hg journal --all previous locations of the working copy and bookmarks: - 5640b525682e . up 0 - 6432d239ac5d . up tip - 6432d239ac5d bm commit -Am 'file1 added' - 5640b525682e . share --bookmarks repo shared2 - 5640b525682e bm commit -Am 'file0 added' + 0fd3805711f9 . up 0 + 4f354088b094 . up tip + 4f354088b094 bm commit -Am file1-added + 0fd3805711f9 . share --bookmarks repo shared2 + 0fd3805711f9 bm commit -Am file0-added New journal entries in the source repo no longer show up in the other working copies @@ -135,7 +135,7 @@ $ hg bookmark newbm -r tip $ hg journal newbm previous locations of 'newbm': - 6432d239ac5d bookmark newbm -r tip + 4f354088b094 bookmark newbm -r tip $ cd ../shared2 $ hg journal newbm previous locations of 'newbm': @@ -146,7 +146,7 @@ $ hg bookmark shared2bm -r tip $ hg journal shared2bm previous locations of 'shared2bm': - 6432d239ac5d bookmark shared2bm -r tip + 4f354088b094 bookmark shared2bm -r tip $ cd ../repo $ hg journal shared2bm previous locations of 'shared2bm':
--- a/tests/test-largefiles-update.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-largefiles-update.t Tue Nov 01 13:03:42 2016 -0500 @@ -712,7 +712,7 @@ $ hg update -q -C 4 - $ cat > exec-bit.patch <<EOF + $ cat > ../exec-bit.patch <<EOF > # HG changeset patch > # User test > # Date 0 0 @@ -725,8 +725,8 @@ > old mode 100644 > new mode 100755 > EOF - $ hg import --exact --bypass exec-bit.patch - applying exec-bit.patch + $ hg import --exact --bypass ../exec-bit.patch + applying ../exec-bit.patch $ hg status -A --rev tip large2 C large2
--- a/tests/test-push-http-bundle1.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-push-http-bundle1.t Tue Nov 01 13:03:42 2016 -0500 @@ -66,10 +66,12 @@ expect success - $ echo 'allow_push = *' >> .hg/hgrc - $ echo '[hooks]' >> .hg/hgrc - $ echo "changegroup = printenv.py changegroup 0" >> .hg/hgrc - $ echo "pushkey = printenv.py pushkey 0" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > allow_push = * + > [hooks] + > changegroup = sh -c "printenv.py changegroup 0" + > pushkey = sh -c "printenv.py pushkey 0" + > EOF $ req pushing to http://localhost:$HGPORT/ searching for changes @@ -151,7 +153,7 @@ > push_ssl = false > allow_push = * > [hooks] - > prepushkey = printenv.py prepushkey 1 + > prepushkey = sh -c "printenv.py prepushkey 1" > EOF $ req pushing to http://localhost:$HGPORT/ @@ -164,7 +166,9 @@ expect phase change success - $ echo "prepushkey = printenv.py prepushkey 0" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > prepushkey = sh -c "printenv.py prepushkey 0" + > EOF $ req pushing to http://localhost:$HGPORT/ searching for changes
--- a/tests/test-push-http.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-push-http.t Tue Nov 01 13:03:42 2016 -0500 @@ -56,10 +56,12 @@ expect success - $ echo 'allow_push = *' >> .hg/hgrc - $ echo '[hooks]' >> .hg/hgrc - $ echo "changegroup = printenv.py changegroup 0" >> .hg/hgrc - $ echo "pushkey = printenv.py pushkey 0" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > allow_push = * + > [hooks] + > changegroup = sh -c "printenv.py changegroup 0" + > pushkey = sh -c "printenv.py pushkey 0" + > EOF $ req pushing to http://localhost:$HGPORT/ searching for changes @@ -114,7 +116,7 @@ > push_ssl = false > allow_push = * > [hooks] - > prepushkey = printenv.py prepushkey 1 + > prepushkey = sh -c "printenv.py prepushkey 1" > EOF $ req pushing to http://localhost:$HGPORT/ @@ -133,7 +135,9 @@ expect phase change success - $ echo "prepushkey = printenv.py prepushkey 0" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > prepushkey = sh -c "printenv.py prepushkey 0" + > EOF $ req pushing to http://localhost:$HGPORT/ searching for changes
--- a/tests/test-rebase-scenario-global.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-rebase-scenario-global.t Tue Nov 01 13:03:42 2016 -0500 @@ -756,12 +756,19 @@ $ touch subfile $ hg add subfile $ hg commit -m 'second source with subdir' +#if rmcwd $ hg rebase -b . -d 1 --traceback rebasing 2:779a07b1b7a0 "first source commit" current directory was removed (consider changing to repo root: $TESTTMP/cwd-vanish) rebasing 3:a7d6f3a00bf3 "second source with subdir" (tip) saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-backup.hg (glob) +#else + $ hg rebase -b . -d 1 --traceback + rebasing 2:779a07b1b7a0 "first source commit" + rebasing 3:a7d6f3a00bf3 "second source with subdir" (tip) + saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-backup.hg (glob) +#endif Test that rebase is done in topo order (issue5370)
--- a/tests/test-ssh-bundle1.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-ssh-bundle1.t Tue Nov 01 13:03:42 2016 -0500 @@ -38,7 +38,7 @@ > uncompressed = True > > [hooks] - > changegroup = printenv.py changegroup-in-remote 0 ../dummylog + > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" > EOF $ cd .. @@ -114,8 +114,10 @@ crosschecking files in changesets and manifests checking files 2 files, 3 changesets, 2 total revisions - $ echo '[hooks]' >> .hg/hgrc - $ echo "changegroup = printenv.py changegroup-in-local 0 ../dummylog" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > [hooks] + > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" + > EOF empty default pull
--- a/tests/test-ssh.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-ssh.t Tue Nov 01 13:03:42 2016 -0500 @@ -32,7 +32,7 @@ > uncompressed = True > > [hooks] - > changegroup = printenv.py changegroup-in-remote 0 ../dummylog + > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" > EOF $ cd .. @@ -108,8 +108,10 @@ crosschecking files in changesets and manifests checking files 2 files, 3 changesets, 2 total revisions - $ echo '[hooks]' >> .hg/hgrc - $ echo "changegroup = printenv.py changegroup-in-local 0 ../dummylog" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > [hooks] + > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" + > EOF empty default pull
--- a/tests/test-static-http.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-static-http.t Tue Nov 01 13:03:42 2016 -0500 @@ -53,8 +53,10 @@ $ rm .hg/cache/* $ cd ../local - $ echo '[hooks]' >> .hg/hgrc - $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc + $ cat >> .hg/hgrc <<EOF + > [hooks] + > changegroup = sh -c "printenv.py changegroup" + > EOF $ hg pull pulling from static-http://localhost:$HGPORT/remote searching for changes
--- a/tests/test-tag.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-tag.t Tue Nov 01 13:03:42 2016 -0500 @@ -109,7 +109,7 @@ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg tag -l localblah $ hg tag "foobar" - abort: not at a branch head (use -f to force) + abort: working directory is not at a branch head (use -f to force) [255] $ hg tag -f "foobar" $ cat .hgtags @@ -339,7 +339,7 @@ $ hg up null 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ hg tag nullrev - abort: not at a branch head (use -f to force) + abort: working directory is not at a branch head (use -f to force) [255] $ hg init empty
--- a/tests/test-update-names.t Tue Nov 01 04:27:41 2016 +0900 +++ b/tests/test-update-names.t Tue Nov 01 13:03:42 2016 -0500 @@ -73,6 +73,8 @@ #endif +#if rmcwd + Test that warning is printed if cwd is deleted during update $ hg init r4 && cd r4 $ mkdir dir @@ -84,3 +86,5 @@ $ hg up -q null current directory was removed (consider changing to repo root: $TESTTMP/r1/r4) + +#endif