Bryan O'Sullivan <bos@serpentine.com> [Fri, 16 Sep 2005 14:50:06 -0700] rev 1267
Fix diff command so it doesn't walk the dirstate unnecessarily.
mpm@selenic.com [Fri, 16 Sep 2005 14:01:03 -0700] rev 1266
Bryan O'Sullivan <bos@serpentine.com> [Fri, 16 Sep 2005 13:34:29 -0700] rev 1265
Update doc for ssh URL, describing path handling more clearly.
Thomas Arendsen Hein <thomas@intevation.de> [Fri, 16 Sep 2005 21:34:18 +0200] rev 1264
Generated new tcsh_completion with tcsh_completion_build.sh
Thomas Arendsen Hein <thomas@intevation.de> [Fri, 16 Sep 2005 21:31:31 +0200] rev 1263
Added new debug commands to bash_completion.
mpm@selenic.com [Fri, 16 Sep 2005 10:42:20 -0700] rev 1262
Add debugancestor command
mpm@selenic.com [Thu, 15 Sep 2005 14:06:58 -0500] rev 1261
test-hup: hgrc no longer created at init
mpm@selenic.com [Thu, 15 Sep 2005 14:05:48 -0500] rev 1260
hgweb: use ui:username rather than web:contact
This also removes the creation of .hg/hgrc with web:contact at init time.
mpm@selenic.com [Thu, 15 Sep 2005 03:00:10 -0500] rev 1259
Merge with BOS
mpm@selenic.com [Thu, 15 Sep 2005 02:59:16 -0500] rev 1258
Add file encoding/decoding support
Bryan O'Sullivan <bos@serpentine.com> [Thu, 15 Sep 2005 00:04:29 -0700] rev 1257
Clamp negative rev numbers at zero.
Prior to this change, trying to run "hg log -r -50:" in a repo with
less than 50 changes caused an error. Now that we clamp at zero: no
more error.
mpm@selenic.com [Thu, 15 Sep 2005 00:49:40 -0500] rev 1256
mark copy/rename as experimental in the docs
Bryan O'Sullivan <bos@serpentine.com> [Wed, 14 Sep 2005 22:32:12 -0700] rev 1255
Get all commands that operate on files to honour --verbose and --quiet.
Fix minor bug in remove command; the when-to-unlink logic was wonky.
Bryan O'Sullivan <bos@serpentine.com> [Wed, 14 Sep 2005 21:57:41 -0700] rev 1254
Switch cat command to use walk code.
The old syntax of "hg cat FILE REV" is now obsolete.
Use "hg cat -r REV FILE" instead, as for all other commands.
Bryan O'Sullivan <bos@serpentine.com> [Wed, 14 Sep 2005 16:34:22 -0700] rev 1253
Add rename/mv command.
This is the logical equivalent of copy and remove, and is in fact
implemented as such. It doesn't use the remove command directly.
Bryan O'Sullivan <bos@serpentine.com> [Wed, 14 Sep 2005 16:31:03 -0700] rev 1252
The copy tests don't need to invoke cp any longer.
Bryan O'Sullivan <bos@serpentine.com> [Wed, 14 Sep 2005 15:41:22 -0700] rev 1251
Fix lots of exception-related problems.
These have been around since the Big Code Split.
Bryan O'Sullivan <bos@serpentine.com> [Wed, 14 Sep 2005 14:39:46 -0700] rev 1250
Merge with MPM.
Bryan O'Sullivan <bos@serpentine.com> [Wed, 14 Sep 2005 14:29:02 -0700] rev 1249
Fix up copy command to behave more like regular "cp".
In addition to recording changes, copy now updates the working
directory.
Bryan O'Sullivan <bos@serpentine.com> [Wed, 14 Sep 2005 11:27:36 -0700] rev 1248
Merge with myself.
Bryan O'Sullivan <bos@serpentine.com> [Wed, 14 Sep 2005 10:50:03 -0700] rev 1247
Make remove command really unlink files.
Bryan O'Sullivan <bos@serpentine.com> [Fri, 09 Sep 2005 22:07:10 -0700] rev 1246
mercurial.el: implement hg-pull, and stub in hg-update.
Chris Mason <mason@suse.com> [Wed, 14 Sep 2005 15:50:31 -0500] rev 1245
Files not getting added appropiately
On Wed, 14 Sep 2005 15:15:13 -0400
Daniel Santa Cruz <byteshack@gmail.com> wrote:
> c:> hg debugstate
> a 666 0 09/14/05 15:11:44 a/aa\aa.a
> a 666 0 09/14/05 15:11:47 a/aa\aa.b <---- notice mixed
> slashes
>
> This all seems very confusing....
Please try this:
mpm@selenic.com [Wed, 14 Sep 2005 15:48:34 -0500] rev 1244
clone: fall back to pull if we can't lock the source repo
root@coffee.suse.com [Wed, 14 Sep 2005 13:14:20 -0500] rev 1243
Fix hgit revtree bug with stop revision handling
Mikael Berthe <mikael@lilotux.net> [Wed, 14 Sep 2005 12:35:10 -0500] rev 1242
Fix hg cat when the file cannot be found in the specified revision
Stephen Darnell [Wed, 14 Sep 2005 12:22:20 -0500] rev 1241
Add support for cloning with hardlinks on windows.
In order to use hardlinks, the win32file module is needed, and this is
present in ActivePython. If it isn't present, or hardlinks are not supported
on the underlying filesystem, a regular copy is used.
When using hardlinks the biggest benefit is probably the saving in space,
but cloning can be much quicker. For example cloning the Xen tree
(non trivial) without an update goes from about 95s to 15s.
Unix-like platforms should be unaffected, although should be more tolerant on
filesystems that don't support hard links.
(tweaked by mpm to deal with new copyfiles function)
--- hg.orig/mercurial/commands.py 2005-09-13 19:32:53.
000000000 -0500
+++ hg/mercurial/commands.py 2005-09-14 12:11:34.
000000000 -0500
@@ -620,10 +620,6 @@ def clone(ui, source, dest=None, **opts)
if other.dev() != -1:
abspath = os.path.abspath(source)
- copyfile = (os.stat(dest).st_dev == other.dev()
- and getattr(os, 'link', None) or shutil.copy2)
- if copyfile is not shutil.copy2:
- ui.note("cloning by hardlink\n")
# we use a lock here because if we race with commit, we can
# end up with extra data in the cloned revlogs that's not
@@ -638,7 +634,7 @@ def clone(ui, source, dest=None, **opts)
for f in files.split():
src = os.path.join(source, ".hg", f)
dst = os.path.join(dest, ".hg", f)
- util.copyfiles(src, dst, copyfile)
+ util.copyfiles(src, dst)
repo = hg.repository(ui, dest)
Index: hg/mercurial/util.py
===================================================================
--- hg.orig/mercurial/util.py 2005-09-08 00:15:25.
000000000 -0500
+++ hg/mercurial/util.py 2005-09-14 12:16:49.
000000000 -0500
@@ -12,7 +12,7 @@ platform-specific details from the core.
import os, errno
from demandload import *
-demandload(globals(), "re cStringIO")
+demandload(globals(), "re cStringIO shutil")
def binary(s):
"""return true if a string is binary data using diff's heuristic"""
@@ -217,17 +217,28 @@ def rename(src, dst):
os.unlink(dst)
os.rename(src, dst)
-def copyfiles(src, dst, copyfile):
- """Copy a directory tree, files are copied using 'copyfile'."""
+def copyfiles(src, dst, hardlink=None):
+ """Copy a directory tree using hardlinks if possible"""
+
+ if hardlink is None:
+ hardlink = (os.stat(src).st_dev ==
+ os.stat(os.path.dirname(dst)).st_dev)
if os.path.isdir(src):
os.mkdir(dst)
for name in os.listdir(src):
srcname = os.path.join(src, name)
dstname = os.path.join(dst, name)
- copyfiles(srcname, dstname, copyfile)
+ copyfiles(srcname, dstname, hardlink)
else:
- copyfile(src, dst)
+ if hardlink:
+ try:
+ os_link(src, dst)
+ except:
+ hardlink = False
+ shutil.copy2(src, dst)
+ else:
+ shutil.copy2(src, dst)
def opener(base):
"""
@@ -244,13 +255,13 @@ def opener(base):
if mode[0] != "r":
try:
- s = os.stat(f)
+ nlink = nlinks(f)
except OSError:
d = os.path.dirname(f)
if not os.path.isdir(d):
os.makedirs(d)
else:
- if s.st_nlink > 1:
+ if nlink > 1:
file(f + ".tmp", "wb").write(file(f, "rb").read())
rename(f+".tmp", f)
@@ -266,10 +277,41 @@ def _makelock_file(info, pathname):
def _readlock_file(pathname):
return file(pathname).read()
+def nlinks(pathname):
+ """Return number of hardlinks for the given file."""
+ return os.stat(pathname).st_nlink
+
+if hasattr(os, 'link'):
+ os_link = os.link
+else:
+ def os_link(src, dst):
+ raise OSError(0, "Hardlinks not supported")
+
# Platform specific variants
if os.name == 'nt':
nulldev = 'NUL:'
+ try: # ActivePython can create hard links using win32file module
+ import win32file
+
+ def os_link(src, dst): # NB will only succeed on NTFS
+ win32file.CreateHardLink(dst, src)
+
+ def nlinks(pathname):
+ """Return number of hardlinks for the given file."""
+ try:
+ fh = win32file.CreateFile(pathname,
+ win32file.GENERIC_READ, win32file.FILE_SHARE_READ,
+ None, win32file.OPEN_EXISTING, 0, None)
+ res = win32file.GetFileInformationByHandle(fh)
+ fh.Close()
+ return res[7]
+ except:
+ return os.stat(pathname).st_nlink
+
+ except ImportError:
+ pass
+
def is_exec(f, last):
return last
mason@suse.com [Tue, 13 Sep 2005 19:33:18 -0500] rev 1240
Convert hgk to use the hgit extension, and upate to the latest gitk
mason@suse.com [Tue, 13 Sep 2005 19:33:10 -0500] rev 1239
Turn hgit into an extension, and add commands supporting the latest gitk
mason@suse.com [Tue, 13 Sep 2005 19:32:53 -0500] rev 1238
Add log -b to show the branch a specific revision lives in
This can be somewhat slow on very large repositories, so I didn't want
to include it in -v
--- hg.orig/mercurial/commands.py 2005-09-13 14:21:57.
000000000 -0500
+++ hg/mercurial/commands.py 2005-09-13 18:55:52.
000000000 -0500
@@ -1161,7 +1161,10 @@ def log(ui, repo, *pats, **opts):
du = dui(ui)
elif st == 'add':
du.bump(rev)
- show_changeset(du, repo, rev)
+ br = None
+ if opts['branch']:
+ br = repo.branchlookup([repo.changelog.node(rev)])
+ show_changeset(du, repo, rev, brinfo=br)
if opts['patch']:
changenode = repo.changelog.node(rev)
prev, other = repo.changelog.parents(changenode)
@@ -1743,6 +1746,7 @@ table = {
(log,
[('I', 'include', [], 'include path in search'),
('X', 'exclude', [], 'exclude path from search'),
+ ('b', 'branch', None, 'show branches'),
('r', 'rev', [], 'revision'),
('p', 'patch', None, 'show patch')],
'hg log [-I] [-X] [-r REV]... [-p] [FILE]'),
mason@suse.com [Tue, 13 Sep 2005 19:32:43 -0500] rev 1237
Fix off by one in convert-repo tags
--- crew.orig/contrib/convert-repo 2005-07-16 11:52:06.
000000000 -0400
+++ crew/contrib/convert-repo 2005-09-02 02:58:14.
000000000 -0400
@@ -86,9 +86,7 @@ class convert_git:
for f in os.listdir(self.path + "/.git/refs/tags"):
try:
h = file(self.path + "/.git/refs/tags/" + f).read().strip()
- p, a, d, m = self.getcommit(h)
- if not p: p = [h] # git is ugly, don't blame me
- tags[f] = p[0]
+ tags[f] = h
except:
pass
return tags
--
_______________________________________________
Mercurial mailing list
Mercurial@selenic.com
http://selenic.com/mailman/listinfo/mercurial
mpm@selenic.com [Tue, 13 Sep 2005 18:38:27 -0500] rev 1236
Fix bug with co -C across branches, update tests
mpm@selenic.com [Tue, 13 Sep 2005 14:23:43 -0500] rev 1235
Fix test-tag output for new abort message
mpm@selenic.com [Tue, 13 Sep 2005 14:22:48 -0500] rev 1234
Revert unrelated changes in previous commit
mpm@selenic.com [Tue, 13 Sep 2005 14:18:18 -0500] rev 1233
Fix abort message for clone
mpm@selenic.com [Tue, 13 Sep 2005 14:16:15 -0500] rev 1232
Revert some exception type changes in revlog
mpm@selenic.com [Fri, 09 Sep 2005 12:19:24 -0700] rev 1231
CONTRIBUTORS update
mpm@selenic.com [Fri, 09 Sep 2005 12:17:51 -0700] rev 1230
dirstate: two more stat -> lstat changes
mpm@selenic.com [Fri, 09 Sep 2005 11:47:13 -0700] rev 1229
Fix comment typo
mpm@selenic.com [Fri, 09 Sep 2005 11:46:35 -0700] rev 1228
Fix dangling symlink bug in dirstate walk code
Bryan O'Sullivan <bos@serpentine.com> [Fri, 09 Sep 2005 11:34:34 -0700] rev 1227
Replace sequences of {ui.warn, return 1} with raise of util.Abort.
Bryan O'Sullivan <bos@serpentine.com> [Fri, 09 Sep 2005 10:59:05 -0700] rev 1226
patchbomb: add TLS and SMTP AUTH support.
Original patch from Lee Cantey <lcantey@gmail.com>.
mpm@selenic.com [Thu, 08 Sep 2005 17:09:31 -0700] rev 1225
Add --debugger global option
With this option, hg will drop into the Python debugger on execution.
Running 'continue' will execute normally, and the debugger will be
reinvoked if an exception is raised.
mpm@selenic.com [Thu, 08 Sep 2005 15:01:33 -0700] rev 1224
Fix Windows status problem from new dirstate walk code
mpm@selenic.com [Thu, 08 Sep 2005 12:17:24 -0700] rev 1223
Update test-help for bundle/unbundle
mpm@selenic.com [Thu, 08 Sep 2005 12:16:31 -0700] rev 1222
Fix missing docstring for unbundle
TK Soh <teekaysoh@yahoo.com> [Thu, 08 Sep 2005 12:10:59 -0700] rev 1221
clone: directory names take precedence over symbolic names
If source matches both a directory name and a symbolic
name to repo, the directory will be taken.
mpm@selenic.com [Thu, 08 Sep 2005 12:10:43 -0700] rev 1220
import: fix bug in mail-format detection
mpm@selenic.com [Thu, 08 Sep 2005 10:49:33 -0700] rev 1219
hgweb: fix scope for RepoError
mpm@selenic.com [Thu, 08 Sep 2005 01:27:25 -0700] rev 1218
Add preliminary support for the bundle and unbundle commands
mpm@selenic.com [Thu, 08 Sep 2005 00:13:52 -0700] rev 1217
Add missing import for hgwebdir
Thomas Arendsen Hein <thomas@intevation.de> [Thu, 08 Sep 2005 09:11:17 +0200] rev 1216
Cleanup of tabs and trailing spaces in documentation.
mpm@selenic.com [Wed, 07 Sep 2005 23:57:59 -0700] rev 1215
Add reporting instructions to unknown exception backtraces
mpm@selenic.com [Wed, 07 Sep 2005 23:38:28 -0700] rev 1214
Smarter handling of revlog key errors
Use RevlogError for reporting exceptions
Catch and report RevlogError exceptions at the command parser
mpm@selenic.com [Wed, 07 Sep 2005 23:13:12 -0700] rev 1213
Clean up hgweb imports
Use demandloading
Pull function-local imports up to demandload
Scope hg and ui bits
mpm@selenic.com [Wed, 07 Sep 2005 20:50:23 -0700] rev 1212
Change grep -e to grep --all
We want to reserve -e for future use and grep compatibility.
I've changed every-match to all out of a general preference for
shorter long option names where short options don't exist.