# HG changeset patch # User Martin Geisler # Date 2011-01-05 14:56:03 # Node ID 0935ff767285a4a1eb8c141c05bb99884c09a0db # Parent f3058dd052819de75908599d93a29241ba69318f # Parent 0b30e6148ec5e672662b714b3012c91d7487996e merge with stable diff --git a/doc/hgrc.5.txt b/doc/hgrc.5.txt --- a/doc/hgrc.5.txt +++ b/doc/hgrc.5.txt @@ -991,10 +991,11 @@ The full set of options is: third-party tools like email notification hooks can construct URLs. Example: ``http://hgserver/repos/``. ``cacerts`` - Path to file containing a list of PEM encoded certificate authority - certificates. If specified on the client, then it will verify the identity - of remote HTTPS servers with these certificates. The form must be - as follows:: + Path to file containing a list of PEM encoded certificate + authority certificates. Environment variables and ``~user`` + constructs are expanded in the filename. If specified on the + client, then it will verify the identity of remote HTTPS servers + with these certificates. The form must be as follows:: -----BEGIN CERTIFICATE----- ... (certificate in base64 PEM encoding) ... diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1880,7 +1880,7 @@ def help_(ui, name=None, with_version=Fa msg = _('use "hg help" for the full list of commands ' 'or "hg -v" for details') elif aliases: - msg = _('use "hg -v help%s" to show aliases and ' + msg = _('use "hg -v help%s" to show builtin aliases and ' 'global options') % (name and " " + name or "") else: msg = _('use "hg -v help %s" to show global options') % name diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -505,7 +505,7 @@ class dirstate(object): i, j = 0, 0 while i < len(files) and j < len(subrepos): subpath = subrepos[j] + "/" - if not files[i].startswith(subpath): + if files[i] < subpath: i += 1 continue while files and files[i].startswith(subpath): diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -549,6 +549,6 @@ def remoteui(src, opts): dst.setconfig(sect, key, val) v = src.config('web', 'cacerts') if v: - dst.setconfig('web', 'cacerts', v) + dst.setconfig('web', 'cacerts', util.expandpath(v)) return dst diff --git a/mercurial/url.py b/mercurial/url.py --- a/mercurial/url.py +++ b/mercurial/url.py @@ -530,6 +530,8 @@ if has_https: def connect(self): if hasattr(self, 'ui'): cacerts = self.ui.config('web', 'cacerts') + if cacerts: + cacerts = util.expandpath(cacerts) else: cacerts = None diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t --- a/tests/test-globalopts.t +++ b/tests/test-globalopts.t @@ -347,7 +347,7 @@ Testing -h/--help: hgweb Configuring hgweb glossary Glossary - use "hg -v help" to show aliases and global options + use "hg -v help" to show builtin aliases and global options $ hg --help Mercurial Distributed SCM @@ -423,7 +423,7 @@ Testing -h/--help: hgweb Configuring hgweb glossary Glossary - use "hg -v help" to show aliases and global options + use "hg -v help" to show builtin aliases and global options Not tested: --debugger diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -118,7 +118,7 @@ Short help: hgweb Configuring hgweb glossary Glossary - use "hg -v help" to show aliases and global options + use "hg -v help" to show builtin aliases and global options $ hg -q help add add the specified files on the next commit @@ -416,7 +416,7 @@ Test ambiguous command help add add the specified files on the next commit addremove add all new files, delete all missing files - use "hg -v help ad" to show aliases and global options + use "hg -v help ad" to show builtin aliases and global options Test command without options @@ -716,7 +716,7 @@ Test that default list of commands omits hgweb Configuring hgweb glossary Glossary - use "hg -v help" to show aliases and global options + use "hg -v help" to show builtin aliases and global options Test list of commands with command with no help text @@ -727,7 +727,7 @@ Test list of commands with command with nohelp (no help text available) - use "hg -v help helpext" to show aliases and global options + use "hg -v help helpext" to show builtin aliases and global options Test a help topic diff --git a/tests/test-https.t b/tests/test-https.t --- a/tests/test-https.t +++ b/tests/test-https.t @@ -154,11 +154,12 @@ cacert configured in local repo no changes found $ mv copy-pull/.hg/hgrc.bu copy-pull/.hg/hgrc -cacert configured globally +cacert configured globally, also testing expansion of environment +variables in the filename $ echo "[web]" >> $HGRCPATH - $ echo "cacerts=`pwd`/pub.pem" >> $HGRCPATH - $ hg -R copy-pull pull + $ echo 'cacerts=$P/pub.pem' >> $HGRCPATH + $ P=`pwd` hg -R copy-pull pull pulling from https://localhost:$HGPORT/ searching for changes no changes found diff --git a/tests/test-mq.t b/tests/test-mq.t --- a/tests/test-mq.t +++ b/tests/test-mq.t @@ -77,7 +77,7 @@ help qunapplied print the patches not yet applied strip strip changesets and all their descendants from the repository - use "hg -v help mq" to show aliases and global options + use "hg -v help mq" to show builtin aliases and global options $ hg init a $ cd a diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t --- a/tests/test-subrepo.t +++ b/tests/test-subrepo.t @@ -656,3 +656,22 @@ Try to push from the other side adding manifests adding file changes added 1 changesets with 1 changes to 1 files + +Check status of files when none of them belong to the first +subrepository: + + $ hg init subrepo-status + $ cd subrepo-status + $ hg init subrepo-1 + $ hg init subrepo-2 + $ cd subrepo-2 + $ touch file + $ hg add file + $ cd .. + $ echo subrepo-1 = subrepo-1 > .hgsub + $ echo subrepo-2 = subrepo-2 >> .hgsub + $ hg add .hgsub + $ hg ci -m 'Added subrepos' + committing subrepository subrepo-1 + committing subrepository subrepo-2 + $ hg st subrepo-2/file