Commit Graph

894 Commits

Author SHA1 Message Date
mason@suse.com
914365e493 Add searching for named branches
named branching is when you identify a head by a tag on an earlier revision.
This patch adds repo.branchlookup for searching through the tree to
find branch tags for heads.

hg update -b tag is added to checkout based on branch tags
hg heads -b is added to print the tag associated with each head
2005-08-14 12:23:45 -08:00
mpm@selenic.com
979a3bb825 Fix bug with empty inc and exc
This fixes an exception that showed up when importing patches
2005-08-14 12:23:36 -08:00
mpm@selenic.com
aeee958e99 Merge with BOS 2005-08-13 19:43:42 -08:00
Bryan O'Sullivan
32c2544401 Merge walk changes with Matt's tip. 2005-08-13 15:26:32 -08:00
Bryan O'Sullivan
1486c1162f Merge with TAH. 2005-08-13 15:23:06 -08:00
Bryan O'Sullivan
4c4b1718e8 Turn off testing of absolute paths for now.
I don't know how to stop this from always reporting false errors, and am
too lazy to worry about it right now.
2005-08-13 15:13:37 -08:00
Bryan O'Sullivan
0b40afa588 Fix bug involving "hg debugwalk -Ipattern" from repository root. 2005-08-13 15:09:37 -08:00
Bryan O'Sullivan
de43775de3 Fix clone when target directory is relative. 2005-08-13 14:41:51 -08:00
tksoh@users.sourceforge.net
57e34bb4fd Allow Mercurial to build on HP-UX 11
Temporary fix to allow Mercurial to build on HP-UX 11, as the C
compiler on HP-UX 11 doesn't support 'inline' qualifier. The
'__inline' qualifier seemed to be supported, but not without
first resolving other associated issues.
2005-08-13 12:41:00 -08:00
mpm@selenic.com
505146283c Merge with TAH 2005-08-12 23:54:09 -08:00
Bryan O'Sullivan
2f1759b049 Merge walk fixes. 2005-08-12 16:12:09 -08:00
Bryan O'Sullivan
2178d73055 Add unit tests for walk code. 2005-08-12 16:10:09 -08:00
Bryan O'Sullivan
3891eab8ea Fix up handling of regexp paths. 2005-08-12 16:09:17 -08:00
Bryan O'Sullivan
99ffa98cb9 Merge Windows path fixes. 2005-08-12 15:10:09 -08:00
Bryan O'Sullivan
dcc0f582eb Fix walk path handling on Windows 2005-08-12 15:06:52 -08:00
Bryan O'Sullivan
83b646d4ce Merge latest round of walk fixes. 2005-08-12 11:18:41 -08:00
Bryan O'Sullivan
52caea4f69 Fix walk code for files that do not exist anywhere, and unhandled types.
Prior to this, a file that did not exist was reported as showing up in
the filesystem, as were files of unsupported types (such as fifos).

Now, an error message is printed and nothing is returned in such cases.

This change also moves the commands.pathto function to the util module,
as the walk code needs it to print non-confusing error messages.
2005-08-12 11:16:58 -08:00
Bryan O'Sullivan
d1b93bbe7b Merge patchbomb script. 2005-08-12 10:17:12 -08:00
Bryan O'Sullivan
cb2f971be2 Merge Chris's changes with mine. 2005-08-12 09:58:35 -08:00
mason@suse.com
514597380d addremove was not correctly finding removed files when given
a list of files to look at.  These end up with a src of 'f' from
walk() but no longer exist on the filesystem.

Index: mine/mercurial/commands.py
===================================================================
2005-08-12 09:57:59 -08:00
mason@suse.com
3ef03288de dirstate walking optimizations
The repo walking code introduces a number of calls to dirstate.map.copy(),
significantly slowing down the walk on large trees.  When a list of
files is passed to the walking code, we should only look at map entries
relevant to the file list passed in.

dirstate.filterfiles() is added to return a subset of the dirstate map.
The subset includes in files passed in, and if one of the files requested
is actually a directory, it includes any files inside that directory tree.

This brings the time for hg diff Makefile down from 1.7s to .3s on
a linux kernel repo.

Also, the diff command was unconditionally calling makewalk, leading
to an extra pass through repo.changes.  This patch avoids the call
to makewalk when commands.diff isn't given a list of patterns, cutting
the time for hg diff (with no args) in half.

Index: mine/mercurial/hg.py
===================================================================
2005-08-12 09:57:56 -08:00
Bryan O'Sullivan
25693460a9 Polish patchbomb script.
diffstat output is now a non-default option.

The hgrc file can now contain default information for the patchbomb
script.

Date generation is fixed.
2005-08-12 08:04:31 -08:00
Bryan O'Sullivan
8a94cac17b Update to tip. 2005-08-12 07:42:32 -08:00
mason@suse.com
5bb002b605 addremove was not correctly finding removed files when given
a list of files to look at.  These end up with a src of 'f' from
walk() but no longer exist on the filesystem.

Index: mine/mercurial/commands.py
===================================================================
2005-08-12 07:12:08 -08:00
mason@suse.com
b44281b503 dirstate walking optimizations
The repo walking code introduces a number of calls to dirstate.map.copy(),
significantly slowing down the walk on large trees.  When a list of
files is passed to the walking code, we should only look at map entries
relevant to the file list passed in.

dirstate.filterfiles() is added to return a subset of the dirstate map.
The subset includes in files passed in, and if one of the files requested
is actually a directory, it includes any files inside that directory tree.

This brings the time for hg diff Makefile down from 1.7s to .3s on
a linux kernel repo.

Also, the diff command was unconditionally calling makewalk, leading
to an extra pass through repo.changes.  This patch avoids the call
to makewalk when commands.diff isn't given a list of patterns, cutting
the time for hg diff (with no args) in half.

Index: mine/mercurial/hg.py
===================================================================
2005-08-12 07:10:21 -08:00
Bryan O'Sullivan
918ab8086f Merge IPv6 fix. 2005-08-10 12:36:34 -08:00
Bryan O'Sullivan
6d86d89086 Fix problem with "hg serve" on systems not providing IPv6. 2005-08-10 12:35:25 -08:00
Thomas Arendsen Hein
0fcb836019 Cleanup after previous changes:
- there are only two states for the exec bit, so no need to override it.
- file_ variable is only once now, so it self.file(f) can be used directly.
2005-08-10 08:41:23 +01:00
Thomas Arendsen Hein
4c34f07491 Extended test case to test dirstate length bug fixed in 2abe02c00cbd. 2005-08-10 08:23:42 +01:00
Thomas Arendsen Hein
6ab968eb5c Use length of file instead of length of change for the dirstate entry. 2005-08-10 07:51:37 +01:00
Thomas Arendsen Hein
20e6210ce8 Fix 3-way-merge of original parent, workdir and new parent.
The dirstate has to match what is in the repository (what would be
checked out with 'hg update -C'), because the resulting file may be
identical to the new parent, or it may be completely different.
Previously the dirstate wasn't updated, so if you changed the file to
look like the original parent, it might be considered unmodified
relative to the new parent.
2005-08-10 06:47:46 +01:00
Bryan O'Sullivan
6dfde251c1 Get patchbomb script to not use MIME attachments.
Adding patches as attachments makes it difficult or impossible for some
mail clients to quote them effectively.
2005-08-09 20:53:50 -08:00
Bryan O'Sullivan
e9b1d4e478 Add patchbomb script. 2005-08-09 20:18:58 -08:00
Bryan O'Sullivan
3a382ee2e1 Merge with mpm. 2005-08-09 17:24:38 -08:00
Edouard Gomez
d27cf121e6 Trap OSError when deleting env vars
On the other OS, it seems that case insensitivity for
environment vars can bite users when using some unknown
combination of python 2.4.1 and win2kSP4+minsys (and
probably other vversions of these softwares).

The best way to avoid problems in those weird cases is to
ignore OSError exception during env var deletion.
2005-08-09 09:36:34 -08:00
Thomas Arendsen Hein
afee016a1d dirstate.changes() now distinguishes 'hg remove'd or just deleted files.
Interface is not yet changed.
Non-regular files are considered to be removed or deleted.
Removed the unneeded match(fn) call for adding to the unknown list.
2005-08-09 11:32:30 +01:00
Thomas Arendsen Hein
cbd221fceb Use correct term "closed interval" for ranges. 2005-08-09 11:15:57 +01:00
Jeff Sipek
aebe0b9925 [PATCH] Move default page name into map file
Move default page name from code into the map file. This way, different
hgweb styles/themes are free to select their default (no cmd in args)
page.
2005-08-08 19:49:48 -08:00
Jeff Sipek
37c3c833cd [PATCH] Propagate the template map though recursively
This patch allows propagates the template map though recursively
though all the templates.

This allows for some hgweb template cleanup patches as well as it makes
writing new skins/themes for hgweb much much easier. (I'm planing to
write several basic ones.)
2005-08-08 19:49:34 -08:00
Bryan O'Sullivan
75e6a5bd0e Teach walk code about absolute paths.
The first consequence of this is that absolute and relative paths now
all work in the same way.  The second is that paths that lie outside
the repository now cause an error to be reported, instead of something
arbitrary and expensive being done.

Internally, all of the serious work is in the util package.  The new
canonpath function takes an arbitrary path and either returns a
canonical path or raises an error.  Because it needs to know where the
repository root is, it must be fed a repository or dirstate object, which
has given commands.matchpats and friends a new parameter to pass along.

The util.matcher function uses this to canonicalise globs and relative
path names.

Meanwhile, I've moved the Abort exception from commands to util, and
killed off the redundant util.CommandError exception.
2005-08-07 12:43:11 -08:00
Bryan O'Sullivan
315d7bf18a Kill dead function. 2005-08-07 11:09:21 -08:00
Bryan O'Sullivan
18c9152328 Fix debugwalk when there's nothing to walk. 2005-08-07 11:04:58 -08:00
Thomas Arendsen Hein
9d8a9110b0 Fixed encoding of directories ending in .d or .i:
One .d and .i was mixed up, and string replace method doesn't work in-place.
2005-08-07 17:41:13 +01:00
Thomas Arendsen Hein
484ad4ed41 Added Tristan Wibberley to contributors. 2005-08-06 21:59:22 +01:00
Tristan Wibberley
34dcd4a098 Fixed revlog.children.
It was comparing a node to a rev, then appending a rev onto the list
of children being constructed instead of a node.
2005-08-06 21:58:28 +01:00
Thomas Arendsen Hein
dbc75fd4ed Update TODO 2005-08-06 21:41:53 +01:00
Samuel Tardieu
3d42c01fa5 Allow HG patch to appear late in the input stream 2005-08-06 21:23:38 +01:00
Thomas Arendsen Hein
6bcc623cc3 Added Samuel Tardieu to contributors list. 2005-08-06 21:19:32 +01:00
Samuel Tardieu
61e2d27b5b Add temporary documentation files and profiling output to .hgignore 2005-08-06 21:18:21 +01:00
Thomas Arendsen Hein
57c1a9a890 Further help improvements:
Show command aliases in 'hg help something', unless in quiet mode.
Show short command description with 'hg help -q something'.
Show global options in verbose mode of command help.
State that Mercurial is a Distributed SCM.
2005-08-06 15:43:12 +01:00