[PATCH][TRIVIAL] Default user in the 'other' OS
Matt Mackall
mpm at selenic.com
Tue Jun 28 10:30:29 UTC 2005
On Tue, Jun 28, 2005 at 11:11:54AM +0200, Giuseppe Bilotta wrote:
> The attached patch adds a lookup on the USERNAME environment variable
> which is set to the current user logged in on Windows NT (2000, XP)
> boxes.
>
> --- mercurial/hg.py.20050628 Tue Jun 28 11:03:14 2005
> +++ mercurial/hg.py Tue Jun 28 11:09:13 2005
> @@ -164,6 +164,7 @@
> user = (user or
> os.environ.get("HGUSER") or
> os.environ.get("EMAIL") or
> + os.environ.get("USERNAME") or
> os.environ.get("LOGNAME", "unknown") + '@' + socket.getfqdn())
> date = date or "%d %d" % (time.time(), time.timezone)
> list.sort()
We want to keep the hostname, so I did this slightly differently.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list