Commit Graph

2818 Commits

Author SHA1 Message Date
Martin Geisler
a76e121863 backout of e4cb9628354c
Matt and a majority of crew did not like this approach.
2011-01-27 11:15:08 +01:00
Christian Ebert
95a7f264b7 keyword: move repo.__class__ assignment out of monkeypatch context
A cosmetic change to improve readability.
2011-01-23 03:15:44 +01:00
Christian Ebert
36f93ec22a keyword: inform user about current keywordset in kwdemo
The kwdemo --default output now looks roughly like this:

      configuration using default cvs keywordset
[extensions]
keyword =
[keyword]
demo.txt =
[keywordset] * section added with this change
svn = False
[keywordmaps]
...
2011-01-23 03:15:39 +01:00
Martin Geisler
d23e1973c2 specify C indention style using Emacs file local variables 2011-01-26 12:05:01 +01:00
Patrick Mezard
4554668a40 record: do not include files into changes count
This turns the prompt sequence from something like:

  $ examine changes to foo?
  $ record change 1/4 to foo?
  $ record change 2/4 to foo?
  $ examine changes to bar?
  $ record change 4/4 to bar?

into:

  $ examine changes to foo?
  $ record change 1/3 to foo?
  $ record change 2/3 to foo?
  $ examine change to bar?
  $ record change 3/3 to bar?
2011-01-24 23:25:46 +01:00
Patrick Mezard
1854f5716d record: simplify header methods with util.any 2011-01-23 15:21:56 +01:00
Patrick Mezard
5cca40e708 record: refactor the prompt loop
The previous loop was iterating over a mixed header/hunk stream. It may have
been more generic in the sense every item in the stream could trigger a prompt
but it required more work to skip items properly. It can be rewritten in a more
intuitive way by looping on files then looping on hunks.
2011-01-23 15:21:37 +01:00
Patrick Mezard
fc1575c195 record: turn prompt() into a pure function 2011-01-23 13:01:17 +01:00
Patrick Mezard
52f4fcb07c record: turn consumefile() into a pure function 2011-01-23 12:44:05 +01:00
Christian Ebert
87f97c3b31 keyword: update documentation for kwshrink
* remove obsolete reference to potential problems with merge and import
* emphasize that running kwshrink before configuration changes which
  affect active/expanded keywords is mandatory
2011-01-16 15:45:26 +01:00
Matt Mackall
6c9be0381b mq: avoid using revlog.nodemap unnecessarily 2011-01-11 17:06:07 -06:00
timeless
1df4cf63b6 progress: handle days, weeks and years
using hg clone svn://anonsvn.kde.org/home/kde/trunk kde ... with progress
yields 3008/1210830 1314h56m, which is unusable.

Add code to switch to days at 30 hours, to weeks at 15 days, and to years
at 55 weeks. A day has 24 hours, a week has 7 days, and a year has 52 weeks.
Months are intentionally omitted because they do not have a fixed length. The
Use of 52 weeks is a known and understandable estimate for a year.

It might make sense to spell our year to alert people when progress is
impractical, but...
2011-01-02 18:51:59 +02:00
Adrian Buehlmann
721e368ac1 rename util.unlink to unlinkpath 2011-01-02 19:34:41 +01:00
Steve Borho
4ef6c62600 mq: record more data in patchheader class (no behavior changes)
* parse branch and nodeid header lines
* remember the line number where diffs started

Combined, these make mq.patchheader() very useful for parsing and
preserving a patch header through edits. TortoiseHg will use the
nodeid and parent to display these header datums in the graph when
patches are unapplied, and uses diffstartline to parse patch files
using record.parsepatch().
2010-12-31 17:09:38 -06:00
Matt Mackall
49ec3df937 merge with stable 2011-01-01 18:42:04 -06:00
Jacek Sowiński
d5b7a5d84f strip: typo bugfix related to '--nobackup -> --no-backup' rename (issue2377)
'--no-backup' in cmdline means *'no_backup'* in code'
2010-12-31 15:14:51 +01:00
Matt Mackall
ceea1a202f merge with stable 2010-12-28 13:31:30 -06:00
Yuya Nishihara
92b5cbe067 notify: use util.ellipsis() to truncate long subject 2010-12-24 01:17:18 +09:00
Nicolas Dumazet
97f5e1fd2a patchbomb: save introductory message in .hg/last-email.txt 2010-12-21 19:44:28 +09:00
Kevin Bullock
4655fb606c record: clean up command table
The --force option to qnew has become a no-op, so qrecord doesn't need
to use it. This allows record's command table to be simplified; in the
process of doing so, this patch also cleans up the cmdtable visually.
2010-12-21 15:27:58 -06:00
Kevin Bullock
709bd128af record: clean up comments and docstrings
Rewrap comments and docstrings to a width of 72 chars and copy-edit.
2010-12-21 15:23:48 -06:00
Steve Borho
7b9494aa62 convert: subversion should use util.quotecommand to wrap args to popen2
All other callers of util.popen2 and util.popen3 do this, as well as direct
callers of subprocess.Popen.
2010-12-22 13:25:00 -06:00
Kevin Bullock
5c61f5f136 mq: update .hgsubstate if subrepos are clean (issue2499)
This patch prevents MQ from creating an inconsistent subrepo state. If
the .hgsub file has been changed, and none of the subrepos have
uncommitted changes, creating or updating a patch (using qnew, qrefresh,
or qrecord) will update .hgsubstate accordingly.

If any subrepos _do_ have uncommitted changes, qnew/qrefresh/qrecord
will abort.

Thanks to pmezard for proposing this solution.
2010-12-07 22:14:43 -06:00
Kevin Bullock
ed11f126c8 backout 0880564992de 2010-12-07 22:14:43 -06:00
Steve Borho
6796ac95d5 record: teach parsepatch() about non-git style headers
These changes are not useful to record itself, since it is hard coded
to always generate git style diffs.  But it makes parsepatch() more
generally useful for parsing normal patch files.
2010-12-08 22:14:18 -06:00
Augie Fackler
fe6b4b14cf progress: don't compute estimate without a total
Without this, computing an estimate crashes. Test included.
2010-12-16 07:45:22 -06:00
Augie Fackler
718b098522 progress: include time estimate as part of the default progress format 2010-12-15 10:22:54 -06:00
Augie Fackler
1e552d096f progress: only show time estimate when progress format contains 'estimate' 2010-12-15 10:22:06 -06:00
Augie Fackler
5d0aeb403a progress: fix adding format elements after the progress bar
Prior to this change, format elements after the progress bar would
show up in the wrong order.
2010-12-15 10:20:36 -06:00
Martin Geisler
14b25d1759 progress: explain format strings to translators 2010-12-15 09:35:32 +01:00
Augie Fackler
765100989d progress: refactor for readability and show XXs instead of 0mXXs. 2010-12-09 17:33:40 -06:00
Erik Zielke
cd263d594c eol: improve help on whether EOLs are changed in working copy or repository
Improved help to make it more clear for users which changes are only
changes in the working copy and which changes that will go into the
repository (on the following commit). Futhermore a note on when the
rules will be applied to the working directory.
2010-11-22 14:36:57 +01:00
Nicolas Dumazet
48d76e5f60 churn: ignore trailing and leading spaces (issue2546) 2010-12-13 16:41:39 +09:00
Brodie Rao
7b0127774f bookmarks: create undo.bookmarks using repo.opener instead of util.copyfile
This more closely matches how the other undo files are created, and we
don't care about settings permissions or times on the file, which can
fail if the user running hg doesn't own the file.
2010-12-07 20:03:04 +11:00
Christian Ebert
7130ab35da keyword: copy: when copied source is a symlink, follow it
1) hg cp symlink copy -> copy is a symlink.
2) cp symlink copy; hg cp -A symlink copy -> copy is a regular file.

In the second case we have to follow the symlink to its target
to find out whether we have to unexpand keywords in the copy.

Add test covering the case where the copied link's target is ignored
by keyword but has content which would match the regex for expanded
keywords to check whether we indeed leave the destination alone.
2010-12-01 10:51:49 +01:00
Shun-ichi GOTO
c55a471867 win32mbcs: use extsetup() to wrap functions only once.
Using reposetup() may cause multiple-wrap issue in some situation
like "hg serve".
2010-11-19 18:07:15 +09:00
Patrick Mezard
120ad3c801 convert/svn: fix changed files list upon directory replacements
When branch2/dir was replacing branch1/dir, we only marked branch2/dir files a
changed. Add branch1/dir files as they may not exist in branch2.
2010-11-29 20:13:11 +01:00
Kevin Bullock
79f5039252 mq: ignore subrepos (issue2499)
If MQ allows modifying .hgsub or .hgsubstate in a patch, it can easily
lead to an inconsistent subrepo state. This patch prevents qrefresh from
adding any modifications to .hgsub or .hgsubstate to a patch. The user
is warned that these files are not included in the patch.

The tests test both the slightly irrational and the pathological cases.
2010-11-16 13:06:07 -06:00
Christian Ebert
0a8e9b8d50 keyword: s/config/configuration/ in help 2010-11-22 16:05:31 +01:00
Henrik Stuart
54e1841c4f rebase: support --detach when null is common ancestor 2010-11-20 09:51:56 +01:00
Martin Geisler
750fe9abd1 eol: mention the hook in the module docstring 2010-11-13 15:57:12 +01:00
Colin Caughie
83d5ec6c25 eol: exclude .hgtags file from eol translation (issue2493) 2010-11-13 15:02:02 +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
Steve Borho
6fc11bd3c7 rebase: improve resolve failure message 2010-10-30 16:58:15 -05:00
Kevin Bullock
deaad9124d pager: make example of setting pager less silly 2010-10-29 00:57:34 -05:00
Mike Sperber
bb18159cb0 convert: Work around p4 instability (issue2465)
The p4 command-line client sometimes fails upon doing "p4 describe"
when trying to produce a patch. (I'm guessing it's a bug in p4.)
However, "hg convert" doesn't even make use of the patch, and it can
be elided by adding "-s" to the p4 command line here.
2010-10-30 02:47:34 -05:00
Matt Mackall
2742ab2c20 merge with i18n 2010-10-30 02:47:24 -05:00
Martin Geisler
02c90a666d qnew: distinguish between existing file and directory (issue2464) 2010-10-29 14:06:06 +02:00
Martin Geisler
3bd0773df5 qnew: give better feedback when doing 'hg qnew foo/' (issue2464) 2010-10-29 15:25:21 +02:00
Martin Geisler
94a99c16c9 pager: backout 211c3a983bd3 (issue2441) 2010-10-29 14:47:45 +02:00
Patrick Mezard
1ba47f6d3d mq: qrename should not touch the dirstate if src is untracked (issue2460) 2010-10-28 22:04:33 +02:00
Martin Geisler
4f03753252 i18n, bookmarks: add comments for translators 2010-10-28 09:48:01 +02:00
timeless
103026042f progress: Add estimated time remaining for long tasks
Output looks roughly like this:
updating [======================>                       ] 1547/4842 0m13s

output will either show h:m or m:s
2010-10-26 14:41:58 +03:00
Augie Fackler
caa25014d3 progress: react more reasonably to nested progress topics
Previously, we'd reset the entire progress bar state when a topic was
completed, even if it wasn't the outermost progress topic. Now we
print the state of the next progress topic on the stack if one is left
rather than reset the progress bar.
2010-12-10 16:56:12 -06:00
Martin Geisler
679f27515a merge with stable 2010-12-13 11:53:17 +01:00
Matt Mackall
6bcc439bb1 merge with stable 2010-12-08 13:12:12 -06:00
Brodie Rao
1d9f172d6c record: move copystat() hack out of util.copyfile() and into record
226847bf9cab updated copyfile to also copy over atimes and
mtimes. That behavior is specifically to trick editors into thinking
files that hg record has modified haven't changed. We don't really
care about preserving times in the general case.
2010-12-07 20:03:05 +11:00
Christian Ebert
3482ce6068 keyword: make kwfiles show deleted files configured for expansion 2010-12-04 14:44:05 +01:00
Christian Ebert
04b255ebb4 keyword: colorize hg kwfiles output 2010-12-04 14:22:12 +01:00
Thomas Arendsen Hein
6fd4e6aaec coding style: fix gratuitous whitespace after Python keywords 2010-12-03 11:30:45 +01:00
Matt Mackall
15ad3a76d6 merge with stable 2010-12-01 18:47:40 -06:00
Nicolas Dumazet
7e56ad61ee merge with stable 2010-12-01 11:02:12 +09:00
Matt Mackall
776084cff3 pushkey: use UTF-8 2010-11-28 18:21:47 -06:00
Matt Mackall
3d79b5ac97 bookmarks: use UTF-8 storage
This uses tolocal/fromlocal to translate bookmark metadata to UTF-8
for storage. Existing bookmarks in ASCII, UTF-8 or Latin1 will
continue to work, others may need to set HGENCODINGFALLBACK to
transition.
2010-11-24 16:04:33 -06:00
Matt Mackall
8e2f7d14eb merge with stable 2010-11-22 13:11:46 -06:00
Steve Losh
72ee3af1d8 mq: add an '-e/--exact' option to qpush
This patch adds an '--exact/-e' option to qpush that will try to push the
patches in the correct location in the DAG.  Specifying this option does the
following:

* If --move is specified, abort. It makes no sense to move a patch to the front
  of the queue and try to apply it to its parent, because its parent is one of
  the patches we just moved it in front of!
* If patches are already applied, abort. We don't want patch changesets
  scattered throughout the DAG.
* If local changes are present, abort unless --force is used, as usual.
* Find the first patch we're going to push (if we're pushing multiple patches
  with a target or --all).
* If that patch doesn't have a parent, abort, obviously.
* If the parent doesn't exist in the repo, abort.  Something is wrong.
* Update to the parent, then continue pushing the patches as normal.
2010-11-17 21:18:44 -05:00
Matt Mackall
3fe296798a dirstate: warn on invalid parents rather than aborting
This allows more graceful recovery from some mangled dirstates
2010-11-22 12:43:31 -06:00
Martin Geisler
6a3d9310ab code style: prefer 'is' and 'is not' tests with singletons 2010-11-22 18:15:58 +01:00
Martin Geisler
59192feb36 merge with stable 2010-11-22 17:39:46 +01:00
Patrick Mezard
ad186e82b5 Merge with stable 2010-11-21 13:16:59 +01:00
timeless
2f8d0b40e3 record: quote command in use hg commit message 2010-11-21 05:07:06 -06:00
Martin Geisler
8e20190ebb mq: fix comment to reflect change in 900672e7d1f7 2010-11-17 09:06:38 +01:00
Kevin Bullock
fb0785e3d1 mq: clean up unused variable in qrefresh
Removes the unused variable `aa2` that holds the list of deleted files
returned from repo.status().
2010-11-16 13:06:04 -06:00
Martin Geisler
ad31db42bf merge with stable 2010-11-13 15:57:40 +01:00
Martin Geisler
2f43114d9f eol: fix win32text encode/decode filter names 2010-11-13 15:46:51 +01:00
Martin Geisler
d9339ae620 merge with stable 2010-11-13 15:12:09 +01:00
Colin Caughie
b10fcb9768 eol: added filter aliases for backwards compatibility with win32text
This makes it possible to switch most win32text configurations (i.e. those
that use cleverencode and cleverdecode) to hgeol simply by disabling one and
enabling the other. Any rules found in repo-specific .hgeol files will be
appended to the configuration in .hgrc.
2010-11-10 20:26:56 +00:00
Martin Geisler
573e60523a merge with stable 2010-11-11 07:23:38 +01:00
Nicolas Dumazet
f4ae25089e mq: use sets instead of lists for speed
The code eventually converts data through sets to ensure unicity:
do it earlier to allow faster __contains__ lookups and avoid
`del l[l.index(x)]` kind of code.
2010-11-07 22:03:28 +09:00
Christian Ebert
df0bc30259 keyword: turn regexes and escaped keywords into a propertycache 2010-11-04 22:56:38 +00:00
Martin Geisler
270e016cd4 convert: better ReST markup in docstring 2010-11-04 18:19:10 +01:00
Martin Geisler
065bf6632b convert: split docstring lists for easier translation 2010-11-04 18:11:10 +01:00
Erik Zielke
e9f419e2c6 convert: use field list instead of option list in help
Use field list instead of option list in convert help, because the
option list format used, with defaults and type of argument is not
supported by docutils.
2010-11-04 14:14:47 +01:00
Christian Ebert
8d43aa49f8 keyword: function to look up changectx for expansion
Similarly rename variable in kwtemplater.overwrite().
2010-11-03 14:37:41 +01:00
timeless
0b7bb71571 rebase: abort message should appear even with --quiet 2010-10-26 14:41:58 +03:00
timeless
5ba84d015b bookmarks: improve English for diffbookmarks 2010-10-26 14:41:58 +03:00
Martin Geisler
41f0f0af10 mq: expand 'repo' -> 'repository' in error message 2010-10-26 18:01:35 +02:00
Martin Geisler
79f93adec2 mq: mark strings that should not be translated 2010-10-26 17:59:21 +02:00
timeless
788c88e3ef qrestore: trying to improve the English 2010-10-26 14:41:58 +03:00
Christian Ebert
baf94f43b9 keyword: fix regressions introduced in 1416551b9299
- dirstate of overwritten files must be forced to normal
  with kwexpand/kwshrink, not commit.
- recorded files must be weeded before overwriting.
- add test cases.
2010-10-24 15:11:41 +01:00
Martin Geisler
69d03175ae patchbomb: fix stray backslash in docstring
While both '\ ' and '\\ ' parse the same in Python, the difference
trips up hggettext so that it cannot find the docstring in the source
file and thus cannot write the right line number to i18n/hg.pot.

While the line number is not essential, it can be used to lookup the
original message.
2010-10-23 18:33:57 +02:00
Steve Borho
62fb9b2939 win32text: give deprecation warning
Users need to migrate to the EOL extension for various reasons.

Instructions for disabling the warning will be added to the
extension's wiki page.
2010-10-25 11:29:32 -05:00
Patrick Mezard
3fd83b5b68 hggettext: handle i18nfunctions declaration for docstrings translations 2010-10-24 12:52:37 +02:00
Patrick Mezard
bd120906a2 Fix and unify transplant and bookmarks revsets doc registration 2010-10-23 19:22:42 +02:00
Martin Geisler
f260637139 color: give hint to translators about untranslated keywords 2010-10-22 16:34:38 +02:00
Georg Brandl
13bd1daeb5 eol: add missing word in module docstring 2010-10-21 17:02:08 +02:00
Benoit Boissinot
94fe6278fb merge with stable 2010-10-20 23:48:33 +02:00
Benoit Boissinot
c6403d4ac6 patchbomb: hide passwords potentially embedded in urls 2010-10-20 23:39:48 +02:00
Erik Zielke
dd7e779d17 help: different section separators
Changes the characters used as section separators, so different ones
are used for module docstring and command docstring.

This is done because the section from the docstring will be at
different levels in the restructured text output, therefore
different symbols have to be used.
2010-10-19 13:39:34 +02:00
Wagner Bruna
ac73474eb7 mq: mark string for i18n 2010-10-20 12:29:55 -02:00