Commit Graph

95 Commits

Author SHA1 Message Date
Gregory Szorc
3086949df4 extdiff: define inferrepo in command decorator 2014-05-04 22:29:27 -07:00
Gregory Szorc
07cdf48f61 extdiff: declare command using decorator 2014-05-04 21:54:01 -07:00
Augie Fackler
05a09487ed extdiff: move from dict() construction to {} literals
The latter are both faster and more consistent across Python 2 and 3.
2014-03-12 13:13:42 -04:00
Siddharth Agarwal
a5e71891bd commands: don't infer repo for commands like update (issue2748)
Maintain a whitelist of commands to infer the repo for instead. The whitelist
contains those commands that take file(s) in the working dir as arguments.
2012-10-16 11:43:15 -07:00
Mads Kiilerich
2f4504e446 fix trivial spelling errors 2012-08-15 22:38:42 +02:00
Augie Fackler
96d44b39f7 hgext: mark all first-party extensions as such 2012-05-15 14:37:49 -05:00
Brodie Rao
a7ef0a0cc5 cleanup: "not x in y" -> "x not in y" 2012-05-12 16:00:57 +02:00
Thomas Arendsen Hein
2210a784fd extdiff: escape filenames with vim/DirDiff and make quoting work with Windows
Use vim function fnameescape() on filenames.
Use double quotes for arguments so cmd.exe is happy.
2012-03-12 09:39:30 +01:00
Idan Kamara
09b97b7cff extdiff: use ui out descriptor when calling util.system 2011-06-24 17:04:37 +03:00
Matt Mackall
5ab97592f7 scmutil: switch match users to supplying contexts
The most appropriate context is not always clearly defined. The obvious cases:

For working directory commands, we use None
For commands (eg annotate) with single revs, we use that revision

The less obvious cases:

For commands (eg status, diff) with a pair of revs, we use the second revision
For commands that take a range (like log), we use None
2011-06-18 16:52:51 -05:00
Javi Merino
c3168645be extdiff: grammar "allows to" -> "allows one to"
The verb to allow requires a direct object.

Lintian, a Debian tool to find common mistakes, reported it. I'm not a
native english speaker but I think this is correct.
2011-05-15 18:00:22 +01:00
Matt Mackall
0832007f60 scmutil: drop aliases in cmdutil for match functions 2011-05-13 14:58:24 -05:00
Matt Mackall
cf07129983 scmutil: move revsingle/pair/range from cmdutil
This allows users at levels below the command layer to avoid import loops.
2011-05-13 14:06:28 -05:00
Adrian Buehlmann
c415440828 rename util.set_flags to setflags 2011-05-06 15:22:31 +02:00
Dan Villiom Podlaski Christiansen
511c941422 prevent transient leaks of file handle by using new helper functions
These leaks may occur in environments that don't employ a reference
counting GC, i.e. PyPy.

This implies:
 - changing opener(...).read() calls to opener.read(...)
 - changing opener(...).write() calls to opener.write(...)
 - changing open(...).read(...) to util.readfile(...)
 - changing open(...).write(...) to util.writefile(...)
2011-05-02 10:11:18 +02:00
Steven Stallion
b6327cdf0a extdiff: add repository root as a variable
Some external diff tools (notably Plan 9 diff(1)) require the absolute path
to the file being diffed for proper function. A root variable was added to
inform an external tool of the repository root (the tool is invoked with the
cwd set to tmproot).
2011-04-27 21:55:46 -04:00
Thomas Arendsen Hein
e6dcc5994e merge with stable 2011-04-29 11:10:11 +02:00
Patrick Mezard
2cbeb4b9c6 extdiff: fix broken symlinks handling (issue1909) 2011-04-29 08:04:46 +02:00
Adrian Buehlmann
cf126bb7dd move opener from util to scmutil 2011-04-20 19:54:57 +02:00
Matt Mackall
a8dd64dcb0 misc: replace .parents()[0] with p1() 2011-04-04 16:21:59 -05:00
jfh
a63916e626 extdiff: use absolute paths for any temporary files
This allows the use of p4merge amongst possible other external tools.
2011-03-21 17:03:16 +01:00
David Wolever
7bd158b865 Updating hgext.extdiff to use revsets 2011-03-15 17:50:02 -04:00
FUJIWARA Katsunori
ce06b102df help: show value requirement and multiple occurrence of options
this helps users to know what kind of option is:

  - no value is required(flag option)
  - value is required
  - value is required, and multiple occurrences are allowed

each kinds are shown as below:

 -f --force              force push
 -e --ssh CMD            specify ssh command to use
 -b --branch BRANCH [+]  a specific branch you would like to push

if one or more 3rd type options are shown, explanation for '[+]' mark
is also shown as footnote.
2010-06-06 17:25:00 +09:00
Martin Geisler
a6312d22f5 extdiff: fix reST syntax in module docstring 2010-05-17 23:11:27 +02:00
Steve Borho
c76d6b8145 extdiff: add labels, read diff arguments from [merge-tools]
hgtk has been using these same configs since Feb. Users only have to name the
tools they would like to use, ex:

[extdiff]
kdiff3 =
meld =
2010-01-07 22:19:05 -06:00
Benoit Boissinot
328394047f fix coding style (reported by pylint) 2010-02-08 15:36:34 +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
Sune Foldager
2368eabe27 extdiff: respect --option in command aliases (issue949) 2009-11-30 19:37:38 +01:00
Martin Geisler
5ad36f40d3 extdiff: prevent exception on double-translation
The docstring is translated twice: once when used as a format string,
and once on display. The second translation fails when the first
translation introduces non-ASCII characters in the string.

The problem is that the gettext module calls unicode(message) on the
string, i.e., it decodes it to a Unicode string using the ASCII
encoding (the default encoding). By translating it into a Unicode
string here, the unicode() call becomes a noop.
2009-11-26 20:06:45 +01:00
Matt Mackall
13b406f027 Merge with -stable 2009-10-03 14:39:57 -05:00
Sune Foldager
c7e7232f9e extdiff: add 3-way diff for merge changesets
This adds 3-way diff for merge changesets (using -c) and for diffing
the working directory context against two parents. To enable it, use
the new magic value '$parent2' in the argument line. In order to work,
your differ must support that the second parent argument is left out;
this will happen in 2-way mode. Default arguments are as before, without
enabling 3-way mode, ensuring backwards compatibility.

This also fixes a problem when diffing a merge changeset with a single
file change. Extdiff would sometimes do the wrong thing in that situation.
2009-09-17 21:12:32 +02:00
Martin Geisler
9f1896c083 do not attempt to translate ui.debug output 2009-09-19 01:15:38 +02:00
Peter Arrenbrecht
4e1708dc3a extdiff: fix defaulting to "diff" if no --program is given 2009-10-01 08:50:10 +02:00
Cédric Duval
21be180306 doc: fix quotes mismatches affecting rst 2009-07-31 01:40:45 +02:00
Martin Geisler
917d000717 extdiff: wrap docstrings at 70 characters 2009-07-26 01:45:36 +02:00
Martin Geisler
a3715f628a extdiff: use reST syntax for literal block 2009-07-23 00:22:50 +02:00
Martin Geisler
e48f6a2ae3 extdiff: wrapped docstrings at 78 characters 2009-07-07 23:54:42 +02:00
Martin Geisler
be9e1c997f extdiff: fix indentation and use gettext 2009-07-07 23:30:48 +02:00
Dirkjan Ochtman
0448417ea2 extensions: change descriptions for extensions providing a few commands 2009-06-24 13:42:02 +02:00
Dirkjan Ochtman
a774ff01bc help: add/fix docstrings for a bunch of extensions 2009-06-21 16:45:47 +02:00
Cédric Duval
0caffe860f help: remove per-extension paragraph on how to enable it
The central place to find this information is the "extensions" help topic.
2009-06-20 20:57:13 +02:00
Martin Geisler
c624e91552 fixed typos found in translatable strings
This is from a spell-check of hg.pot.
2009-05-31 14:55:51 +02:00
Matt Mackall
14089a2384 Merge with stable 2009-12-01 14:37:33 -06:00
Martin Geisler
3f706eb0e4 extdiff: wrap long lines in docstring and comments
Gettext wraps lines in the messages when it writes them to the hg.pot
file and that makes long lines look odd in the resulting .po file.
2009-11-26 23:10:59 +01:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Martin Geisler
52ce98c9a8 help texts: write command line switches as -a/--abc 2009-04-18 14:40:21 +02:00
Patrick Mezard
cd3505dbbc Merge with crew-stable 2009-04-13 21:57:17 +02:00
Patrick Mezard
0d13db37f7 extdiff: preserve execute-bit across copies (issue1562)
Bug report and test by Mads Kiilerich <mads@kiilerich.com>
2009-04-09 14:32:44 +02:00