Commit Graph

7637 Commits

Author SHA1 Message Date
Idan Kamara
3910bf241e localrepo: don't attempt to open .hgtags twice if the error isn't ENOENT 2011-06-15 23:15:04 +03:00
Pierre-Yves David
d3dabeeb99 log: do not display hidden changeset
We add a --hidden option to display them.
2011-06-16 01:58:00 +02:00
Pierre-Yves David
2b4856c921 hidden: Add `hidden` method for context 2011-06-16 01:57:59 +02:00
Pierre-Yves David
7049209b6a hidden: Add a hiddenrevs attributes to changelog.
This attributes hold the set of all revisions that should be ommited by command
and tools displaying changesets.

This set is given as a hit. Command and tools are responsible to check it in
order to filter they outpur.

Code adding revisions to the set are responsible to the consistency of it's
data.
2011-06-16 01:57:53 +02:00
Matt Mackall
bf73994e3d config: handle comment lines in continuations (issue2854) 2011-06-16 13:24:44 -05:00
Matt Mackall
c96ac75208 http: report unexpected unparsable push responses (issue2777) 2011-06-16 13:24:42 -05:00
Idan Kamara
5e2d608efc dispatch: write shell alias output to ui out descriptor 2011-06-07 13:39:09 +03:00
Idan Kamara
71b4a06c3c commands: use ui descriptors when reading/writing from stdin/out 2011-06-08 14:54:52 +03:00
Idan Kamara
14ffa921d6 cmdutil: return a dummy, closable file object if it cannot be duped
If the ui I/O descriptors aren't real descriptors, they cannot be duped.

Instead, we return a wrapper object that behaves the same, and
can be closed (by overriding close and doing nothing).
2011-06-15 23:50:33 +03:00
Idan Kamara
936b803233 cmdutil: use ui descriptors in makefileobj 2011-06-08 14:54:52 +03:00
Idan Kamara
4f72223e4d cmdutil, logmessage: use ui.fin when reading from '-' 2011-06-08 14:54:52 +03:00
Wagner Bruna
acc5952bf3 dagutil: fix missing import of i18n._ 2011-06-15 17:04:06 -03:00
Martin Geisler
213ba1f97d manifest: use "\0" instead of "\000"
Though both give the same result (a NUL byte), I found that I tend to
read "\000" as "\0" + "00", which is something completely different.

I did not change the occurance of "\000" in archival.py since there
are other octal constants in that file.
2011-06-16 08:49:26 +02:00
Martin Geisler
0e27878c46 commands: add pointer to bookmarks command in branch help 2011-06-15 17:25:58 +02:00
Martin Geisler
d70abc7125 glossary: add entry for "Bookmark" 2011-06-15 17:10:26 +02:00
Martin Geisler
790be68aef glossary: add entry for "Tag" 2011-06-15 17:10:16 +02:00
Peter Arrenbrecht
9a2d2f747c setdiscovery: batch heads and known(ownheads)
This means that we now discover both subset conditions (local<remote and
remote<local) in a single roundtrip without ever constructing an actual
sample (which takes a bit of client CPU).
2011-06-14 22:58:00 +02:00
Peter Arrenbrecht
32dcc012d5 wireproto: make a number of commands batchable
Makes lookup, heads, known, branchmap, pushkey, and listkeys batchable.
It could, for instance, be interesting to use this to batch calls to
lookup when a pull or clone has multiple --rev arguments. The next patch
is going to batch heads and known to slightly tune discovery.
2011-06-14 22:56:20 +02:00
Peter Arrenbrecht
0e9696a634 wireproto: add batching support to wirerepository
Adds the plumbing and wire call for batched execution, but does not
batch-enable any methods yet.
2011-06-14 22:52:58 +02:00
Peter Arrenbrecht
9870a43596 wireproto: add basic command batching infrastructure
Note that localbatch will not be used until we actually have a localpeer to
use it with.
2011-06-14 22:51:26 +02:00
Idan Kamara
c2b2fe4489 dispatch: fix for-loop variable name 2011-06-14 20:25:38 +03:00
Stephen Thorne
8176bbbdf9 sslutil: Restore missing imports of socket and httplib to sslutil
Two imports were omitted in the restructure of the code creating
sslutil.py, socket and httplib are required when the 'ssl' module
cannot be imported, restoring these imports allows mercurial to run
on python2.4+2.5.
2011-06-14 13:31:32 +10:00
Idan Kamara
c08a096623 dispatch: assign I/O descriptors from the request to the ui 2011-06-08 14:54:47 +03:00
Idan Kamara
325f77da0a ui: use I/O descriptors internally
and as a result:
- fix webproto to redirect the ui descriptors instead of sys.stdout/err
- fix sshserver to use the ui descriptors
2011-06-08 01:39:20 +03:00
Idan Kamara
e05ad378b0 dispatch: add I/O descriptors to the request 2011-06-07 13:39:09 +03:00
Idan Kamara
d3e4ddd52a ui: add I/O descriptors 2011-06-07 13:39:09 +03:00
Patrick Mezard
fd8786d770 import: add --bypass option
This feature is more a way to test patching without a working directory than
something people asked about. Adding a --rev option to specify the parent patch
revision would make it a little more useful.

What this change introduces is patch.repobackend class which let patches be
applied against repository revisions. The caller must supply a filestore object
to receive patched content, which can be turned into a memctx with
patch.makememctx() helper.
2011-06-14 23:26:35 +02:00
Patrick Mezard
7350aaca49 import: separate parents selection from working dir update
This will be useful when patching without updating the dirstate
2011-06-14 23:24:40 +02:00
Patrick Mezard
9a9794b348 patch: extend filtestore to store an optional copy source
This will help wrapping filestores in memctx.
2011-06-14 23:24:34 +02:00
Martin Geisler
4ebded65b3 paper/coal: use fixed width for diffstat +/- link
The plus and minus characters are normally not the same width in a
non-monospace font, and this made the line length change when the
diffstat display was toggled.

The square brackets are not rendered in a monospace font to ensure
that they align with the parenthesis on the same line.
2011-06-14 16:38:34 +02:00
Martin Geisler
7e528c7c9a hg: rename opts argument to peeropts in clone
This should make it clearer that the options are used with remoteui
only and are not used otherwise in hg.clone.
2011-06-14 16:33:46 +02:00
Matt Mackall
f0bc90519a hg: move peerschemes back to schemes
This will avoid breaking things with extensions until peers are fully
separated from repos.
2011-06-13 16:25:18 -05:00
Matt Mackall
f241322d80 hg: rearrange peer scheme lookup
There is now only peer scheme lookup. Repository lookup goes through
peer scheme lookup. When peer and repo types are finally separated,
repo lookup will use peer.local() to get a repository object.

The underbar is dropped so that extensions can patch the table.
2011-06-13 14:53:23 -05:00
Idan Kamara
692ba2f2fc forget, remove: don't note on nonexistent file twice
before:
  $ hg forget foo
  foo: No such file or directory
  not removing foo: file is already untracked

after:
  $ hg forget foo
  foo: No such file or directory
2011-06-13 14:56:00 +03:00
Matt Mackall
abe73723fb localrepo: local() returns self
Temporary measure for introducing peers
2011-06-13 12:51:38 -05:00
Idan Kamara
b335d3e278 dispatch: propagate ui command options to the local ui (issue2523)
so the ui object passed to pre/post python hooks has the verbose flag
(and the rest) set correctly
2011-06-13 00:19:26 +03:00
Steven Brown
e159db2556 paper, coal: display diffstat on the changeset page
Displayed in a row of the changeset summary table, underneath the list of
files. When the page is loaded, only the diff summary is displayed. The full
diffstat is only displayed when the [+] link is selected.
2011-06-11 21:24:50 +08:00
Steven Brown
d6246b1341 web: provide diff summary to the changeset page
This is the same message displayed at the end of the "diff --stat" command.
For example, "9 files changed, 1651 insertions(+), 2 deletions(-)".

The webutil.diffstatgen function allows the diffstat data to be lazily
calculated only once and then re-used.
2011-06-11 21:11:43 +08:00
Matt Mackall
aa85ea1250 hg: split peer and repo lookup tables 2011-06-11 14:14:52 -05:00
Patrick Mezard
3680e66462 patch: generalize the use of patchmeta in applydiff()
- Add patchmeta.copy() and emit copies from iterhunks. Modifying patchmeta
  instances in applydiff() makes things simpler.
- Rename selectfile() into makepatchmeta(). It is responsible for creating
  patchmeta for regular patches.
- Pass patchmeta objects to patchfile() directly

patchmeta instances were associated with git patches, for regular patches we
had to pass additional variables to tell the patch intent to patchfile().
Instead, we generate patchmeta for regular patches and pass them. This will
also help with patch filtering by matcher objects.
2011-06-11 14:17:25 +02:00
Patrick Mezard
c72a5b0080 patch: stop updating changed files set in applydiff()
This information is more correctly returned by backends.

The extra updated file removed from test-mq-merge.t output came from changes
from git patches being counted before being really applied in some cases.
2011-06-11 14:14:13 +02:00
Patrick Mezard
6aaca90508 patch: turn patch() touched files dict into a set 2011-06-11 14:14:11 +02:00
Steven Brown
b11012fde3 paper, coal: define the diffstat templates
The templates output the filename, the total number of changes to the file
and a bar graph of the adds and removes. The filename is a link into the diff
output.

The diffstat is not yet displayed, but it can be manually added to the
changeset page template.
2011-06-09 01:19:39 +08:00
Steven Brown
d042b9d9a8 web: provide the file number to the diffstat templates
This allows the diffstat templates to link into the diff output. For example,
the URLs of the first three files within the diff are #l1.1, #l2.1, #l3.1.
2011-06-09 01:15:49 +08:00
Steven Brown
b9c161f1f5 web: include all files in the diffstat
The webutil.diffstat function now returns a diffstat template for each file
in the diff. It previously returned a template for each file returned by
ctx.files() which did not work well for merge changesets.
2011-06-09 01:14:22 +08:00
LUO Zheng
04c821e46b bookmarks: recognize the current bookmark when the local encoding isn't UTF-8
The current bookmark is stored in bookmark.current, supposingly in UTF-8.
But the call to encoding.fromlocal() is missing, therefore Hg is not able
to recognize the current bookmark in the case that bookmark uses
characters of which the bit stream is different between local encoding
and UTF-8.
For example, the Chinese version of Windows cmd uses gbk(cp936), not UTF-8.
Therefore I won't be able to make a Chinese bookmark current.

By wrapping mark in a encoding.fromlocal() call, the problem is solved.
2011-06-08 21:25:18 +08:00
Adrian Buehlmann
0ec050dc6d revert: is reverting file states, not just file contents
e.g. x bit is reverted as well

Also makes this paragraph more consistent with the preceding one,
which already uses the term "state" (not "content").
2011-06-09 18:39:14 +02:00
Matt Mackall
efecb99535 hg: change various repository() users to use peer() where appropriate
This gets all the easy cases (peers that aren't also used as repositories).
2011-06-10 11:43:38 -05:00
Matt Mackall
d049d4f6ce hg: have peer() call _lookup directly
Note that this means that peers no longer call the extension
repository setup hooks.
2011-06-10 11:43:38 -05:00
Matt Mackall
5f2e38a0df hg: add peer method 2011-06-10 11:43:38 -05:00