Commit Graph

15138 Commits

Author SHA1 Message Date
Idan Kamara
29b1c451dc cmdserver: copy repo.ui before running commands 2011-06-24 19:43:59 +03:00
Idan Kamara
c368cbab93 dispatch: set descriptors on the request repo.ui 2011-06-24 19:38:28 +03:00
Idan Kamara
22edb918b3 dispatch: pass the correct ui to runcommand
For commands that take a repo, repo.ui is passed as the ui to runcommand.
This restores that behaviour when the request has a repo.
2011-06-24 19:36:44 +03:00
Idan Kamara
446fde5f1b filemerge: use ui out descriptor when calling util.system 2011-06-24 17:04:37 +03:00
Idan Kamara
05ff7deb85 archive: wrap the ui descriptor so it doesn't get closed
archival.tarit closes the fileobj if one is passed to it, which is undesired
when reading from '-'.
2011-06-24 17:04:37 +03:00
Idan Kamara
dedd139496 transplant: use ui out descriptor when calling util.system 2011-06-24 19:27:53 +03:00
Idan Kamara
eb3fbf796f bisect: use ui out descriptor when calling util.system 2011-06-24 17:04:37 +03:00
Idan Kamara
09b97b7cff extdiff: use ui out descriptor when calling util.system 2011-06-24 17:04:37 +03:00
Idan Kamara
fce499faf1 ui: use ui out descriptor when calling util.system 2011-06-24 17:04:37 +03:00
David Golub
3605e62f7c call reposetup for repositories returned from peer (issue2864)
Extension setup functions were not being called when repositories were
obtained using the peer function instead of the repository function.
2011-06-24 11:39:12 -04:00
Mads Kiilerich
2c9adcac85 tests: solaris [ doesn't know -e 2011-06-25 01:55:16 +02:00
Mads Kiilerich
9013069b41 convert: fix git convert on solaris - it cannot remove environment variables 2011-06-25 01:55:15 +02:00
Mads Kiilerich
bd3c252aab tests: HGRCPATH must be exported after assignment
- at least on Solaris
2011-06-25 01:55:13 +02:00
Idan Kamara
73a82e0b84 backout of a52e14fe37fb: allow to qpop/push with a dirty working copy
The new behavior was breaking existing tools that relied on a sequence such as
this:

1) start with a dirty working copy
2) qimport some patch
3) try to qpush it
4) old behavior would fail at this point due to outstanding changes.
   (new behavior would only fail if the outstanding changes and the patches
   changes intersect)
5) innocent user qrefreshes, gets his local changes in the imported patch

It's worth considering if we can move this behavior to -f in the future.
2011-06-24 23:25:42 +03:00
Matt Mackall
d1d59ecc8a merge with stable 2011-06-24 13:35:03 -05:00
Idan Kamara
ff97debbbd dispatch: make sure unspecified global ui options don't override old values 2011-06-24 12:16:14 +03:00
Adrian Buehlmann
3ae6b61c82 update: do not use the term 'update' when mentioning reverting one file
and give a more precise hint for how to revert such a file

I'm using the term 'revision' instead of 'changeset' in this change to be
consistent with the REV we use in the synopsis.
2011-06-24 10:31:44 +02:00
Idan Kamara
f916e19611 cmdserver: fix read-loop string concatenation 2011-06-24 16:36:24 +03:00
Idan Kamara
848255e076 dispatch: check for None before closing repo
We were trying to call close() if repo == None and req.repo != None.
This can happen when running commands that don't take a repo.
2011-06-24 16:30:43 +03:00
Adrian Buehlmann
1d541dffa3 revert: mention update in hint of abort when reverting to non-parent
and explicitly warn about uncommitted changes

Examples:

BEFORE:

    $ hg par -q
    7:e81a2efd53d4
    $ hg revert -r 2
    abort: no files or directories specified
    (use --all to discard all changes)

AFTER:

  Clean working directory (revert can be easily undone, no edits to be lost):

    $ hg revert -r 2
    abort: no files or directories specified
    (use --all to revert all files, or 'hg update 2' to update)

  Uncommitted changes (revert --all *does* discard edits and is pretty hard to
  undo or even impossible if --no-backup is specified):

    $ hg revert -r 2
    abort: no files or directories specified
    (uncommitted changes, use --all to discard all changes, or 'hg update 2' to update)
2011-06-24 12:37:29 +02:00
Adrian Buehlmann
aff67e5bff update: clarify that update changes the parent revison 2011-06-24 10:51:05 +02:00
Alexander Sauta
66469a1e60 i18n-ru: glossary translated 2011-06-23 10:41:33 +04:00
Mads Kiilerich
ed0023acf6 revset: fix aliases with 0 or more than 2 parameters
The existing code seemed to have incorrect assumptions about how parameter
lists are represented by the parser.

Now the match and replace functions have been merged and simplified by using
getlist().
2011-06-22 01:55:00 +02:00
Peter Arrenbrecht
aa36fb062f match: fix bug caused by refactoring in fb457d08da0b 2011-06-23 14:40:57 +02:00
Adrian Buehlmann
c1d402dc5f revert: be more helpful on uncommitted merges
BEFORE:
   $ hg revert
   abort: no files or directories specified
   (use --all to discard all changes)

 AFTER:
   $ hg revert
   abort: no files or directories specified
   (uncommitted merge, use --all to discard all changes, or 'hg update -C .' to abort the merge)
2011-06-22 15:34:33 +02:00
Adrian Buehlmann
a6cb8dc613 opener: add self._audit (issue2862) 2011-06-22 10:13:44 +02:00
Idan Kamara
046eba79ef cmdserver: write the hello message as one chunk on the 'o' channel
This is a guaranteed by the protocol: clients know they need to read one chunk
off of the 'o' channel and treat that as the hello message.

They should ignore fields they don't recognize so they stay compatible with
new versions of the server in case we decide to add something.
2011-06-22 17:13:04 +03:00
Mads Kiilerich
1794513e71 fileset: copied takes no arguments 2011-06-24 01:10:35 +02:00
Mads Kiilerich
7cf147b1a4 revset and fileset: fix typos in parser error messages 2011-06-22 01:55:00 +02:00
Mads Kiilerich
9f3fc0b58e fileset: use ParseError pos field correctly
The pos field is intended to describe the position of the error - it should not
be used for other potentially interesting information.
2011-06-24 00:18:41 +02:00
Mads Kiilerich
8ef684c2fc revset: fix parameter name in implementation of follow() 2011-06-24 00:18:06 +02:00
Alexander Sauta
769eb93eae i18n-ru: tranlated docstrings from filesets added in 945925b53ee6 2011-06-22 02:47:03 +04:00
Alexander Sauta
9d449933a2 i18n-ru: translated help for extensions and filesets 2011-06-22 02:09:23 +04:00
Kevin Bullock
99e4d74da2 revert: be more explicit that changes are lost
BEFORE:
   $ hg revert
   abort: no files or directories specified
   (use --all to revert all files)

 AFTER:
   $ hg revert
   abort: no files or directories specified
   (use --all to discard all changes)
2011-06-20 22:15:52 -05:00
Idan Kamara
27964e7418 dispatch: do not close the request repo
Closing here means we've closed the repo passed to us in the request,
which is not our responsibility.

This is essential for bundlerepo, and possibly other localrepository
subclasses who do something in their close().
2011-06-21 17:08:21 +03:00
Idan Kamara
2a64fb6699 hook: write hook output to ui fout descriptor
output on stderr will also be written to ui.fout, unless sys.__stdout__
is passed in (see util.system), thus not changing previous behavior.

This fixes a bug where hooks run through the command server would mess up
with the command protocol, sending non-channeled data to the client.
2011-06-21 16:55:21 +03:00
Matt Mackall
f65681314b check-code: don't mark debug messages for translation 2011-06-21 15:21:57 -05:00
David Soria Parra
881ac28f17 i18n: remove translation of debug messages 2011-06-21 18:35:13 +02:00
Idan Kamara
29341e1294 cmdserver, runcommand: properly handle the client sending no arguments
No real reason for a client to do this, but still possible.

Previously if the client sent no arguments, a list with an empty string ['']
would be used as the arguments to dispatch, which would cause hg to complain
about an ambiguous command.

Instead, we simply check for no arguments and use an empty list instead (which
is equivalent to invoking hg with no args on the command line).
2011-06-21 15:38:10 +03:00
Idan Kamara
1d2537f10a cmdserver: don't raise EOFError when trying to read 0 bytes from the client 2011-06-21 15:13:39 +03:00
Wagner Bruna
52ee2c38d8 i18n: extract docstrings from fileset module 2011-06-20 19:08:41 -03:00
Martin Geisler
01ba8f6e18 Backed out changeset 48c996bf6ba4
Debug messages should not be translated.
2011-06-21 14:57:17 +02:00
David Soria Parra
81153f2f12 dispatch: translate alias debugging messages 2011-06-21 13:24:19 +02:00
Mads Kiilerich
473bcd3ed1 parsers: fix localization markup of parser errors 2011-06-21 00:17:52 +02:00
Alexander Sauta
21f29fbf6d i18n-ru: translated new config.txt 2011-06-21 01:49:45 +04:00
Wagner Bruna
4716731b52 i18n-pt_BR: synchronized with ff4a839f15e8 2011-06-27 13:50:31 -03:00
Wagner Bruna
6e3f89657d fileset: add i18n hints for keywords 2011-06-27 13:48:25 -03:00
Wagner Bruna
725282ab53 merge with i18n 2011-06-27 13:24:01 -03:00
Jens Bäckman
edf90cd791 18n-sv: translated all new fuzzy strings 2011-06-23 22:35:44 +02:00
Wagner Bruna
5148455617 i18n-pt_BR: synchronized with 94545c4a26d4 2011-06-20 19:24:50 -03:00