Commit Graph

219 Commits

Author SHA1 Message Date
Nicolas Dumazet
bf5cba2457 cmdutil.service: do not _exit(0) in the parent process
The fact that a parent process spawns a daemon does not necessarily means that
it is the only think it has to do. This was forcing since e8efd88001e7 inotify
processes launched implicitely to exit prematurely:
when no inotify server was running, "hg st" for example would only launch a
inotify server, _exit(0) and thus would not return file statuses.

This changeset adds a test for implicitely launched inotify processes.
Change to output of test-inotify-1208 is correct: it reflects the normal
error message of "hg st" when not dying during "hg inserve" daemon creation.
2009-11-17 15:00:00 +09:00
Dirkjan Ochtman
78e70cd53d cmdutil: fix bug in finddate() implementation 2009-10-30 09:54:39 +01:00
Dirkjan Ochtman
c47d609475 merge changes from mpm 2009-10-30 09:53:39 +01:00
Matt Mackall
4d8e4508a9 walkchangerevs: drop ui arg 2009-10-29 19:03:16 -05:00
Matt Mackall
caf5c5ecca walkchangerevs: reset cache between windows 2009-10-29 19:03:13 -05:00
Matt Mackall
de712b58f9 walkchangerevs: move 'add' to callback
Now walkchangerevs is a simple iterator over contexts
2009-10-29 17:07:51 -05:00
Steve Borho
ab6b033d40 cmdutil: update finddate()
walkchangerevs() now returns contexts, does not take a cache func.
2009-10-28 22:47:46 -05:00
Matt Mackall
74ca11743b Merge with crew 2009-10-27 17:14:19 -05:00
Matt Mackall
0366236cf5 walkchangerevs: internalize ctx caching 2009-10-27 17:01:32 -05:00
Matt Mackall
67e7c0b434 walkchangerevs: yield contexts 2009-10-25 18:43:59 -05:00
Matt Mackall
201d81ac28 walkchangerevs: kill window step of iterator 2009-10-25 18:43:58 -05:00
Matt Mackall
69f8478d8c walkchangerevs: pull out matchfn
* * *
imported patch mercurial/commands.py
2009-10-25 18:43:56 -05:00
Adrian Buehlmann
c0985715f7 cmdutil: minor refactoring of changeset_printer._show
- use ctx.branch() instead of directly accessing the extra field "branch"
- move definitions of locals ('extra' and 'branch') down to where they
  are used
2009-10-24 19:01:40 +02:00
Greg Ward
889a9ffb8d cmdutil: changeset_printer: use methods of filectx/changectx.
This allows extensions that modify changeset metadata (e.g.
description) by overriding methods of changectx to get consistent
behavior from all log-like commands, regardless of whether templates
or styles are used. Without this, overriding changectx methods works
if you use styles or templates, but not with default log format.

This meant adding filectx.extra() for consistency with changectx.
2009-10-05 18:17:13 -04:00
Mads Kiilerich
8ff24147fd cmdutil: templating keywords latesttag and latesttagdistance
This can be used for referring to revisions in a reasonable
meaningful, stable and monotonically increasing way, suitable for
releases or builds directly from a repository.

The latest tag is found by searching through untagged ancestors and
finding the latest tagged ancestor based on tag date. The distance is
found from the length of the longest path to the tagged revision.

For example:
  hg log -l1 --template '{latesttag}+{latesttagdistance}\n'
can return
  1.3.1+197

This is mostly work by Gilles Moris <gilles.moris@free.fr>
2009-10-03 18:31:20 +02:00
Nicolas Dumazet
9c19061a7e cmdutil: service: add an optional runargs argument to pass the command to run
This would be necessary for inotify launching its server: the initial command
is a standard 'hg st'/'hg ci'/... but the daemon to run is 'hg inserve'
2009-08-16 11:30:24 +09:00
Dirkjan Ochtman
e00109f7e7 cmdutil: use context objects for walkchangerevs() 2009-08-20 08:34:22 +02:00
Steve Borho
afad34fc2e cmdutil: fall back to filename if glob expand has errors
On Windows, Mercurial tries to glob expand provided filenames as a
convenience to the user. Unfortunately, there are valid filenames
which are not valid glob patterns.  In those cases, we should fallback
to the original provided filename.
2009-07-12 00:46:43 -05:00
Matt Mackall
540c02c8d3 commit: report modified subrepos in commit editor 2009-07-01 01:05:24 -05:00
Matt Mackall
0210a48141 addremove: build lists of already added and removed files too (issue1696) 2009-06-30 23:25:53 -05:00
Matt Mackall
bc08ba2edf addremove: pass unknown and deleted to findrenames directly again 2009-06-30 16:11:42 -05:00
Matt Mackall
6b9bed125a addremove: normalize some variable names 2009-06-30 15:56:08 -05:00
Matt Mackall
242e029aa1 findrenames: drop unused argument defaults 2009-06-29 15:34:17 -05:00
Matt Mackall
34cb6b5080 addremove: drop some silly variable assignments 2009-06-23 17:51:51 -05:00
Matt Mackall
7253321c4e remoteui: properly create dst with copy() 2009-06-12 02:19:51 -05:00
Nicolas Dumazet
448395f76a cmdutil: service: logfile option to redirect stdout & stderr in a file 2009-05-25 18:14:32 +09:00
Benoit Boissinot
125a85ec87 use new style classes 2009-06-10 15:10:21 +02:00
timeless
fb33de67af Generally replace "file name" with "filename" in help and comments. 2009-06-09 09:25:17 -04:00
Henri Wiechers
4269cb82b8 cleanup: removed unused imports 2009-06-07 21:16:05 +02:00
Matt Mackall
fcb44e87db commit: move explicit file checking into repo.commit 2009-06-01 21:51:00 -05:00
Matt Mackall
7c83f8b030 commit: editor reads file lists from provided context 2009-06-01 14:51:47 -05:00
Matt Mackall
37eaadf540 match: ignore return of match.bad
All users returned false, return can now be dropped
2009-05-31 17:54:18 -05:00
Matt Mackall
a30eb02911 cmdutils: Take over glob expansion duties from util 2009-05-24 16:38:29 -05:00
Matt Mackall
b287cf72fe match: refactor patkind
add patkind(pat) to match
change external users
change util.patkind to _patsplit
2009-05-24 02:56:14 -05:00
Martin Geisler
6355b4950b cmdutil: mark string for translation 2009-05-20 12:20:27 +02:00
Matt Mackall
16d4ef56bc commit: explain how to abort commit in editor 2009-05-18 17:36:24 -05:00
Benoit Boissinot
bee6cb3d55 addremove/findrenames: find renames according to the match object (issue1527)
Instead of only finding similarities in the added/removed files found
by the addremove step, follow the match object:

hg addremove -s80 foo -> add and removes files in foo
                         + find similarities between files in foo
hg addremove -s80 -> add and removes files in the whole repo
                     + find similarities between files in the whole repo

hg import --similarity will still work correctly (only find similarities
between files found in the patch).
2009-05-17 22:51:17 +02:00
Benoit Boissinot
6f0577d081 addremove: mapping isn't really needed, simplify 2009-05-17 22:40:04 +02:00
Matt Mackall
5534a9c3e3 editor: move HG: filtering from ui to commiteditor 2009-05-14 13:21:17 -05:00
Matt Mackall
ebe3b0ebc3 commit: move commit editor to cmdutil, pass as function 2009-05-14 13:20:40 -05:00
Peter Arrenbrecht
a75765cf7f drop unused imports 2009-05-14 15:35:46 +02:00
Martin Geisler
4d0bbe44ba cmdutil: replace pseudo-set by real set 2009-05-12 01:08:28 +02:00
Dirkjan Ochtman
5c6c43b746 templater: provide the standard template filters by default 2009-05-12 12:04:05 +02:00
Simon Heimberg
09ac1e6c92 separate import lines from mercurial and general python modules 2009-04-28 17:40:46 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
f6c8930392 replace various uses of list.reverse() 2009-04-26 16:50:44 -05:00
Matt Mackall
2f9b02c62d replace util.sort with sorted built-in
This is marginally faster for small and moderately-sized lists
2009-04-26 16:50:44 -05:00
Matt Mackall
88b13fecec ui: replace parentui mechanism with repo.baseui 2009-04-26 16:50:43 -05:00
Matt Mackall
6708d0e299 add cmdutil.remoteui
remoteui sorts out the issues of getting ssh config options from the
local repo into the remote one while not copying other options like hooks.
2009-04-26 16:50:43 -05:00
Martin Geisler
e2222d3c43 replace set-like dictionaries with real sets
Many of the dictionaries created by dict.fromkeys were emulating sets.
These can now be replaced with real sets.
2009-04-22 00:57:28 +02:00