Commit Graph

3067 Commits

Author SHA1 Message Date
Matt Mackall
574616ca42 bookmarks: move color style to color 2011-02-10 13:46:28 -06:00
Matt Mackall
ca3d079172 bookmarks: merge _findtags method into core 2011-02-10 13:46:28 -06:00
Matt Mackall
018d171646 bookmarks: move revset support to core 2011-02-10 13:46:28 -06:00
Matt Mackall
89896dbd54 bookmarks: merge invalidation into core 2011-02-10 13:46:27 -06:00
Matt Mackall
0dfef4c009 bookmarks: move commit action into core 2011-02-10 13:46:27 -06:00
Matt Mackall
77f373813e bookmarks: merge rollback support into localrepo 2011-02-10 13:46:27 -06:00
Matt Mackall
6e122bd621 bookmarks: move property methods into localrepo 2011-02-10 13:46:27 -06:00
Matt Mackall
1b243d934f bookmarks: move diff to core 2011-02-10 13:46:27 -06:00
Matt Mackall
3d6c8e8713 bookmarks: move pushkey functions into core 2011-02-10 13:46:27 -06:00
Matt Mackall
2580f39614 bookmarks: move update into core 2011-02-10 13:46:27 -06:00
Matt Mackall
7b71e510e5 bookmarks: move read methods to core 2011-02-10 13:46:27 -06:00
Matt Mackall
0506b0dd9c bookmarks: move basic io to core 2011-02-10 13:46:27 -06:00
Javi Merino
71b8e54360 win32mbcs: Fix typo in documentation
extention -> extension
2011-02-01 07:29:11 +00:00
David Soria Parra
a4bbbca72d bookmarks: respect rollbacks dryrun parameter 2011-01-27 02:58:48 +01:00
David Soria Parra
e5aec633d1 bookmarks: always write undo file
Always write the undo file. Otherwise, rollback will not work for
the initial bookmark as undo.bookmarks doesn't exists. In this case
undo.bookmarks needs already be empty.
2011-01-27 02:55:11 +01:00
Patrick Mezard
15ac0306ee Merge with stable 2011-02-01 21:59:07 +01:00
Patrick Mezard
7700d1350b mq: factor out push conditions checks
Some extensions (e.g. hgsubversion) completely override push command. Because
extensions load order is unspecified, if hgsubversion loads before mq, mq
checks about not pushing applied patches will be bypassed. Short of finding a
way to fix load order, extracting the checking logic will allow
hgsubversion-like extensions to run the check themselves.
2011-01-31 22:16:33 +01:00
Matt Mackall
38d53c9ddd merge with stable 2011-01-27 17:22:37 -06:00
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
Matt Mackall
bf126992e1 merge with stable 2011-05-03 22:04:23 -05:00
Matt Mackall
f3854e5d82 hgext: fixup a couple missed file().read() instances 2011-05-03 21:53:13 -05:00
timeless
925cd8ddf7 convert: fix error in git solaris code 2011-05-01 18:57:11 +02:00
timeless
4f44952021 remove unused variables 2011-05-01 17:20:40 +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
Peter Arrenbrecht
66c54cef75 bundlerepo: fix and improve getremotechanges
Fixes the regression where incoming could show local changes
introduced by rev eecf03f0ef7c.
2011-05-02 12:36:23 +02:00
Sune Foldager
f3630ec41e merge with mpm 2011-05-01 19:44:28 +02:00
Mads Kiilerich
32994f27cc convert: handle invalid subversion source paths 2011-05-01 17:35:05 +02:00
Mads Kiilerich
6688bea829 convert: also catch missing revlogs when introduced in repo roots
The previous behaviour was almost as if convert.hg.ignoreerrors was always set
for revisions without parents, except that errors were silently ignored. Revlog
errors are handled as a side effect of getcopies(), but getcopies() was only
called when convert.hg.ignoreerrors was set.

Now we always call self.getcopies for root revisions, not only when
convert.hg.ignoreerrors is set, just like we do on all other revisions.
The extra call might be a bit expensive, but the proper fix for that would be
to catch these errors in another way.
2011-05-01 17:34:16 +02:00
Dan Villiom Podlaski Christiansen
261e0642d3 color: fix using multiple effects 2011-05-01 16:54:48 +02:00
timeless
ab34ee7694 remove unused imports 2011-05-01 15:21:57 +02:00
Patrick Mezard
ebc1f0434a graphlog: always sort revisions topologically
The grapher cannot really handled revisions if they are not emitted in
topological order. The previous 'reverse()' revset was not enough to achieve
that and was replaced by an explicit sort call for simplicity. The --limit
option is now also handled as usual with cmdutil.loglimit() instead of a
'limit' revset.
2011-05-01 15:51:52 +02:00
Patrick Mezard
399c49e7c9 graphlog: take the union of --rev specs instead of the intersection 2011-05-01 15:51:48 +02:00
Patrick Mezard
aaafe977fe graphlog: display nodes with more than 2 predecessors
While nodes with more than 2 parents do not exist in revision graphs, they do
appear when you transform them by removing subgraphs while trying to preserve
ancestry links.

This code was borrowed from Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
pbranch extension.
2011-05-01 15:51:20 +02:00
Matt Mackall
e941b69730 merge with stable 2011-05-01 06:06:59 -05:00
Brodie Rao
5a336c7b00 color: use ui.formatted() to test TTYness, not sys.stdout.isatty()
This fixes the color extension not working with pager (broken in
cab5f9b68e3a). The pager extension already sets ui.formatted=True to
allow this use case.
2011-05-01 12:14:22 +02:00
Augie Fackler
720e112a65 color: verify stdout is a tty before using curses
Without this change, curses complains when invoked in certain contexts
because stdout isn't a tty (such as emacs integration) but we ask it
to check for various bits of information from terminfo.
2011-04-30 11:18:43 -05:00
Patrick Mezard
57542c9154 graphlog: log -G --follow file does not work, forbid it
We do not have revsets to follow file history.
2011-04-30 19:42:00 +02:00
Patrick Mezard
f59a4cb18e graphlog: unify log -G revset translation 2011-04-30 19:42:00 +02:00
Patrick Mezard
305ae5565a graphlog: fix log -G --prune
follow() revset really means '::.' while we want something based on the passed
argument. Also, ancestors() revset does not include the parent revisions.
2011-04-30 19:42:00 +02:00
Patrick Mezard
3c82515646 graphlog: escape log -G single value option arguments 2011-04-30 19:42:00 +02:00
Patrick Mezard
eec16f919e graphlog: fix log -G --removed
Current version was mispelled and processed like a valued argument.
2011-04-30 19:42:00 +02:00
Patrick Mezard
caf334a147 graphlog: fix log -G option types when translating to revset
For instance, --keyword is a multiple value option while it was processed as a
single value option.
2011-04-30 19:42:00 +02:00
Kevin Gessner
bf8c80ca9d extensions: obsolete and remove parentrevspec extension
As of 48639b58ef80, revsets implements the ^ and ~ operators that this
extension provides, so it's no longer necessary.
2011-04-30 18:27:39 +02:00
Brodie Rao
b7f0d2a103 url: move URL parsing functions into util to improve startup time
The introduction of the new URL parsing code has created a startup
time regression. This is mainly due to the use of url.hasscheme() in
the ui class. It ends up importing many libraries that the url module
requires.

This fix helps marginally, but if we can get rid of the urllib import
in the URL parser all together, startup time will go back to normal.

perfstartup time before the URL refactoring (707e4b1e8064):

! wall 0.050692 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)

current startup time (9ad1dce9e7f4):

! wall 0.070685 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)

after this change:

! wall 0.064667 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)
2011-04-30 09:43:20 -07:00
Peter Arrenbrecht
b867e650e6 discovery: drop findoutgoing and simplify findcommonincoming's api
This is a long desired cleanup and paves the way for new discovery.
To specify subsets for bundling changes, all code should use the heads
of the desired subset ("heads") and the heads of the common subset
("common") to be excluded from the bundled set. These can be used
revlog.findmissing instead of revlog.nodesbetween.

This fixes an actual bug exposed by the change in test-bundle-r.t
where we try to bundle a changeset while specifying that said changeset
is to be assumed already present in the target. This used to still
bundle the changeset. It no longer does. This is similar to the bugs
fixed by the recent switch to heads/common for incoming/pull.
2011-04-30 17:21:37 +02:00
Augie Fackler
9398f9dfcc Zeroconf: catch both ValueError and KeyError in get()
This prevents a traceback during discovery of available hosts.
2011-04-30 07:30:38 -05:00
Idan Kamara
6862ebb98f mq: be more explicit on invalid patch name message 2011-04-29 22:21:13 +03:00
Matt Mackall
3b61150db3 merge with stable 2011-04-30 03:44:31 -05: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
Alexander Solovyov
f4250e8e9c graphlog: make use of graphmod's revset support 2011-04-23 15:04:15 +02:00
Alexander Solovyov
517dbf068d graphmod: use revsets internally
Thanks for the idea and most of the implementation to Klaus Koch

Backs revisions() and filerevs() with DAG walker which can iterate through
arbitrary list of revisions instead of strict one by one iteration from start to
stop. When a gap occurs in a revisions (i.e. in file log), the next topological
parent within the revset is searched and the connection to it is printed in the
ascii graph.

File graph can draw sometimes more connections than previous version, because
graph is produced according to the revset, not according to a file's filelog.

In case the graph contains several branches where the left parent is null, the
graphs for each are printed sequentially, not in parallel as it was a case
earlier (see for example the graph for README in hg-dev).
2011-03-13 15:53:38 +01:00
Alexander Solovyov
7a9d95a376 churn: strip key earlier to avoid false negative seach in aliases 2011-04-29 16:34:52 +02:00
Patrick Mezard
5457fb5aec strip: make it clear that --force discards changes (issue310) 2011-04-29 14:56:23 +02:00
Thomas Arendsen Hein
e6dcc5994e merge with stable 2011-04-29 11:10:11 +02:00
Pierre-Yves David
7b3f2de931 mq: prevent traceback when qfinish patches not in series.
When mq status entry referencing a patches that is not in series  `hg qfinish
-a` used to issue a traceback. This states is inconsistent but might happen
regularly when people misuse hg up -mq.

This changeset prevent hg from crashing. The faulty entry is finished anyway and
a warning is issued.
2011-04-25 14:03:12 +02:00
Patrick Mezard
44388c0fa1 color: code simplification 2011-04-24 23:06:19 +02:00
Danek Duvall
e826f21afa color: add support for terminfo-based attributes and color
Using terminfo instead of hard-coding ECMA-48 control sequences provides a
greater assurance that the terminal codes are correct for the current
terminal type; not everything supports the ANSI escape codes.

It also allows us to use a wider range of colors when a terminal emulator
supports it (such as 16- or 256-color xterm), and a few more non-color
attributes, such as the ever-popular blink.
2011-04-21 13:47:45 -07:00
Adrian Buehlmann
f3e8eae526 move canonpath from util to scmutil 2011-04-20 21:41:41 +02:00
Adrian Buehlmann
cf126bb7dd move opener from util to scmutil 2011-04-20 19:54:57 +02:00
Patrick Mezard
e29463618b merge with stable 2011-04-20 23:30:07 +02:00
timeless
ccf3a292e9 qrecord: provide help when mq is not enabled 2011-04-14 10:00:15 +02:00
Matt Mackall
24e0621116 zeroconf: clean up naked exceptions 2011-04-13 12:57:24 -05:00
Idan Kamara
35892dd390 color: reset win32 console color in a finally block 2011-04-09 23:53:23 +03:00
Martin Geisler
3c1a708683 relink: correct unusual indentation 2011-04-06 15:26:49 +02:00
Jim Hague
80a125d068 bugzilla: more documentation formatting fixups
Correct typo in numbering list of access methods.
Convert a section reference and a template parameter reference into
literal text, for consistency with other use.
2011-04-06 11:30:08 +01:00
Martin Geisler
722384a5f7 keyword: convert a verbatim block to a field list 2011-04-05 11:07:25 +02:00
Martin Geisler
9dfcd73e5b bugzilla: convert a verbatim block to a field list 2011-04-05 10:22:58 +02:00
Martin Geisler
3d9f5b0e1f bugzilla: fix reST error introduced in a2e32837d8f5
All blocks must be indented. Here we can use a field list instead of a
verbatim block for a real list layout.
2011-04-05 10:20:59 +02:00
Matt Mackall
5f931d4fe0 rebase: drop ancestor import 2011-04-04 23:14:03 -05:00
Matt Mackall
48c909e2e5 rebase: drop unused p2 arg from rebasenode 2011-04-04 16:58:24 -05:00
Matt Mackall
a8dd64dcb0 misc: replace .parents()[0] with p1() 2011-04-04 16:21:59 -05:00
Matt Mackall
4398be1ead rebase: use merge's ancestor parameter 2011-04-04 15:30:54 -05:00
Jim Hague
65534172e2 bugzilla: more documentation fixes
Correct formatting of the possible values of bugzilla.version.
Fix typo and polish XMLRPC/email mode description.
2011-04-04 17:37:18 +01:00
Jim Hague
3be6a4e3fe bugzilla: correct sample configurations
Use consistent sample domains and wording in all configuration examples.

Add missing template and strip parameters to XMLRPC examples and correct
Bugzilla URL key in XMLRPC+email.
2011-04-04 13:31:37 +01:00
Stefano Tortarolo
85a97bc519 rebase: add --tool argument for specifying merge tool 2011-04-02 11:07:05 +02:00
Patrick Mezard
964b307b71 bugzilla: fix documentation typo 2011-04-01 20:40:27 +02:00
Martin Geisler
d8a6341a37 bugzilla: fix bad reST markup
The indented second line turned the first line into a description
header.
2011-04-01 12:30:40 +02:00
Martin Geisler
8cb176c788 bugzilla: markup literal text as such 2011-04-01 12:27:12 +02:00
Martin Geisler
7ec188ab1d merge with stable 2011-04-01 12:21:59 +02:00
Martin Geisler
0d1109205c bugzilla: refer to hgrc(5) man page with normal notation 2011-04-01 12:09:11 +02:00
Martin Geisler
459fedb4ee bugzilla: markup section names as literal text 2011-04-01 12:07:37 +02:00
Martin Geisler
f9635687a7 bugzilla: show usermap syntax more clearly 2011-04-01 12:05:19 +02:00
Martin Geisler
c285f18e77 bugzilla: use standard section.name notation 2011-04-01 12:03:23 +02:00
Martin Geisler
36682a123f bugzilla: prefix each config option with section 2011-04-01 12:00:57 +02:00
Martin Geisler
584b9eaf34 bugzilla: fix reStructuredText errors introduced in 4e52d7534ab2 2011-04-01 11:59:18 +02:00
Matt Mackall
d0ca936e58 url: nuke some newly-introduced underbars in identifiers 2011-03-31 10:43:53 -05:00
Brodie Rao
475e3772da schemes: prevent one letter schemes from being interpreted as drive letters
To allow one letter schemes, this makes the extension override
url.has_drive_letter() to return False for any schemes defined.

On Windows, the extension will raise util.Abort for any schemes that
conflict with existing drive letters.
2011-03-30 20:01:47 -07:00
Jim Hague
aee30b7a2e bugzilla: add modified XMLRPC mode that uses email to send bug comments.
If Bugzilla has its email interface configured, an email can be used
to update bugs. If the From: address in the email matches a valid user
email, Bugzillas make the update as that user. So comments attached to a
bug appear under the name of the user making the change, and the user
does not receive email about the change, exactly as if they had made
the change via the web interface.

So add a modified XMLRPC mode that uses email to modify bugs. The format
of the mails is documented in the Bugzilla email_in.pl specification.
Briefly, initial non-blank lines in the message body starting
'@<field> = <value> modify bug fields. A blank line signals the end of
the command lines, and the rest of the message is used as bug comment.

Invoke the same Mercurial user to Bugzilla user email mapping
currently used in the MySQL mode.

All other processing - checking the bug numbers, checking user ids, etc.
continues to be done via XMLRPC.
2011-03-30 09:49:45 +01:00
Jim Hague
50d39b606d bugzilla: add XMLRPC interface.
Add support for access to Bugzilla via the XMLRPC interface.

This requires a single username and password used to log in to Bugzilla,
plus the URL of the Bugzilla installation. Commit messages are added to
bugs as before, but security only permits them to be added as the
username used to log in.
2011-03-30 09:49:45 +01:00
Jim Hague
86c71c3e2f bugzilla: localise all MySQL direct access inside access class.
Prepare for the addition of other Bugzilla access methods by localising
direct MySQL database access inside an access class.

Provide a base access class largely to document the methods required for
a class implementing a particular access method.

Rename the 'bugzilla_<version>' classes to 'bzmysql_<version>' to
emphasise that they are doing access via direct manipulation of a
MySQL database.
2011-03-30 09:49:45 +01:00
Jim Hague
2813d6b869 bugzilla: keep bug IDs in set.
Bug IDs are collected into a set, and then silently converted in
filter_real_bug_ids() into a list. For consistency, keep them in
a set throughout and update the docstrings to say that.
2011-03-30 09:49:45 +01:00
Jim Hague
e369f66c45 bugzilla: rename filter_unknown_bug_ids to reflect its actual purpose.
The method really removes from the list of bugs any that already have
comment text referencing the changeset in question. Rename it to
filter_cset_known_bug_ids().
2011-03-30 09:49:45 +01:00
Martin Geisler
0b9696bd15 merge with stable 2011-03-29 16:25:48 +02:00
Daniel Atallah
54e55b4dbb convert/mtn: Fix conversion of large files from mtn (broken in 64963df7238d)
"mtn automate stdio" will break output larger than 32kB into several packets.
This ensures that we are processing all the output on the main stream and not
only the last packet.
2011-03-28 23:16:20 -04:00
Brendan Cully
f05749f48c Fix transplant error message to correspond with test 2011-03-28 21:36:29 -07:00
Luke Plant
bd1d8463c8 transplant: fix crash if filter script munges log file
This fixes an UnboundLocalError crash if the filter script removes the
'User' or 'Date' lines from the log file.
2011-03-28 21:17:32 +01:00
Daniel Atallah
e07af26e9b convert/mtn: convert suspended branches as closed branches
Monotone treats branch closing ("suspending") in a similar manner to how we do
in mercurial - a cert is added to a revision that marks the branch to be hidden.
If a subsequent commit is made, the branch is effectively reopened.
2011-03-25 15:49:43 -04:00
Stefano Tortarolo
c32fbcbea1 rebase: don't mark file as removed if missing in parent's manifest (issue2725) 2011-03-27 13:34:20 +02:00
Martin Geisler
73d96c7696 ui: label prompts, default to yellow prompts 2011-03-27 12:59:25 +02:00
Martin Geisler
b69ebeba05 record: replace poor man's if-statement with real if-statement 2011-03-27 12:41:55 +02:00
Stefano Tortarolo
fc18863354 rebase: restore mq guards after rebasing (issue2107)
Guards on rebased mq patches were lost.
This patch restores them after the qimporting step.
2011-03-26 13:05:17 +01:00
Daniel Atallah
76c70d873a convert/mtn: avoid unnecessary initial test of mtn repo
As soon as before() is called, we'll know if there is a problem (and get a
better error message).
2011-03-25 10:13:46 -04:00
Daniel Atallah
3b1242e5b1 convert/mtn: add support for using monotone's "automate stdio" when available
Currently the convert extension spawns a new mtn process for each
operation. For a large repository, this ends up being hundreds of
thousands of processes. The following enables usage of monotone's
"automate stdio" functionality - documented at:

http://www.monotone.ca/docs/Automation.html#index-mtn-automate-stdio-188

The effect is that (after determining that a new enough mtn executable
is available) a single long-running mtn process is used for all the
operations, using stdin/stdout to send commands and read output.

This has a pretty significant effect on the performance of some parts
of the conversion process.
2011-03-23 14:26:56 -04:00
Daniel Atallah
066e208063 convert: add support to common commandline to access stdin of the process 2011-03-24 16:54:09 -04: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
Edouard Gomez
4503be63c2 convert: add bookmark support to hg source 2011-03-25 01:38:47 +01:00
Edouard Gomez
4060d3d548 convert: add bookmarks reading support to git backend 2011-03-25 01:38:43 +01: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