Commit Graph

740 Commits

Author SHA1 Message Date
mpm@selenic.com
211f1e3677 hgweb: add [web] section to hgrc
This makes almost all of the hgweb settings available in hgrc.
2005-08-17 17:57:37 -08:00
mpm@selenic.com
26b61451d6 Whitespace 2005-08-17 16:37:04 -08:00
mpm@selenic.com
8fd52eb092 Fix path handling for deleting files on merge 2005-08-17 00:36:36 -08:00
tksoh@users.sf.net
564f653a74 Fixed --repository option when handling relative path
When specifying relative path to --repository option, 'log' and
'diff' were unable to find the files specified. Here's the fix.
2005-08-17 00:33:53 -08:00
mpm@selenic.com
aa0aad3e1a Fix incoming for empty set 2005-08-16 22:47:49 -08:00
mpm@selenic.com
6a1eb4d99f hg incoming/outgoing: fix tests and update man page 2005-08-16 19:27:46 -08:00
mpm@selenic.com
6cfb06746f Add hg incoming command for local repositories 2005-08-16 19:17:16 -08:00
mpm@selenic.com
4eed373ac4 Add a local() method to repository classes 2005-08-16 19:17:01 -08:00
TK Soh
1e0fd1d4ba updated help text and added manpage section for hg paths
Index: hg/doc/hg.1.txt
===================================================================
2005-08-16 17:30:41 -08:00
mpm@selenic.com
5bcea47997 Add basic https support for pull 2005-08-16 17:12:25 -08:00
mpm@selenic.com
ef0df55b06 show_changeset: -q shows short hash 2005-08-16 15:50:42 -08:00
mpm@selenic.com
39f134ded6 Add hg outgoing command 2005-08-16 15:49:26 -08:00
mpm@selenic.com
8ff3edc761 whitespace cleanup 2005-08-16 15:30:26 -08:00
mpm@selenic.com
bc91e62ffa hg cat: accept changeset hashes 2005-08-16 15:22:44 -08:00
mpm@selenic.com
e7d0341a7b Fix hg clone race with writer
Most read operations in hg don't need locks because we order reads and
writes for consistency. Clone is an exception to this as we're copying
entire file histories and could end up with more file history copied
than we have commits.

For now, make clone take a lock on the source repo. Non-hardlinked
clone should eventually be changed to use lockless pull.
2005-08-16 14:53:47 -08:00
mpm@selenic.com
2616af791c Let hg paths work outside of repositories 2005-08-16 13:52:28 -08:00
TK Soh
c394d69d93 typo fix in command help text
This patch fixes a few typo errors on the command help output
(I am not sure if the change on 'diff' is the best though).
2005-08-16 10:42:30 -08:00
mark.williamson@cl.cam.ac.uk
37633695b1 Minor tweak: os.STOPSIG -> os.WSTOPSIG. Pychecker spotted this one. 2005-08-15 11:46:41 -08:00
Thomas Arendsen Hein
6abcd01c6a Fix .hgignore parsing if last line has no EOL, ignore trailing white space.
(and don't use tabs in python code)
2005-08-15 08:08:11 +01:00
Bryan O'Sullivan
956772aca8 Modify init command to take an optional directory to set up.
If the directory does not exist, it is created.
If no directory is given, the current directory is used.
2005-08-14 21:33:09 -08:00
Thomas Arendsen Hein
21673adbf3 Update synopsis for 'hg update', too. 2005-08-15 06:18:49 +01:00
Thomas Arendsen Hein
122e907690 Update online help of hg heads for new --branches option. 2005-08-15 05:22:40 +01:00
mason@suse.com
038c62eda0 Add optional parameter for changed/added/del/unknown files to commands.dodiff
This makes it possible to avoid a call into repo.changes if the details
of what has changed is already known
2005-08-14 20:09:32 -08:00
mason@suse.com
5784da7ba8 Allow the changegroup generator to completely load the buffer.
This makes is possible to delete or truncate away revisions and still
use the changegroup later.
2005-08-14 20:09:21 -08:00
mason@suse.com
66f2574257 Add optional stop revision to revlog.heads 2005-08-14 20:09:09 -08:00
mason@suse.com
7c05a98feb Change repo.comit to return None on error or the new revision number on
success

This allows the caller to correctly record the new revision number
2005-08-14 20:09:01 -08:00
mason@suse.com
9e36a1edf3 Add force option to repo.commit, allowing commits where no files change 2005-08-14 20:08:35 -08:00
mark.williamson@cl.cam.ac.uk
5f670f62e0 Add '-' support to the commit logfile option to read message from stdin. 2005-08-14 12:30:01 -08:00
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
1486c1162f Merge with TAH. 2005-08-13 15:23:06 -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
3891eab8ea Fix up handling of regexp paths. 2005-08-12 16:09:17 -08:00
Bryan O'Sullivan
dcc0f582eb Fix walk path handling on Windows 2005-08-12 15:06:52 -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
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
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
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
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
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
Samuel Tardieu
3d42c01fa5 Allow HG patch to appear late in the input stream 2005-08-06 21:23:38 +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
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
081258c314 Handle broken pipe on pressing Ctrl-C with e.g. 'hg log|grep something'. 2005-08-04 18:06:49 +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
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
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
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
d3b77c0789 Merge with upstream 2005-07-29 06:43:21 +01: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
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
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
mpm@selenic.com
036be5ad14 Fixes for annotate
Handle files that aren't in the repo
Handle empty files
2005-07-23 14:11:49 -05:00
Thomas Arendsen Hein
cc635ee7b9 Show all dirstate info for 'hg debugstate'. 2005-07-23 17:11:29 +01:00
mpm@selenic.com
ace1cac10d Fix bug in exception handling for hardlink clone 2005-07-23 10:14:42 -05:00
mpm@selenic.com
9520e62074 Fix local file changes being ignored after non-branch merge
Bug introduced in 45dd84ebbed8
Spotted by TAH
2005-07-23 10:00:56 -05:00
Bryan O'Sullivan
afb14169de Get addremove to use new walk code.
It is now more verbose than it used to be.  If given file names, it
prints nothing, as before.  But if given patterns or nothing, it prints
the names of the files it is operating on, to remove that air of mystery.

It also now operates at or below the current directory.
2005-07-22 19:45:48 -08:00
mpm@selenic.com
f8e53b93db Hack to fix missing '/' problem in URLs 2005-07-22 20:07:14 -05:00
mpm@selenic.com
8e0881ad8a Don't mark files with 'm'erge unless we're actually merging branches
For 3-way merges, we were marking files as 'm', which should only be
used for branch merges. This was causing files to show up in 'hg
status' that aren't actually modified.
2005-07-22 19:23:00 -05:00
Thomas Arendsen Hein
ba5a4e2eff Added deprecation warnings if -t or --text is used for commits. 2005-07-22 16:27:30 +01:00
Thomas Arendsen Hein
aafc5792d1 Changed more occurances of 'text' to 'message'. 2005-07-22 16:26:46 +01:00
Andrew Thompson
1ecb4f2e16 Change all references to -t --text commit message to -m and --message. 2005-07-22 15:59:13 +01:00
Thomas Arendsen Hein
c476ddb6d6 There was an extra space after 'hg id' when there are no tags. 2005-07-22 08:58:16 +01:00
Thomas Arendsen Hein
8ba70bc4df Updated help strings and test-help:
- options -I/-X: always at the end, don't include them in the synopsis.
- NAME is optional for hg revert
- other small changes.
2005-07-22 08:47:35 +01:00
Thomas Arendsen Hein
4ac08580ae Show filenames for hg export in verbose mode on a separate lines.
This makes parsing by external tools much easier.
2005-07-22 07:42:47 +01:00
mpm@selenic.com
1f521ec7c5 Check protocol versions
This also allows the old unidentified protocol
2005-07-21 18:20:13 -05:00
mpm@selenic.com
e16b6ba2ce Simplify content type checking 2005-07-21 18:19:20 -05:00
Muli Ben-Yehuda
0bf14d0d7e When pulling from a non hg repository URL (e.g. http://www.kernel.org/hg)
you geta pretty obscure error (zlib: uknown compression type). The
attached patch modifies hgweb.py and hg.py to supply and check a
'Content-type: application/hg-0.1' HTTP header for the branches,
between and changegroup commands, so that we know it's a proper hg
repo before snarfing the input. Comments appreciated!
2005-07-21 18:18:43 -05:00
mpm@selenic.com
d1b02c9855 Add tag -t, deprecate tag -m
manifest hash: 893aa9732b500edfa6ffc099f76b00a88a5b1943
2005-07-21 15:29:35 -05:00
mpm@selenic.com
b558c4fe0c Add -m for rawcommit
manifest hash: cf066b609ab4854a731c103f1d456d89cf5e1312
2005-07-21 12:29:19 -05:00
mpm@selenic.com
1698a5cd7e Change C to M in status 2005-07-21 12:24:42 -05:00
mpm@selenic.com
0da7c8cf44 Add -m for commit and deprecate -t
Index: hg/doc/hg.1.txt
===================================================================
2005-07-21 12:23:55 -05:00
mpm@selenic.com
f37cae8945 Handle empty file list for annotate 2005-07-21 12:22:54 -05:00
mpm@selenic.com
de5db2bbb6 Remove ls command 2005-07-21 12:22:29 -05:00
mpm@selenic.com
88969029c3 Refactor matchpats and walk
Move core match function code to util
Add some comments and whitespace
Simplify options
Use lambdas instead of always and never
2005-07-21 12:21:33 -05:00
mpm@selenic.com
f70080b8c0 Fix some line wrapping
manifest hash: 43af5dafa55e01f89727096f4d6784317f3eb0d6
2005-07-20 20:11:23 -05:00
Bryan O'Sullivan
98efeab033 Split make_file back out into make_filename and make_file.
It turns out that make_filename is useful by itself.
2005-07-20 04:08:11 -08:00
Bryan O'Sullivan
197de447fb If the argument to make_file can act like a file, return it.
This is useful for code that calls command functions, but doesn't
want to send I/O through the filesystem.
2005-07-20 03:55:16 -08:00
Bryan O'Sullivan
6e8461ae49 Merge with Matt's tip. 2005-07-20 03:52:06 -08:00
Bryan O'Sullivan
bd62653aff Update tests to reflect walk changes. 2005-07-20 03:43:05 -08:00
Bryan O'Sullivan
89e035ebd1 An empty .hgignore file must cause us to ignore nothing, not everything! 2005-07-20 03:37:01 -08:00
Bryan O'Sullivan
790baed0b9 Convert annotate over to walk interface.
Add emptyok parameter to walk and matchpats, for commands that require
at least one name.
2005-07-20 03:23:12 -08:00
Bryan O'Sullivan
643472c556 Convert diff command over to using walk code. 2005-07-20 03:16:20 -08:00
Bryan O'Sullivan
ce7fede45a Add name matching to status command. 2005-07-20 03:01:23 -08:00
Bryan O'Sullivan
e5a5499cf6 Only walk over files that match our criteria. 2005-07-20 02:57:20 -08:00
Bryan O'Sullivan
0b81e3969d Turn make_filename into make_file, which returns a file handle. 2005-07-20 02:48:16 -08:00
mpm@selenic.com
59b4a46202 Fix verify error reporting bug
Spotted by Chris Mason

manifest hash: d5a6e5cb65d2de65a68d1f85c8692e79622844d3
2005-07-19 15:09:04 -05:00
Bryan O'Sullivan
161b15b929 Get commands to raise Abort instead of ui.warn(...),sys.exit(1). 2005-07-19 07:42:36 -08:00
Bryan O'Sullivan
fc2a7aae7c Add a source designator to the walk methods.
If the source is 'f' (the filesystem), the file definitely exists in
the filesystem.  If 'm' (a rev or dirstate manifest), the file may not
still exist with the given name.
2005-07-19 07:15:59 -08:00
Bryan O'Sullivan
b9dc9cad21 Merge with Matt's tip. 2005-07-19 07:00:03 -08:00
Bryan O'Sullivan
4e963737e8 Get add and locate to use new repo and dirstate walk code.
They use a walk function that abstracts out the irritating details, so
that there's a higher likelihood of commands behaving uniformly.
2005-07-18 06:54:21 -08:00
Bryan O'Sullivan
f3838c3254 Work on walk code. 2005-07-16 15:13:40 -08:00
Thomas Arendsen Hein
a7b90ec3c8 Make annotate use option --rev instead od --revision like other commands.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Make annotate use option --rev instead od --revision like other commands.

manifest hash: fe9c9cd9d42657f60d302b557f1f33640fd51199
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC2LAwW7P1GVgWeRoRAqYKAJ4tiLIVTRN0Ot6bjrEZRc9VFrk3zwCdGx/C
PhOGWMHVlNYGZxmdXridIc4=
=J7Cn
-----END PGP SIGNATURE-----
2005-07-16 07:58:56 +01:00
Thomas Arendsen Hein
dd5a1ee437 Some cleanups in commands.annotate().
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Some cleanups in commands.annotate().

manifest hash: 9581ad3bb9ebc418e4772158c505e34b92496e92
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC2K+nW7P1GVgWeRoRAr3VAKCGvKbhmG4yweZTgmxIgaZlmz16HQCdFupq
BKcWfEn17Y1l6IDbGS0rDyI=
=/fR/
-----END PGP SIGNATURE-----
2005-07-16 07:56:39 +01:00
Thomas Arendsen Hein
8734e61b04 Added missing newline after two error messages.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Added missing newline after two error messages.

manifest hash: c730cdf92c66ee5b44a4cd9b67f72deb844e4010
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC2B0mW7P1GVgWeRoRAjXJAJ48fbg6jXN65pBPGW/YmWn9OtKakACgjnr9
DPySaeLr3/bU7KhFdZPI7/4=
=Lvsx
-----END PGP SIGNATURE-----
2005-07-15 21:31:35 +01:00
Thomas Arendsen Hein
b3aaf95a41 Merge with myself.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Merge with myself.

manifest hash: e47e1ba87ecb28a08f819401fd8c2a88bc830261
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC168rW7P1GVgWeRoRAmknAJ0ea1BrnM1KSnfPqkYpurFpV+booACcDGNh
ka6ciaH1pQLhOyKgqdbqwOA=
=pOV4
-----END PGP SIGNATURE-----
2005-07-15 13:42:19 +01:00
Thomas Arendsen Hein
c39640c326 Show filename for hg export in verbose mode.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Show filename for hg export in verbose mode.

manifest hash: 4fbb7bb566ef04e64079fb1fd61974ad47f22e7c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC15svW7P1GVgWeRoRAleQAJ4kXmyj+56kTb5lV9VrQYpu4O3h5ACfXU5W
M0TB/OvU0g5uvudZVQMsJd0=
=yq7Y
-----END PGP SIGNATURE-----
2005-07-15 12:17:03 +01:00
Thomas Arendsen Hein
73f9932b92 Use dirstate to check if .hgtags needs to be added.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use dirstate to check if .hgtags needs to be added.

manifest hash: f90af1553754eb703fc457ffdd5ded0de6fa47e0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC15i1W7P1GVgWeRoRArDvAKCSxWDCbwU12ICwwVUoe753H8GYIwCfZGs0
HcL8cOp+eHz85AMJJE/xfck=
=1xKK
-----END PGP SIGNATURE-----
2005-07-15 12:06:29 +01:00
Thomas Arendsen Hein
ea4e83ea22 Fix synopsis: hg forget needs at least one file name.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fix synopsis: hg forget needs at least one file name.

manifest hash: 1386189a11f9bc539ae2c4bf93333235931d8bc6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC14i7W7P1GVgWeRoRAj3OAKCBPkYzoxOHu0Xp/vZ6Myz6JGM4hACgimU+
Gw1Av4ESM2ivORd8ulHMdBc=
=kDiv
-----END PGP SIGNATURE-----
2005-07-15 10:58:19 +01:00
Thomas Arendsen Hein
e747504c6c Changed command synopsises to match style of common UNIX tools.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Changed command synopsises to match style of common UNIX tools.

manifest hash: cf62235e46f5c06ac5a3c88cb61e9b57d35fe222
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC13YhW7P1GVgWeRoRAnSOAKCOtrYHZ2XMTjpphY/G2UZHcJcZeQCdFsgv
D5Hu+s9ahVX8hns2ZbQpriI=
=g6NW
-----END PGP SIGNATURE-----
2005-07-15 09:38:57 +01:00