# HG changeset patch
# User Matt Mackall
# Date 1236616898 18000
# Node ID 2444285ec33870de0e3fcaa7c9cfda63649c3a5e
# Parent 55bd03e2e13c65eeb7175abfc60f9a6ef5e6f0f4# Parent 794def2fe232f9c0f025cc922ff07d8203221d02
Merge with crew-stable
diff -r 794def2fe232 -r 2444285ec338 contrib/win32/ReadMe.html
--- a/contrib/win32/ReadMe.html Sat Mar 07 20:16:03 2009 +0100
+++ b/contrib/win32/ReadMe.html Mon Mar 09 11:41:38 2009 -0500
@@ -93,7 +93,7 @@
href="http://www.serpentine.com/blog">Bryan
O'Sullivan.
- Mercurial is Copyright 2005-2008 Matt Mackall and others.
+
Mercurial is Copyright 2005-2009 Matt Mackall and others.
See the Contributors.txt file for a list of contributors.
Mercurial is free software; you can redistribute it and/or
diff -r 794def2fe232 -r 2444285ec338 mercurial/commands.py
--- a/mercurial/commands.py Sat Mar 07 20:16:03 2009 +0100
+++ b/mercurial/commands.py Mon Mar 09 11:41:38 2009 -0500
@@ -2942,7 +2942,7 @@
ui.write(_("Mercurial Distributed SCM (version %s)\n")
% util.version())
ui.status(_(
- "\nCopyright (C) 2005-2008 Matt Mackall and others\n"
+ "\nCopyright (C) 2005-2009 Matt Mackall and others\n"
"This is free software; see the source for copying conditions. "
"There is NO\nwarranty; "
"not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
diff -r 794def2fe232 -r 2444285ec338 mercurial/help.py
--- a/mercurial/help.py Sat Mar 07 20:16:03 2009 +0100
+++ b/mercurial/help.py Mon Mar 09 11:41:38 2009 -0500
@@ -98,7 +98,7 @@
HG::
Path to the 'hg' executable, automatically passed when running hooks,
extensions or external tools. If unset or empty, this is the hg
- exutable's name if it's frozen, or an executable named 'hg'
+ executable's name if it's frozen, or an executable named 'hg'
(with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on
Windows) is searched.
diff -r 794def2fe232 -r 2444285ec338 setup.py
--- a/setup.py Sat Mar 07 20:16:03 2009 +0100
+++ b/setup.py Mon Mar 09 11:41:38 2009 -0500
@@ -97,7 +97,10 @@
except ImportError:
pass
-try:
+def getversion():
+ if not os.path.exists('.hg'):
+ return None # not in a repository
+
# execute hg out of this directory with a custom environment which
# includes the pure Python modules in mercurial/pure
pypath = os.environ.get('PYTHONPATH', '')
@@ -105,23 +108,31 @@
os.environ['PYTHONPATH'] = os.pathsep.join(['mercurial', purepath, pypath])
os.environ['HGRCPATH'] = '' # do not read any config file
cmd = '%s hg id -it' % sys.executable
- l = os.popen(cmd).read().split()
+
+ try:
+ l = os.popen(cmd).read().split()
+ except OSError, e:
+ print "warning: could not establish Mercurial version: %s" % e
+
os.environ['PYTHONPATH'] = pypath
+
while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags
l.pop()
- version = l and l[-1] or 'unknown' # latest tag or revision number
- if version.endswith('+'):
- version += time.strftime('%Y%m%d')
+ if l:
+ version = l[-1] # latest tag or revision number
+ if version.endswith('+'):
+ version += time.strftime('%Y%m%d')
+ return version
-except OSError, e:
- print "warning: could not establish Mercurial version: %s" % e
+version = getversion()
+if version:
+ f = file("mercurial/__version__.py", "w")
+ f.write('# this file is autogenerated by setup.py\n')
+ f.write('version = "%s"\n' % version)
+ f.close()
+else:
version = "unknown"
-f = file("mercurial/__version__.py", "w")
-f.write('# this file is autogenerated by setup.py\n')
-f.write('version = "%s"\n' % version)
-f.close()
-
class install_package_data(install_data):
def finalize_options(self):
self.set_undefined_options('install',
diff -r 794def2fe232 -r 2444285ec338 tests/test-identify
--- a/tests/test-identify Sat Mar 07 20:16:03 2009 +0100
+++ b/tests/test-identify Mon Mar 09 11:41:38 2009 -0500
@@ -1,5 +1,7 @@
#!/bin/sh
+"$TESTDIR/hghave" no-outer-repo || exit 80
+
echo % no repo
hg id