Commit Graph

821 Commits

Author SHA1 Message Date
Samuel Tardieu
5422ec903a Add an option to hg serve to serve file using IPv6 2005-08-04 13:21:27 -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
mpm@selenic.com
c29a4a3c68 add note about -C to update message 2005-07-30 08:30:12 -08:00
Bryan O'Sullivan
e6c1da7c61 Adapt commit to use file matching code.
The code is slightly complicated by the need to commit all outstanding
changes in the repository if no file names are given (other commands
operate on the current directory and its subdirectories in this case).

localrepository.changes has acquired an optional match parameter, to let
it filter out include/exclude options.
2005-07-29 15:02:27 -08:00
Thomas Arendsen Hein
76ff6f8cc4 Include tests (or possibly maps) ending in numbers in MANIFEST, too. 2005-07-29 22:31:45 +01:00
Thomas Arendsen Hein
91c996890d Add Makefile from doc directory instead of / to MANIFEST. 2005-07-29 22:10:36 +01:00
Thomas Arendsen Hein
16f460b91e Drop .err files generated by failed tests from the MANIFEST. 2005-07-29 22:07:42 +01:00
Thomas Arendsen Hein
628c0e8328 Incorporated most of Aron Griffis suggestions for sh compatibility. 2005-07-29 21:50:05 +01:00
Thomas Arendsen Hein
e657eff113 Use tabs instead of spaces where apropriate. 2005-07-29 21:34:41 +01:00
Bryan O'Sullivan
4d6bf4b62a Reduce the amount of stat traffic generated by a walk.
When we switched to the new walk code for commands, we no longer passed a
list of specific files to the repo or dirstate walk or changes methods.
This meant that we always walked and attempted to match everything,
which was not efficient.

Now, if we are given any patterns to match, or nothing at all, we still
walk everything.  But if we are given only file names that contain no
glob characters, we only walk those.
2005-07-29 12:30:12 -08:00
Bryan O'Sullivan
6ed9c3aea0 Fix documentation of -I and -X options.
These options apply to all names, not just to directories.  In other
words, you can do something like this:

  hg add -X 'f*' '*.c'

and it will have the effect of "add all files matching *.c, except those
starting with f".
2005-07-29 08:51:42 -08:00
Bryan O'Sullivan
56cb6cecf2 Move commands.forget over to using new walk code.
With no names, it now recursively forgets everything, as is the default
behaviour of other commands.  And prints the names of all files it
hasn't specifically been told to forget.
2005-07-29 08:49:01 -08:00
Bryan O'Sullivan
cc5f100120 Fix performance regression in addremove command.
When I rewrote addremove, I lazily put a call to repo.changes in,
which was unnecessary and slow.  This is a new rewrite, preserving the
file name behaviour, but replacing the call to repo.changes with a walk,
which is much cheaper, and avoids calls to os.stat on all but files that
have probably been deleted.
2005-07-29 08:42:28 -08:00
Thomas Arendsen Hein
572911a6fd Allow tests for not yet fixed bugs to fail without generating error diff. 2005-07-29 15:59:10 +01:00
Thomas Arendsen Hein
87aabef405 Updated output of tests. 2005-07-29 15:21:02 +01:00
Thomas Arendsen Hein
f9e80dc2e8 Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
Thomas Arendsen Hein
af87435bc2 Adapted README to new needs. 2005-07-29 15:11:34 +01:00
Thomas Arendsen Hein
1723379c48 Make tests work on Solaris:
- replacement for mktemp
- fall back if shell arithmetic doesn't work
- replacement for 'set -x' (which results look different with some shells)
- "FOO=bar; export FOO" instead of "export FOO=bar"
- don't use 'if ! ...'
2005-07-29 15:11:05 +01:00
Thomas Arendsen Hein
7d49950ea1 Remove "export FOO=bar" bashism. 2005-07-29 14:54:36 +01:00
Thomas Arendsen Hein
5f67aa274a Replaced mktemp and usage of ${par:=word}. 2005-07-29 14:52:45 +01:00
Thomas Arendsen Hein
79e79d89bb Remove usage of ${par:-word}, which and mktemp. Quote filenames. 2005-07-29 14:51:41 +01:00
Thomas Arendsen Hein
e4d1a01f40 Ignore test error files, protect dot in .pc/ 2005-07-29 14:49:04 +01:00
Thomas Arendsen Hein
d3b77c0789 Merge with upstream 2005-07-29 06:43:21 +01:00
mpm@selenic.com
0411b81b0a Drop -t option from mktemp 2005-07-28 07:46:08 -08:00
mpm@selenic.com
04d7166797 Fix the directory and revlog collision problem
This adds escaping for directory names so that directory foo.i doesn't
collide with the revision data for file foo.
2005-07-27 18:50:32 -08:00
mpm@selenic.com
e4d910ab82 Fix undo after aborted commit bug
Commit would overwrite undo.dirstate unconditionally, so an undo after
an aborted commit would restore the dirstate from the aborted commit
and not the prior transaction.

This copies dirstate to journal.dirstate and moves it after a
successful transaction.
2005-07-27 18:16:20 -08:00
mpm@selenic.com
e77f03935e Fix tests for short changeset hashes and hidden manifest hashes 2005-07-27 10:21:19 -08:00
Stephen Darnell
b957313b12 Add a --time command line option to time hg commands 2005-07-27 10:18:44 -08:00
thananck@yahoo.com
b2ea3f96f3 Provided platform dependent implementations for explain_exit
os.system return code is system dependent.
2005-07-27 10:18:22 -08:00
mpm@selenic.com
6b8940724b Fix copy in subdirectories
Spotted by Chad Netzer
2005-07-27 10:05:12 -08:00
mpm@selenic.com
185e6a4945 Add changegroup hook for push/pull 2005-07-27 09:07:28 -08:00
TK Soh
cc943b9a88 Add paths command
The following patch adds the 'paths' commands to show a named path, or list of
available paths. In case anyone find it useful.
2005-07-27 08:19:59 -08:00
mpm@selenic.com
44898730bf Shorten hashes displayed in log 2005-07-27 08:14:52 -08:00
mpm@selenic.com
f5f3b18058 Wrap RSS description in CDATA
Problem spotted by Ollivier Robert
2005-07-27 07:35:36 -08:00
mpm@selenic.com
51f030dcd8 Add template to mktemp call
Based on a patch from Soh Tk-r28629
2005-07-26 19:27:05 -08:00
mpm@selenic.com
907e714bb6 Fix up test results
No more errnos
diff | sed changes
.out message ok
2005-07-26 19:23:59 -08:00
mpm@selenic.com
12c5645638 Change sed patterns in tests to strip dates after spaces or tabs 2005-07-26 19:03:45 -08:00
mpm@selenic.com
50f9864860 Hide errno in abort messages 2005-07-26 21:52:40 -05:00
mpm@selenic.com
3823d6eace Make pull count jargon less confusing
revisions are now synonymous with changesets, and not file changes
2005-07-25 12:02:29 -05:00