Commit Graph

3614 Commits

Author SHA1 Message Date
Patrick Mezard
546816cafd graphlog: make functions private, fix names 2012-07-11 17:10:21 +02:00
Patrick Mezard
d7b241c3e7 graphlog: remove unused get_revs() function 2012-07-11 17:05:20 +02:00
Na'Tosha Bard
7bf5bfedef largefiles: optimize status by synchronizing lfdirstate with the largefile on update
This speeds up status on a largefiles repo by synchronizing the largefiles dirstate to the
largefile's mtime upon update, preventing the files from coming back as "unsure" later,
requiring a check of the SHA1 sum.
2012-07-13 14:49:16 +02:00
FUJIWARA Katsunori
54911ad11a mq: check subrepo synchronizations against parent of workdir or other appropriate context
Before this patch, MQ checks each subrepo synchronizations against the
working directory context, so ".hgsubstate" updating is not imported
into MQ revision correctly in cases below:

  - qrefresh when current ".hgsubstate" is already synchronized with
    each subrepos: you can reproduce this easily by just twice or more
    qrefresh invocations

  - qnew just after rollback of commit which updates ".hgsubstate"

This patch resolves this by checking subrepo states against:

  - the parent of "qtop" for qrefresh, or
  - the parent of working context otherwise
2012-06-27 22:03:27 +09:00
FUJIWARA Katsunori
8ecc1d9d04 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
Even though the committed revision contains diff of ".hgsubstate", the
patch file created by qrefresh doesn't contain it, because:

  - ".hgsubstate" is not listed up as one of target files of the patch
    for reasons below, so diff of ".hgsubstate" is not imported into
    patch file

      - status of ".hgsubstate" in working directory is usually "clean"
      - ".hgsubstate" is not specified explicitly by users

  - the patch file is created before commit processing which updates
    or creates ".hgsubstate" automatically, so there is no diff for it
    at that time

This patch resolves this problem by:

  - putting ".hgsubstate" into target list of the patch, if needed:
    this allows "patch.diff()" to import diff of ".hgsubstate" into
    patch file.

  - creating the patch file after commit processing:
    this updates ".hgsubstate" before "patch.diff()" invocation.

For the former fixing, this patch introduces "putsubstate2changes()"
to share same implementation with qnew. This is invoked only once per
qnew/qrefresh at most, so there is less performance impact.

This patch also omits "match" argument for "patch.diff()" invocation,
because "patch.diff()" ignores "match" if "changes" is specified.
2012-06-27 22:03:27 +09:00
FUJIWARA Katsunori
fba032044a mq: add ".hgsubstate" to patch target list only if it is not listed up yet
If ".hgsubstate" is already listed up as one of commit targets, qnew
put diff of ".hgsubstate" twice into the patch file stored under
".hg/patches".

It causes rejections at applying such patches.

Other than the case like in added test script, this can also occur
when qnew is executed just after rolling back the committing updated
".hgsubstate".

This patch checks whether ".hgsubstate" is already listed up as one of
commit targets, and put it into the appropriate list only if it is not
listed up yet.
2012-06-27 22:03:22 +09:00
Adrian Buehlmann
92055c96e6 histedit: use cmdutil.command decorator 2012-07-06 22:43:10 +02:00
Augie Fackler
0b10b5edb8 histedit: add extension docstring from external README
Made a couple of tweaks to try and fit better with the hg docstring
style and fix up some ReST errors in the README.
2012-07-06 12:17:53 -05:00
Augie Fackler
39b1dce60e histedit: don't crash if the result of fixing up a fold is empty 2012-07-06 11:39:02 -05:00
Augie Fackler
3b175c50a8 histedit: replace hexshort lambda with node.short 2012-07-06 11:06:57 -05:00
Na'Tosha Bard
1ffeefa9fa largefiles: batch statlfile requests when pushing a largefiles repo (issue3386)
This implements a part of issue 3386.  It batches the request for the status of
all largefiles in the revisions that are about to be pushed into a single
request, instead of doing N separate requests.

In a real world test case, this change was verified to save 1,116 round-trips to
the server.  It only requires a client-side change; it is backwards-compatible
with an older version of the server.
2012-06-24 20:36:22 +02:00
Mads Kiilerich
c60c80f534 graphlog: don't truncate template value at last \n
Most uses of templates requires a trailing newline to get vertical output.

Graphlog with a template without trailing newline did however not just create
horisontal output like other commands would but truncated the output at the
last \n. Template values without any \n were ignored completely.

Graphlog will now only eat one trailing newline before it lets the flow of the
graph add the necessary vertical space.
2012-07-06 00:30:18 +02:00
Pierre-Yves David
2fc08a6030 graphlog: display obsolete changeset as "x"
Changeset detected as obsolete will be displayed as "x" instead of 'o':

    o new rewritten changeset
    |
    | x old obsolete changeset
    |/
    |
    o base

This will be useful even when some obsolete changeset will be "hidden" because
not all obsolete changeset can be hidden. If an obsolete changeset have
non-obsolete descendant we can't simply hide it. And having a clear visual hint
that the changeset is obsolete is useful.

The main reason to make this minor change right now is to:

1) introduce an officiel user of the `ctx.obsolete()` method that will detect
   breakage earlier than third party code (mutable, hgview)

2) Do not display any vocabulary related to obsolete. Such vocabulary will
   require discussion.
2012-07-04 17:29:49 +02:00
Matt Harbison
63a46b018b subrepo: propagate matcher to subrepos when archiving
Add a match object to subrepo.archive(). This will allow the -X and -I
options to be honored inside subrepos when archiving. They formerly
only affect the top level repo.
2012-06-16 22:34:06 -04:00
Matt Harbison
218655984d largefiles: remove a standin check that could never be true 2012-06-18 22:45:21 -04:00
Matt Harbison
c16332f051 largefiles: fix the directory structure when archiving a subrepo in a subrepo
Previously, a repo consisting of main/sub/subsub archived sub and subsub as
siblings under main.
2012-06-18 23:02:51 -04:00
Matt Harbison
bf6dae387d largefiles: fix a traceback when archiving a subrepo in a subrepo
This regression was introduced in 310edb24b71f.
2012-06-17 21:57:48 -04:00
Patrick Mezard
e029e6740d convert: keep branch switching merges with ancestors (issue3340)
When running convert with a filemap, merge parents which are ancestors
of other parents are ignored. This is hardly a problem when parents
belong to the same branch, but the result could be confusing when named
branches are involved. With:

  -o-a1-a2-a3...     <- A
    \           \
     b1-b2-b3...-m-  <- B

If all b* revisions are discarded, it is useful to preserve 'm' even if
it is empty after filtering to record the branch switch.

This patch makes filemap preserve "ancestor parents" if there is no
"non-ancestor parent" on the same branch than the merge revision.

Remarks:
- I am not completely convinced by the reasons given above and those
  detailed by Matt in this thread:

http://selenic.com/pipermail/mercurial-devel/2012-May/040627.html

  The properties we try to preserve are not clearly defined. That said,
  I know this patch already helped someone on IRC and the tests output
  look reasonable.

- This is a new version of the original "convert: filemap must preserve
  fast-forward merges" patch. It has exactly the same output for 2
  parents merges, the additional complexity is here to handle more than
  two parents.
2012-06-18 18:19:28 +02:00
Matt Harbison
79530484c8 mq: defer command wrapping to extsetup (API)
mq wraps all commands that are not in commands.norepo, which is now performed in
this second phase of the extensions setup process.  This goes against the
current best practices on the wiki [1] as far as where command wrapping is
performed, but follows it regarding where global options are injected.

mq needs to be the first layer called when command dispatching in order to
consistently retarget to the patch repo, regardless of the load order of the
extensions.  This means being the last to wrap the command table.  Previously,
'hg <extdiff> --mq' would diff the main repo unless mq was enabled after
extdiff.

[1] http://mercurial.selenic.com/wiki/WritingExtensions
2012-06-08 23:27:59 -04:00
Matt Mackall
f52103b924 merge with stable 2012-07-01 21:20:30 -05:00
Matt Mackall
921065f3f8 record: fix display of non-ASCII names
spotted by Nikolaj Sjujskij
2012-07-01 13:10:54 -05:00
Mads Kiilerich
7c32277ff3 histedit: use stable iteration order for processing bookmarks
Random dict iteration order caused test failure in
test-histedit-bookmark-motion.t.
2012-06-30 03:34:41 +02:00
Augie Fackler
a0a7fde1c9 histedit: mark as a first party extension 2012-06-28 08:45:38 -05:00
Augie Fackler
99e113bc35 histedit: remove use of reduce() builtin spotted by check-code 2012-06-27 18:42:48 -05:00
Augie Fackler
8f661724bc histedit: fix most check-code violations 2012-06-27 18:35:33 -05:00
Augie Fackler
526a183684 histedit: new extension for interactive history editing 2012-06-27 17:52:54 -05:00
Matt Mackall
61aa1f42b8 merge with stable 2012-06-29 00:40:52 -05:00
Christian Ebert
01fcbdd680 keyword: use ui.formatter for kwfiles output 2012-06-28 15:06:41 +01:00
Pierre-Yves David
49188ab1f7 strip: update help to state than you can strip public changeset
Multiple people have been confused by it.
2012-06-28 18:39:16 +02:00
David Schleimer
de4c701f51 bookmarks: correctly update current bookmarks on rebase (issue2277)
When you rebased with a currently active bookmark, that bookmark would
always point at the new tip, regardless of what revision it pointed at
before the rebase.

All bookmarks will now point at the equivalent post-rebase commit.
However, the currently active bookmark will cease to be active unless
it points at the new tip post-rebase.  Rebase will always leave the
new tip as the working copy parent, which is incompatible with having
an active bookmark that points at some other revision.  The common
case should be that the active bookmark will point at the new tip
post-rebase.
2012-06-22 11:40:31 -07:00
Mads Kiilerich
278667f10c convert: check for failed svn import in debugsvnlog and abort cleanly
'hg debugsvnlog' failed with a crash when using the uninitialized transport in
get_log_child if the import of the svn libraries had failed.

'convert' should never get as far as launching 'hg debugsvnlog' if the svn
libraries are missing, but by launching a subprocess there is risk that the
environment is mangled so the second import fails.

It is in principle also possible to launch the command manually.
2012-06-29 01:51:48 +02:00
Mads Kiilerich
37140b89be convert: accept Subversion 'file:///c%3A/svnrepo' syntax on Windows
Subversion can handle ':' quoted as '%3A' but urllib.url2pathname can't and
Mercurial thus rejected some valid subversions URLs.

This particular case will now be handled by some preprocessing before handing
it over to urllib.url2pathname.

This is tested by a0c992a723f9 when test-convert-svn-source.t and
test-convert-svn-move.t can be run on Windows.
2012-06-28 03:41:37 +02:00
Mads Kiilerich
f9f38dc7f8 convert: ignore svn:executable for subversion targets without exec bit support
Calling propset/propdel with subversion 1.6 on FAT gave
  abort: svn exited with status 256
and made test-convert-hg-svn.t and test-convert-svn-sink.t fail. 1.7 worked.

This is a rework of 5ba59c098f03 but ignores the executable bit when it isn't
supported instead of using an approximation.
2012-06-24 17:06:47 +02:00
Matt Mackall
36aa7282e4 merge with crew 2012-06-21 17:37:02 -05:00
Martin Geisler
d22efb8f52 merge with stable 2012-06-21 15:10:01 +02:00
Thomas Arendsen Hein
0e93bb1709 consistency: use REV instead of REVISION 2012-06-20 16:49:04 +02:00
Thomas Arendsen Hein
a0b2b2d9c7 strip: add optional -r to synopsis 2012-06-20 16:44:21 +02:00
Thomas Arendsen Hein
833af3cb43 qimport: use [FILE]... because if -r is used no file is needed 2012-06-20 16:43:09 +02:00
Thomas Arendsen Hein
9e0f26649a mq: abort if no files or revisions are specified for qimport 2012-06-20 16:22:58 +02:00
Dan Villiom Podlaski Christiansen
4bc99faa5e rebase: improve error message on improper phases
The previous error message had two issues: The first issue was that it
wasn't, in fact, an error but a warning, even though it described a
fatal error condition preventing the successful completion of the
command. The second was that it didn't mention the immutable
changesets, leaving the user guessing at the true cause of the error.

The main downside to this change is that we now get an 'abort: can't
abort...' message which technically contradicts itself. In this case,
I blame that on the two uses we have for the word; if it weren't for
backwards compatibility, we could make util.Abort print out 'error:
<whatever>'.
2012-06-18 11:16:24 +02:00
Elifarley Callado Coelho Cruz
6010752603 acl: user docs for the "!" prefix in user or group names 2012-05-30 21:47:51 -03:00
David Champion
fe8fba0ab7 notify: various fixes to docstring
Typo corrections, grammar adjustments, clarity improvements.
2012-05-29 07:07:10 -05:00
Jim Hague
1b46810a77 bugzilla: stop bugs always being marked as fixed in xmlrpc (issue3484)
Bugs should only be marked fixed if the comment parser gives them the
fixed state. xmlrpc+email got this right, xmlrpc screwed it up.
2012-06-06 16:44:17 +01:00
Elifarley Callado Coelho Cruz
589d45cced acl: use of "!" prefix in user or group names
The "!" prefix allows you to prevent anyone except a given user or group to push
changesets in a given branch or path.

This patch enables a use case suggested by a user (Julien Bonnet):
There's a branch that only a given user (or group) should be able to push to,
and you don't want to restrict access to any other branch that may be created.

With the "!" prefix, you simply deny access to "!givenuser" (or "!@givengroup").
2012-05-28 19:45:15 -03:00
Martin Geisler
f92437e97c merge with stable 2012-06-13 20:14:28 +02:00
Martin Geisler
78f77d335e win32text: lowercase warning message 2012-06-12 14:18:18 +02:00
Martin Geisler
cae2421779 patchbomb: lowercase status messages 2012-06-12 14:18:18 +02:00
Martin Geisler
a987a9f256 purge: lowercase messages 2012-06-12 14:18:18 +02:00
Martin Geisler
456b1eff3c mq: lowercase warning messages 2012-06-12 14:18:18 +02:00
Martin Geisler
643b04fbb7 largefiles: lowercase messages 2012-06-12 14:18:18 +02:00