Commit Graph

858 Commits

Author SHA1 Message Date
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
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
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
Thomas Arendsen Hein
d9912ec66d Always show short help when an unknown command is given. 2005-08-06 14:04:59 +01:00
kreijack@inwind.REMOVEME.it
208c8b8f44 Update the TODO file to the help changes, and the output of test-help. 2005-08-06 13:33:14 +01:00
kreijack@inwind.REMOVEME.it
a9e149a318 When hg is invoked without parameters, the short list help is displayed.
When hg is executed without parameters ( or hg is executed with the
'help shortlist' command ) the short help list is displayed.
If the 'help' command is passed on the commandline the full help list
is displayed.
In both the cases if the switch '-v' is passed, the help contains also
the aliases of the short/full commands list and the global switches.
2005-08-06 13:27:31 +01:00
kreijack@inwind.REMOVEME.it
d95f67a4b0 More verbose information on the global options 2005-08-06 13:27:31 +01:00
kreijack@inwind.REMOVEME.it
dbb0ab4160 'hg help -v' mentions the alias of the commands 2005-08-06 13:27:31 +01:00
kreijack@inwind.REMOVEME.it
770fb8a63d 'hg help -v' shows global options 2005-08-06 13:27:31 +01:00
Thomas Arendsen Hein
08a1b66c1d Rewritten change type selection for hg status. 2005-08-06 12:05:09 +01:00
Thomas Arendsen Hein
9137b0ce4a Realigned command table again. 2005-08-06 07:16:37 +01:00
tksoh@users.sourceforge.net
434ce67bf6 hg status: added options to select files by status.
Added options -m, -a, -r and u to select files corresponding
to status M, A, R and ? respectively. If none of these
options are specified, files of all status will be shown.
2005-08-06 07:09:10 +01:00
mpm@selenic.com
be7d339756 Merge with BOS 2005-08-04 13:31:25 -08:00
mpm@selenic.com
c2d5a7769c Merge with TAH 2005-08-04 13:27:41 -08:00
Wallace, Eric S
ac33b6df10 Fix array overflow bug in bdiff
I ran into a bug while importing a large repository into mercurial.
The diff algorithm does not allocate a big enough array of hunks
for some test cases. This results in memory corruption, and possibly,
as in my case, a seg fault.

You should be able to reproduce this problem with any case of more
than a few lines that follows this pattern:

a  b
=  =
1  1
   2
2  3
   4
3  5
   .
4  .
   .
5
.
.
.

I.e., "a" has blank lines on every other line that have been removed in
"b". In this case, the number of matching hunks is equal to the number
of lines in "b". This is more than ((an + bn)/4 + 2). I'm not sure what
motivates this formula, but when I changed it to the smaller of an or
bn (+ 1), it works.

[comment added by mpm]
2005-08-04 13:25:59 -08:00
Kyle Moffett
4a58ee908b Allow import from files with spaces
Index: hg/mercurial/commands.py
===================================================================
2005-08-04 13:22:36 -08:00
Samuel Tardieu
5422ec903a Add an option to hg serve to serve file using IPv6 2005-08-04 13:21:27 -08:00
Thomas Arendsen Hein
ffed02031c Cleaned up trap handling in run-tests, too. 2005-08-04 18:23:07 +01:00
Thomas Arendsen Hein
bc7eba33da Use sh instead of bash in tests. 2005-08-04 18:20:40 +01:00
Thomas Arendsen Hein
264aecc43e Removed special FIXME handling in run-tests, added bug info to .out files. 2005-08-04 18:13:17 +01:00
Thomas Arendsen Hein
081258c314 Handle broken pipe on pressing Ctrl-C with e.g. 'hg log|grep something'. 2005-08-04 18:06:49 +01:00
Thomas Arendsen Hein
a40b8a51f1 Cleaned up trap handling:
- Use numbers instead of signal names
- No need to explicitly call "cleanup_exit RC" to exit with return code RC.
2005-08-04 17:43:05 +01:00
Thomas Arendsen Hein
8076915aa6 If rejects are empty after using the editor, merge with diff+patch was ok. 2005-08-04 17:23:31 +01:00
Thomas Arendsen Hein
6f8f8feeba Shortened hgmerge a little bit. 2005-08-04 17:16:41 +01:00
Thomas Arendsen Hein
4bfe4b7759 Hide error message of type command. 2005-08-04 16:56:44 +01:00
Bryan O'Sullivan
f83e56bf58 Merge with Matt. 2005-08-04 05:14:59 -08:00
Bryan O'Sullivan
443fbd739c Fix performance of hg diff.
commands.walk has been refactored.  commands.walk's behaviour remains as
it was, but there is a new function, commands.makewalk.  This returns
results that can be passed along to other internal code, in our case
dodiff.
2005-08-03 09:10:48 -08:00
mpm@selenic.com
9161f5c8e4 Merge with BOS 2005-08-02 08:57:32 -08:00
mpm@selenic.com
e29716deb4 Actually implement the -f switch for push 2005-08-01 23:34:23 -08:00
mpm@selenic.com
c0f58ac983 Make ssh URL parsing more robust 2005-08-01 23:23:51 -08:00
mpm@selenic.com
7c0d9a3cf7 Warn on pushing unsynced repo or adding new heads
By popular demand
2005-08-01 23:17:22 -08:00
Thomas Arendsen Hein
2616a4e21f Use list comprehension in hg status. 2005-08-01 17:58:13 +01:00
Bryan O'Sullivan
a159000a3d Attempt to yield names in sorted order when walking.
This is an improvement in behaviour, but the walk and changes code still
has some flaws that make sorted name presentation difficult:

- changes returns tuples of names, instead of a sorted list of (name,
  status) pairs.

- walk yields deleted names after all others.
2005-07-31 18:03:46 -08:00
Bryan O'Sullivan
25438a68e9 Ensure that dirstate.walk only yields names once.
Its predecessor code used to do this, and now it does, too.
2005-07-31 17:54:00 -08:00
Bryan O'Sullivan
2f2a31ce76 Clean up walk and changes code to use normalised names properly.
New function: commands.pathto returns the relative path from one path
to another.  For example, given foo/bar and baz/quux, it will return
../../baz/quux.  This new function is used by the walk and status code
to print relative paths correctly.

New command: debugwalk exercises the walk code without doing anything
more.

hg.dirstate.walk now yields normalised names.  For example, if you're
in the baz directory and you ask it to walk ../foo/bar/.., it will yield
names starting with foo/.

As a result of this change, all of the other walk and changes methods
in this module also return normalised names.

The util.matcher function now normalises globs and path names, so that
it will match normalised names properly.

Finally, util.matcher uses the non-glob prefix of a glob to tell walk
which directories to scan.  Perviously, a glob like foo/* would scan
everything, but only return matches for foo/*.  Now, foo/* only scans
under foo (using the globprefix function), which is much faster.
2005-07-31 17:42:46 -08:00
Bryan O'Sullivan
3b80c866a0 Update output for test-merge5. 2005-07-31 17:31:15 -08:00
mpm@selenic.com
768ed5f6f9 Psyco was failing to call dirstate.__del__ for import
Remove it.
2005-07-30 09:01:59 -08:00
mpm@selenic.com
b90578da57 Merge with BOS 2005-07-30 09:00:14 -08:00
mpm@selenic.com
666129a0b4 Merge with TAH 2005-07-30 08:35:29 -08:00