Commit Graph

46 Commits

Author SHA1 Message Date
Martin Geisler
1a6e3991ac gpg: use cmdutil.command decorator 2011-05-12 14:31:01 +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
Dan Villiom Podlaski Christiansen
ec590d5cd4 explicitly close files
Add missing calls to close() to many places where files are
opened. Relying on reference counting to catch them soon-ish is not
portable and fails in environments with a proper GC, such as PyPy.
2010-12-24 15:23:01 +01:00
Richard Hopkins
67793c0851 gpg, commands: fixed util.abort to util.Abort typos
gpg: Fixed util.abort typo after entering wrong password.
commands: Fixed util.abort typo in debugindex.
2010-11-09 20:25:56 +00:00
Martin Geisler
5f46f16fb7 Lowercase error messages 2010-08-29 22:37:58 +02: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
Dirkjan Ochtman
af6b696f0f move working dir/dirstate methods from localrepo to workingctx 2010-06-07 20:03:32 +02:00
Martin Geisler
efb4a38a04 Use our custom hg reStructuredText role some more
I missed these occurrences on my first scan through the source.
2010-05-18 16:31:10 +02:00
Benoit Boissinot
11902c9b65 gpg: make 215997cc74c9 work when not on repo root 2010-02-23 22:56:37 +01:00
Benoit Boissinot
04051efacc gpg: do not call status on the whole repository, only on '.hgsigs' 2010-02-20 15:18:59 +01:00
Benoit Boissinot
7dae5be27b i18n: mark more strings for translation 2010-02-19 02:23:38 +01: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
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Martin Geisler
a17f0cee1b do not translate commit messages
It is not very helpful to have 'Added tag %s for changeset %s' and
similar messages translated into different languages when people work
together using different locales.

We now use English strings without support for translations. If
needed, the user can still supply a custom string for most commands.
2009-07-22 22:50:34 +02:00
Dirkjan Ochtman
0448417ea2 extensions: change descriptions for extensions providing a few commands 2009-06-24 13:42:02 +02:00
Cédric Duval
dbcec5595d extensions: improve the consistency of synopses
Trying as much as possible to consistently:
 - use a present tense predicate followed by a direct object
 - verb referring directly to the functionality provided
   (ie. not "add command that does this" but simple "do that")
 - keep simple and to the point, leaving details for the long help
   (width is tight, possibly even more so for translations)

Thanks to timeless, Martin Geisler, Rafael Villar Burke, Dan Villiom
Podlaski Christiansen and others for the helpful suggestions.
2009-06-22 15:48:08 +02:00
Dirkjan Ochtman
a774ff01bc help: add/fix docstrings for a bunch of extensions 2009-06-21 16:45:47 +02:00
Brendan Cully
7809c80bee gpg: unbreak 070fa724b247. We need a test. 2009-06-14 12:18:46 -07:00
Benoit Boissinot
125a85ec87 use new style classes 2009-06-10 15:10:21 +02:00
Matt Mackall
c1213eaf9d commit: drop the now-unused files parameter 2009-06-01 14:11:32 -05:00
Matt Mackall
0649f988bf gpg: use match.exact rather than files for commit 2009-06-01 13:51:21 -05:00
Martin Geisler
50e87afefd gpg: use reverse kwarg to sort sigs in reversed order 2009-05-07 01:33:45 +02:00
Martin Geisler
e3185cd4af Removed unnecessary call to dict.keys. 2009-05-06 23:35:20 +02:00
Giorgos Keramidas
c555bd60d4 gpg: fix traceback in revs{} display code 2009-05-06 20:30:46 +03: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
d4ab55a92b status: clean up all users for unknown files 2008-06-27 13:43:29 -05:00
Thomas Arendsen Hein
66db9ab9a2 Document log date ranges and mention 'hg help dates' for all commands (issue998) 2008-02-22 21:18:48 +01:00
Thomas Arendsen Hein
a1c1677af4 Fix bad behaviour when specifying an invalid date (issue700)
commit (aborts _after_ typing in a commit message)
backout (aborted after the initial revert)
tag (edited .hgtags and couldn't commit)
import (patch applied, then commit fails)
qnew (aborts on bad dates, but writes any valid date into the # Date header)
qrefresh (like qnew)
sign (like tag)
fetch (merge, merge, merge, merge, abort)
2008-02-17 21:34:28 +01:00
Benoit Boissinot
74d4b3eb05 gpg: use the same log message format as hg tag 2007-10-20 03:04:34 +02:00
Benoit Boissinot
ce6a51c4eb refactor options from cmdtable
- add extracommitopts for user and date
- factor stuff
2007-08-08 12:27:20 +02:00
Matt Mackall
c2967290a5 dirstate: add __contains__ and make __getitem__ more useful
dirstate.state(f) == '?' -> f not in dirstate
dirstate.state(f) -> dirstate[f]
2007-07-21 16:02:09 -05:00
Thomas Arendsen Hein
0b7147a667 Updated command tables in commands.py and hgext extensions.
- Marked for translation where extensions already had _()
- Corrected indentation
- fixed a few synopsises
2007-06-26 22:38:57 +02:00
Thomas Arendsen Hein
f2c2df1ab1 merge with crew-stable 2006-12-16 23:36:06 +01:00
Thomas Arendsen Hein
6857107023 Make 'hg sign' behave like other commands: Default to current parent. 2006-12-16 23:11:16 +01:00
Matt Mackall
296d6a7cb8 Simplify i18n imports 2006-12-14 20:25:19 -06:00
Vadim Gelfer
80d6f2f7c7 remove localrepository.changes.
use localrepository.status instead.
2006-08-12 16:40:12 -07:00
Thomas Arendsen Hein
ce9a04e13f gpg extension: Always remove temporary files created by 'hg sigcheck'. 2006-05-09 13:26:16 +02:00
Thomas Arendsen Hein
092be2daa9 Use better names (hg-{usage}-{random}.{suffix}) for temporary files. 2006-04-30 21:11:22 +02:00
Benoit Boissinot
f35a4401dc extension gpg.py: really raise the exception in case of invalid data 2006-02-02 19:22:27 +01:00
Benoit Boissinot
7993682c87 fix an exception in gpg.py with multiples sigs for the same cset
- silly error, do not overwrite the variable we use for iterating
- correct 'hg help sign'
2006-02-01 20:20:27 +01:00
Benoit Boissinot
3c3d3f47d2 fixes for gpg.py extension
- add copyright and license
- add i18n
- add 'sigs' command behaving like 'hg tags'
- change 'role' to 'comment' and output it only if there is one
- refactoring
2006-02-01 19:37:26 +01:00
Thomas Arendsen Hein
6e4eeabc49 Added missing space in output of gpg.py 2006-02-01 12:55:01 +01:00
Thomas Arendsen Hein
f5ef5dad07 Renamed c, a, d, u to modified, added, removed, unknown for users of changes() 2006-01-12 13:35:09 +01:00
Benoit Boissinot
799c1157bf gpg signing extension for hg
the principle is almost the same as how tags work:
.hgsigs stores signatures, localsigs stores local signatures

the format of the signatures is:
nodeid sigversion base64_detached_sig

sigversion 0 signs simply the nodeid (maybe we would like
to sign other things in the future).

you can associate fingerprints with roles in hgrc like:
[gpg]
fingerprint_of_a_key_without_spaces = release
fingerprint_of_a_key_without_spaces = contributor, testing

the key used for signing can be specified on the command line or
via hgrc (key =)

thanks to Eric Hopper for testing and bugfixing
2005-12-16 11:12:08 -06:00