Adrian Buehlmann <adrian@cadifra.com> [Fri, 29 Jul 2011 00:39:27 +0200] rev 14985
windows: eliminate win32 wildcard import
Matt Mackall <mpm@selenic.com> [Fri, 29 Jul 2011 17:27:38 -0500] rev 14984
merge with stable
Matt Mackall <mpm@selenic.com> [Fri, 29 Jul 2011 17:27:14 -0500] rev 14983
merge with crew
Lee Cantey <lcantey@gmail.com> [Thu, 28 Jul 2011 02:38:01 +0300] rev 14982
test-filecache: change for python 2.4 compatibility
Andrew Pritchard <andrewp@fogcreek.com> [Wed, 27 Jul 2011 18:32:54 -0400] rev 14981
setdiscovery: return anyincoming=False when remote's only head is nullid
This fixes (
issue2907) a crash when using 'hg incoming --bundle' with an empty
remote repo and a non-empty local repo.
This also fixes an unreported bug that 'hg summary --remote' erroneously
reports incoming changes when the remote repo is empty and the local is not.
Also, add a test to make sure
issue2907 stays fixed
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 28 Jul 2011 14:36:07 +0900] rev 14980
i18n: use UTF-8 string to lower filename for case collision check
Some character sets, cp932 (known as Shift-JIS for Japanese) for
example, use 0x41('A') - 0x5A('Z') and 0x61('a') - 0x7A('z') as second
or later character.
In such character set, case collision checking recognizes different
files as CASEFOLDED same file, if filenames are treated as byte
sequence.
win32mbcs extension is not appropriate to handle this problem, because
this problem can occur on other than Windows platform only if
problematic character set is used.
Callers of util.checkcase() use known ASCII filenames as last
component of path, and string.lower() is not applied to directory part
of path. So, util.checkcase() is kept intact, even though it applies
string.lower() to filenames.
Matt Mackall <mpm@selenic.com> [Thu, 28 Jul 2011 14:20:06 -0500] rev 14979
merge with crew
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 14:59:31 -0500] rev 14978
check-code: disallow use of hasattr()
The hasattr() builtin from Python < 3.2 [1] has slightly surprising
behavior: it catches all exceptions, even KeyboardInterrupt. This
causes it to have several surprising side effects, such as hiding
warnings that occur during attribute load and causing mysterious
failure modes when ^Cing an application. In later versions of Python
2.x [0], exception classes which do not inherit from Exception (such
as SystemExit and KeyboardInterrupt) are not caught, but other types
of exceptions may still silently cause returning False instead of
getting a reasonable exception.
[0] http://bugs.python.org/
issue2196
[1] http://docs.python.org/dev/whatsnew/3.2.html
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 21:15:48 -0500] rev 14977
demandimport: use getattr instead of hasattr
We don't use util.safehasattr() here to avoid adding new dependencies
for demandimport. This change may expose previously-silenced
deprecation warnings to appear, as hasattr silently hides warnings
that occur during module import when using demandimport.
Augie Fackler <durin42@gmail.com> [Tue, 01 Mar 2011 23:35:22 -0600] rev 14976
demandimport: blacklist rfc822 and mimetools to prevent spurious warnings
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 20:46:30 -0500] rev 14975
i18n: use getattr instead of hasattr
Using getattr instead of util.safehasattr here to avoid adding another
dependency for i18n.
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:09:18 -0500] rev 14974
win32/hgwebdir_wsgi: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:08:57 -0500] rev 14973
setup.py: use getattr instead of hasdattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:07:52 -0500] rev 14972
setup3k: use getattr instead of hasattr
Note that hasattr is fixed on Python 3, so this is more about being
concise and keeping check-code happy than actual correctness of code.
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:37:18 -0500] rev 14971
tests: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:05:01 -0500] rev 14970
wireproto: use safehasattr or getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:04:44 -0500] rev 14969
windows: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:04:40 -0500] rev 14968
util: use safehasattr or getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:02:42 -0500] rev 14967
templatefilters: use safehasattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:02:27 -0500] rev 14966
patch: use safehasattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:02:15 -0500] rev 14965
mail: use safehasattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:55:51 -0500] rev 14964
url: replace uses of hasattr with safehasattr or getattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:53:22 -0500] rev 14963
subrepo: use safehasattr instead of hasattr
Some of these instances could be rewritten as clever getattr(x, y,
default) ladders, but that felt like it impeded readability too much
to be worth the modest efficiency gain.
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:47:43 -0500] rev 14962
statichttprepo: replace hasattr with getattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:45:11 -0500] rev 14961
walkrepos: use getattr instead of hasattr for samestat
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:43:55 -0500] rev 14960
revlog: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:41:46 -0500] rev 14959
lsprof: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 20:36:59 -0500] rev 14958
keepalive: use safehasattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:38:46 -0500] rev 14957
hgweb: move remaining hasattr calls to safehasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:38:10 -0500] rev 14956
wsgicgi: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:37:52 -0500] rev 14955
httprepo: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:36:13 -0500] rev 14954
help command: use safehasattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:27:08 -0500] rev 14953
hgweb_mod: use safehasattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:22:18 -0500] rev 14952
hg: use safehasattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:19:43 -0500] rev 14951
encoding: use getattr isntead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:17:47 -0500] rev 14950
dispatch: use safehasattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:36:56 -0500] rev 14949
debugignore: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:32:42 -0500] rev 14948
cmdutil: use safehasattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:09:17 -0500] rev 14947
byterange: replace uses of hasattr with getattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:07:09 -0500] rev 14946
bookmarks: use getattr instead of hasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 20:37:12 -0500] rev 14945
hgext: replace uses of hasattr with util.safehasattr
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 15:30:19 -0500] rev 14944
globally: use safehasattr(x, '__iter__') instead of hasattr(x, '__iter__')
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:24:37 -0500] rev 14943
globally: use safehasattr(x, '__call__') instead of hasattr(x, '__call__')
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 14:59:55 -0500] rev 14942
safehasattr: new function to work around hasattr being broken
Augie Fackler <durin42@gmail.com> [Mon, 25 Jul 2011 16:14:02 -0500] rev 14941
windows: check util.mainfrozen() instead of ad-hoc checks everywhere
Patrick Mezard <pmezard@gmail.com> [Tue, 26 Jul 2011 21:30:12 +0200] rev 14940
notify: rewrite user documentation
The main intent is to turn the reference help into a configuration walkthrough.
It also fix several things:
- Do not suggest to use it for commit notifications, it cannot work
- Fix notify.strip default value
- Mention that subscriptions can be setup in Mercurial configuration files
- Improve notify.strip and notify.domain documentation
Idan Kamara <idankk86@gmail.com> [Mon, 25 Jul 2011 22:19:28 +0300] rev 14939
cmdserver: repo.invalidate() on every runcommand
This will trigger the filecache and recreate every cached property that was
changed by something other than this cmdserver instance (e.g. by running
'hg commit' at the cmdline).
Angel Ezquerra <angel.ezquerra@gmail.com> [Mon, 25 Jul 2011 08:28:37 +0200] rev 14938
help: add "web/logoimg" setting description
Matt Mackall <mpm@selenic.com> [Mon, 25 Jul 2011 12:58:47 -0500] rev 14937
filecache: fix check-code complaint
Idan Kamara <idankk86@gmail.com> [Mon, 25 Jul 2011 15:08:57 +0300] rev 14936
localrepo: unify tag related info into a tagscache class
Idan Kamara <idankk86@gmail.com> [Mon, 25 Jul 2011 15:08:37 +0300] rev 14935
localrepo: make invalidate() walk _filecache
Idan Kamara <idankk86@gmail.com> [Mon, 25 Jul 2011 15:08:37 +0300] rev 14934
localrepo: decorate manifest() with filecache
Idan Kamara <idankk86@gmail.com> [Mon, 25 Jul 2011 15:08:37 +0300] rev 14933
localrepo: decorate _bookmarks/current with filecache
nodebookmarks() can be cached as well, leaving for later
Idan Kamara <idankk86@gmail.com> [Mon, 25 Jul 2011 15:08:37 +0300] rev 14932
localrepo: decorate changelog() with filecache
Idan Kamara <idankk86@gmail.com> [Mon, 25 Jul 2011 15:08:37 +0300] rev 14931
localrepo: refresh filecache entries after releasing a repo.lock()
Idan Kamara <idankk86@gmail.com> [Mon, 25 Jul 2011 15:08:37 +0300] rev 14930
localrepo: decorate dirstate() with filecache
We refresh the stat info when releasing repo.wlock(), right after writing it.
Also, invalidate the dirstate by deleting its attribute. This will force a
stat by the decorator that actually checks if anything changed, rather than
reading it again every time.
Note that prior to this, there was a single dirstate instance created for a
localrepo. It was invalidated by calling dirstate.invalidated(), clearing
its internal attributes.
As a consequence, the following construct is no longer safe:
ds = repo.dirstate # keep a reference to the repo's dirstate
wlock = repo.wlock()
try:
ds.setparents(...)
finally:
wlock.release() # dirstate should be written here
Since it's possible that the dirstate was modified between lines #1 and #2,
therefore changes to the old dirstate won't get written when the lock releases,
because a new instance was created by the decorator.
Idan Kamara <idankk86@gmail.com> [Mon, 25 Jul 2011 15:08:37 +0300] rev 14929
localrepo: add a cache with stat info for files under .hg/
Idan Kamara <idankk86@gmail.com> [Sat, 09 Jul 2011 19:06:59 +0300] rev 14928
scmutil: introduce filecache
The idea is being able to associate a file with a property, and watch
that file stat info for modifications when we decide it's important for it to
be up-to-date. Once it changes, we recreate the object.
On filesystems that can't uniquely identify a file, we always recreate.
As a consequence, localrepo.invalidate() will become much less expensive in the
case where nothing changed on-disk.
Idan Kamara <idankk86@gmail.com> [Mon, 25 Jul 2011 15:03:02 +0300] rev 14927
posix, windows: introduce cachestat
This class contains a stat result, and possibly other file info to reliably
determine between two points in time whether a file has changed.
Uniquely identifying a file gives us that reliability because we either
atomic rename or append. So one of two will happen: the file 'id' will change,
or the size of the file will change.
posix implements it simply by calling os.stat() and checking if the result
has st_ino.
For now on Windows we always assume the path is uncacheable. This can be
improved on NTFS due to file IDs: http://msdn.microsoft.com/en-us/library/
aa363788(v=vs.85).aspx
So we need to find out if a file path is on an NTFS drive, for that we have:
- GetVolumeInformation, which unfortunately only works with a root path (but is available on XP)
- GetVolumeInformationByHandleW, works on a full file path but requires Vista or higher
Adrian Buehlmann <adrian@cadifra.com> [Sat, 23 Jul 2011 12:29:52 +0200] rev 14926
util: eliminate wildcard imports
Matt Mackall <mpm@selenic.com> [Sat, 23 Jul 2011 14:33:35 -0500] rev 14925
templater: use a global funcs table
Simon Heimberg <simohe@besonet.ch> [Sat, 23 Jul 2011 06:09:14 +0200] rev 14924
ui: config path relative to repo root
Simon Heimberg <simohe@besonet.ch> [Sat, 23 Jul 2011 06:08:52 +0200] rev 14923
ui: providing no default value to configpath should not raise an Error
Simon Heimberg <simohe@besonet.ch> [Sat, 23 Jul 2011 06:08:49 +0200] rev 14922
ui: fix error, base can not be a list
Matt Mackall <mpm@selenic.com> [Sat, 23 Jul 2011 11:52:25 -0500] rev 14921
merge with stable
Wagner Bruna <wbruna@softwareexpress.com.br> [Fri, 22 Jul 2011 20:31:15 -0300] rev 14920
test-i18n, i18n-pt_BR: updated test message changed in
41c3a71c318d
Wagner Bruna <wbruna@softwareexpress.com.br> [Fri, 22 Jul 2011 20:27:40 -0300] rev 14919
i18n-pt_BR: synchronized with
a934b9249574
Matt Mackall <mpm@selenic.com> [Fri, 22 Jul 2011 17:17:23 -0500] rev 14918
merge with stable
Augie Fackler <durin42@gmail.com> [Thu, 21 Jul 2011 15:56:15 -0500] rev 14917
rebase: remove trailing whitespace found by check-code
Lee Cantey <lcantey@gmail.com> [Fri, 22 Jul 2011 08:03:47 -0700] rev 14916
hooks: use python 2.4 compatible exception handling
Matt Mackall <mpm@selenic.com> [Fri, 22 Jul 2011 17:11:35 -0500] rev 14915
url: handle urls of the form file:///c:/foo/bar/ correctly
David Golub <davidg@fogcreek.com> [Thu, 21 Jul 2011 16:02:34 -0400] rev 14914
dispatch: avoid double backslashes in error message
The use of %r in the format string caused Python to display Windows paths with
double backslashes.
Angel Ezquerra <angel.ezquerra@gmail.com> [Thu, 21 Jul 2011 15:10:16 +0200] rev 14913
hgweb: add a "web/logoimg" setting to customize the web logo image
This change complements the existing web/logourl setting, and lets the user
customize the logo image that is shown on many of the hg server pages.
If this setting is not set, hglogo.png is used.
Adrian Buehlmann <adrian@cadifra.com> [Thu, 21 Jul 2011 11:05:26 +0200] rev 14912
util: move windows and posix wildcard imports to begin of file
Adrian Buehlmann <adrian@cadifra.com> [Fri, 22 Jul 2011 10:35:05 +0200] rev 14911
util: move "default" hidewindow to posix.py
There is a hidewindow in win32.py, which we get via windows.py
Adrian Buehlmann <adrian@cadifra.com> [Fri, 22 Jul 2011 10:31:56 +0200] rev 14910
util: move "default" lookupreg to posix.py
There is a lookupreg in win32.py, which we get via windows.py
Adrian Buehlmann <adrian@cadifra.com> [Fri, 22 Jul 2011 09:55:46 +0200] rev 14909
util: move "default" unlinkpath to posix.py
we have a unlinkpath in windows.py
Adrian Buehlmann <adrian@cadifra.com> [Fri, 22 Jul 2011 09:53:15 +0200] rev 14908
util: move "default" makedir to posix.py
makedir is already defined in win32.py, which gets imported into util.py
via windows.py if we are running on Windows
Augie Fackler <durin42@gmail.com> [Thu, 21 Jul 2011 15:52:08 -0500] rev 14907
summary: allow color to highlight active bookmark
Augie Fackler <durin42@gmail.com> [Mon, 18 Jul 2011 07:53:26 -0500] rev 14906
summary: show bookmarks separate from tags and note active mark (
issue2892)
Andrew Pritchard <andrewp@fogcreek.com> [Wed, 20 Jul 2011 18:23:06 -0400] rev 14905
localrepo: make requirements attribute of newly-created repos contain a set
This is for internal consistency, as this attribute typically contains a set
Matt Mackall <mpm@selenic.com> [Fri, 22 Jul 2011 16:46:22 -0500] rev 14904
localrepo: fix comment on set
Matt Mackall <mpm@selenic.com> [Thu, 21 Jul 2011 15:39:37 -0500] rev 14903
revert: restore check for uncommitted merge (
issue2915) (BC)
This will restore the pre-1.9 behavior.
Matt Mackall <mpm@selenic.com> [Thu, 21 Jul 2011 14:06:55 -0500] rev 14902
localrepo: add set method to iterate over a given revset
This should allow replacing a number of hand-rolled graph algorithms.
Matt Mackall <mpm@selenic.com> [Thu, 21 Jul 2011 14:05:45 -0500] rev 14901
revset: add formatspec convenience query builder
Matt Mackall <mpm@selenic.com> [Thu, 21 Jul 2011 14:04:57 -0500] rev 14900
revset: allow bypassing alias expansion
For internal usage of revset queries, we don't want aliases breaking things.
Matt Mackall <mpm@selenic.com> [Tue, 19 Jul 2011 17:51:45 -0500] rev 14899
merge with stable
Kevin Bullock <kbullock@ringworld.org> [Tue, 19 Jul 2011 13:43:53 -0500] rev 14898
subrepo: don't commit in subrepo if it's clean
If a subrepo has changed relative to the outer repo's substate, but the
subrepo itself is clean, we don't need to commit in the subrepo.
Stefano Tortarolo <stefano.tortarolo@gmail.com> [Mon, 18 Jul 2011 22:58:21 +0200] rev 14897
rebase: block collapse with keepbranches on multiple named branches (
issue2112)
Collapse and keepbranches should be blocked when there is more than
one named branch on the branch that's going to be rebased.
Matt Mackall <mpm@selenic.com> [Tue, 19 Jul 2011 14:19:04 -0500] rev 14896
merge with stable
Alexander Krauss <krauss@in.tum.de> [Sun, 17 Jul 2011 00:36:43 +0200] rev 14895
hbisect: do not assume that min(good) is an ancestor of min(bad)
The included test used to report "inconsistent state", which is
incorrect. While this situation cannot occur when the user sticks to
the suggested bisect sequence. However, adding more consistent
good/bad information to the bisect state should be tolerated as well.
Alexander Krauss <krauss@in.tum.de> [Sun, 17 Jul 2011 00:35:31 +0200] rev 14894
hbisect: more consistent variable name
Alexander Krauss <krauss@in.tum.de> [Sat, 16 Jul 2011 12:22:40 +0200] rev 14893
hbisect: confine loop to the relevant interval
In this context we know that ancestors[rev] == None for all rev <= goodrev,
so looping further back is unnecessary (and confusing).
Idan Kamara <idankk86@gmail.com> [Sat, 16 Jul 2011 15:24:28 +0300] rev 14892
win32: assign winstdout to sys.__stdout__ as well (
issue2888)
On Windows sys.stdout was being replaced with winstdout, which caused
util.system() to redirect its output (due to
406b6d7bdcb9). That causes
interactive tools (such as vim) to stop working.
Matt Mackall <mpm@selenic.com> [Mon, 18 Jul 2011 14:57:22 -0500] rev 14891
alias: note interaction of shell aliases with early opts in help
Matt Mackall <mpm@selenic.com> [Mon, 18 Jul 2011 14:53:52 -0500] rev 14890
alias: fix up test results