Commit Graph

263 Commits

Author SHA1 Message Date
Brodie Rao
3a2a2b8869 cmdutil: make use of output labeling in changeset_printer 2010-04-02 15:22:07 -05:00
Matt Mackall
6e515e4e5d progress: drop extra args for pos=None calls (issue2087) 2010-03-17 18:15:16 -05:00
Martin Geisler
652e04c99c progress: use a verb in present participle 2010-03-15 18:40:00 +01:00
Benoit Boissinot
04d99f9fbc patch/diff: move patch.export() to cmdutil.export()
This API change will allow us to break a cycle between patch and cmdutil.
2010-03-08 19:43:24 +01:00
Benoit Boissinot
7c20de57d6 addremove: avoid fetching data again and again 2010-03-08 00:01:12 +01:00
Benoit Boissinot
467b4c41ef addremove: add progress support for similarity search 2010-03-08 00:00:03 +01:00
Benoit Boissinot
fe5ad60ee3 addremove: atomically update the dirstate
In case someone hits ^C during the similarity search, properly rollback
2010-03-07 23:59:28 +01:00
Brodie Rao
892ba5a830 remove unused imports 2010-02-14 01:52:31 -05:00
Brendan Cully
3743c1ee43 mq: make init -Q do what qinit -c did 2010-02-08 10:50:00 +01:00
Brendan Cully
de80ca9367 mq: add -Q option to all commands not in norepo 2010-02-08 10:23:44 +01:00
Patrick Mezard
4b42e59a7a util: make spawndetached() handle subprocess early terminations
The file-based synchronization introduced by 670de588e29e hangs when the child
process fails before terminating the handshake, which the previous pipe-based
version handled correctly. To fix this, the parent polling loop was fixed to
detect premature terminations of the child process.
2010-02-06 16:50:00 +01:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Patrick Mezard
b47d7635f5 templatekw: fix extras, manifest and showlist args (issue1989)
Removing the explicit parameters from keywords signature is easier than copying
and reproducing the original argument list.
2010-01-18 22:59:32 +01:00
Patrick Mezard
965c2821fb Merge with crew-stab le 2010-01-15 10:38:11 +01:00
Patrick Mezard
b5602adbcc cmdutil: expand style paths (issue1948)
Fix suggested by Andrea Riciputi <andrea.riciputi@gmail.com>
2010-01-15 09:50:52 +01:00
Patrick Mezard
052695b2e4 cmdutil: hide child window created by win32 spawndetached()
Hiding the child process window is not strictly necessary but it avoids opening
an empty shell window when running hg serve as well as a task in the task bar.
The window is hidden after the process is already started causing a single
flicker.
2010-01-10 18:13:34 +01:00
Patrick Mezard
48eee05938 Find right hg command for detached process
On Windows, Mercurial can be run from the python script of from a frozen
executable. In the first case, we have to call the python interpreter since the
script is not executable. Frozen executable can be called directly.

Fix 3/3 for issue421
2010-01-06 21:11:58 +01:00
Patrick Mezard
9c0f70e3a8 cmdutil: replace unix pipe handshake with file lock
The pipe handshake cannot be implemented with Windows detached process, which
disables handle inheritance.

Fix 2/3 for issue421
2010-01-06 21:11:58 +01:00
Dirkjan Ochtman
0513f13503 cmdutil: copy auth section in remoteui
This allows me to specify an auth section in a .hg/hgrc instead of just
a global or user-level hgrc.
2009-12-10 12:31:21 +01:00
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