diff mercurial/commands.py @ 7632:9626819b2e3d

refactor version code - simplify version detection code - move detection code into setup.py - move version reading function into util.py - drop version.py code This makes hg more closely follow its own recommendation of how to deal with versioning your builds: use hg id in your build script.
author Matt Mackall <mpm@selenic.com>
date Sat, 10 Jan 2009 18:02:38 -0600
parents 9c6ae2e09e11
children 08cabecfa8a8
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Jan 13 23:17:19 2009 +0100
+++ b/mercurial/commands.py	Sat Jan 10 18:02:38 2009 -0600
@@ -11,7 +11,6 @@
 import os, re, sys
 import hg, util, revlog, bundlerepo, extensions, copies, context
 import difflib, patch, time, help, mdiff, tempfile, url
-import version
 import archival, changegroup, cmdutil, hgweb.server, sshserver, hbisect
 import merge as merge_
 
@@ -2961,7 +2960,7 @@
 def version_(ui):
     """output version and copyright information"""
     ui.write(_("Mercurial Distributed SCM (version %s)\n")
-             % version.get_version())
+             % util.version())
     ui.status(_(
         "\nCopyright (C) 2005-2008 Matt Mackall <mpm@selenic.com> and others\n"
         "This is free software; see the source for copying conditions. "