Commit Graph

27619 Commits

Author SHA1 Message Date
Yuya Nishihara
e95ba280a6 paths: include #fragment again
Since 3be994f0f015, #fragment was missing in "hg paths" output because
path.loc was changed to a parsed URL. "hg paths" should use path.rawloc to
show complete URLs.
2015-12-07 21:42:50 +09:00
Mathias De Maré
148961a2eb dockerlib: short form for non-unique uid/gid for CentOS 5 compat (issue4977)
CentOS 5 does not support '--non-unique', but does support the short '-o'.
2015-12-07 17:39:31 +01:00
Sietse Brouwer
f5fed5a270 dirstate: don't write repo.currenttransaction to repo.dirstate if repo
is None (issue4983)

Some hooks, such as post-init and post-clone, do not get a repo parameter in
their environment. If there is no repo, there is no repo.currenttransaction();
attempting to retrieve it anyway was causing crashes. Now currenttransaction is
only retrieved and written if the repo is not None.
2015-12-03 01:38:21 +01:00
Gregory Szorc
4e3200d742 tests: test changegroup generation for filtered changesets (issue4982)
The test demonstrates the buggy behavior from issue4982 where the
changegroup contains changesets it shouldn't.
2015-12-02 14:20:13 -08:00
Yuya Nishihara
bbbc39e0a4 parsers: fix parse_dirstate to check len before unpacking header (issue4979) 2015-12-02 23:04:58 +09:00
Matt Mackall
ec9590ea23 Added signature for changeset 86c16f25367c 2015-12-01 20:18:28 -06:00
Pierre-Yves David
888da26260 docker: match more version of 'hg docker version' (issue4967)
My version of docker (1.8.3) have a different formating for 'docker version'
that broke the build script. We make the version matching more generic in to
work with both version.
2015-11-24 18:13:25 -08:00
Siddharth Agarwal
bb5af1afc4 localrepo.commit: check all files for resolve state (issue4972)
Previously we were only checking modified files for their resolve state. But a
file might be unresolved yet not in the modified state. Handle all such cases
properly.
2015-11-30 16:31:28 -08:00
liscju
ab17d6f05d rebase: add returning value from pullrebase function
So far pullrebase function has always returned None value, no matter
what orig function returned. This behaviour made impossible for
pull to change returned value from mercurial process (it has always
ended with 0 value by default). This patch makes pullrebase returning
with returned value from orig.
2015-11-15 22:18:48 +01:00
Siddharth Agarwal
4e11ac7ea5 resolve: restore .orig only after merge is fully complete (issue4952)
Previously, we'd restore the .orig file after the premerge is complete but
before the merge was complete. This would lead to the .orig file potentially
containing merge conflict markers in it, as a leftover from the last merge
attempt.
2015-11-13 15:56:02 -08:00
Gregory Szorc
c1d73b49e9 tags: create new sortdict for performance reasons
sortdict internally maintains a list of keys in insertion order. When a
key is replaced via __setitem__, we .remove() from this list. This
involves a linear scan and array adjustment. This is an expensive
operation.

The tags reading code was calling into sortdict.__setitem__ for each tag
in a read .hgtags revision. For repositories with thousands of tags or
thousands of .hgtags revisions, the overhead from list.remove()
noticeable.

This patch creates a new sortdict() so __setitem__ calls don't incur a
list.remove.

This doesn't appear to have any performance impact on my Firefox
repository. But that's only because tags reading doesn't show up in
profiles to begin with. I'm still waiting to hear from a user with over
10,000 tags and hundreds of heads on the impact of this patch.
2015-11-12 13:16:04 -08:00
FUJIWARA Katsunori
3536b81882 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
4bc805f938a0 made 'bmstore.write()' transaction sensitive, to restore
original bookmarks correctly at failure of a transaction.

For example, shelve and unshelve imply steps below:

  before 4bc805f938a0:
    1. move active bookmark forward at internal rebasing
    2. 'bmstore.write()' writes updated ones into .hg/bookmarks
    3. rollback transaction to remove internal commits
    4. restore updated bookmarks manually

  after 4bc805f938a0:
    1. move active bookmark forward at internal rebasing
    2. 'bmstore.write()' doesn't write updated ones into .hg/bookmarks
       (these are written into .hg/bookmarks.pending, if external hook
       is spawn)
    3. rollback transaction to remove internal commits
    4. .hg/bookmarks should be clean, because it isn't changed while
       transaction running: see (2) above

But if shelve or unshelve is executed in the repository created with
"shared bookmarks" ("hg share -B"), this doesn't work as expected,
because:

  - share extension makes 'bmstore.write()' write updated bookmarks
    into .hg/bookmarks of shared source repository regardless of
    transaction activity, and

  - intentional transaction failure at the end of shelve/unshelve
    doesn't restore already updated .hg/bookmarks of shared source

This patch makes share extension wrap 'bmstore._writerepo()' instead
of 'bmstore.write()', because the former is used to actually write
bookmark changes out.
2015-11-13 02:36:30 +09:00
Augie Fackler
a7381bb9d3 bmstore: add handling of the active bookmark
This further centralizes the handling of bookmark storage, and will
help get some lingering bookmarks business out of localrepo. Right
now, this change implies reading of the active bookmark to also imply
reading all bookmarks from disk - for users with many many bookmarks
this may be a measurable performance hit. In that case, we should
migrate bmstore to be able to lazy-read its properties from disk
rather than having to eagerly read them, but I decided to avoid doing
that to try and avoid some potentially complicated filecache decorator
issues.

This doesn't move the logic for writing the active bookmark into a
transaction, though that is probably the correct next step. Since the
API probably needs to morph a little more, I didn't bother marking
bookmarks.{activate,deactivate} as deprecated yet.
2015-11-11 21:18:02 -05:00
Bryan O'Sullivan
9fc5431d91 patchbomb: treat empty address list as no addresses
Previously it wasn't possible to use configuration to avoid
being prompted for e.g. a CC list when using patchbomb to send
emails.

We now make it possible to supply an empty value.
2016-01-07 20:02:47 -08:00
Bryan O'Sullivan
b0ea3c69dd config: add hasconfig method and supporting plumbing
We add the hasconfig method to make it possible to distinguish between a
config value that was never supplied and one that is empty.
2016-01-07 19:45:03 -08:00
Martin von Zweigbergk
61149c5496 verify: replace "output parameters" by return values
_verifychangelog() and _verifymanifest() accept dictionaries that they
populate. We pass in empty dictionaries, so it's clearer to create
them in the functions and return them.
2016-01-05 21:25:51 -08:00
timeless
ce2180cfc6 shelve: hook afterresolvedstates 2016-01-05 22:23:27 +00:00
Matt Mackall
3ace626aa9 check-code: allow only-whitespace lines in tests
These turn out to be necessary to embed diffs with blank lines in test
input. So we now complain about whitespace following a character.
2016-01-08 12:35:02 -06:00
Matt Mackall
9b87c36795 check-commit: try to curb bad commit summary keywords
The goal of commit summary keywords is to help us sort, categorize,
and filter our voluminous commits for our release notes in a way
that's helpful and meaningful to end users. Lately, there have been a
huge number of "keywords" that are neither words nor particularly key.

This patch tries to discourage that by narrowing the allowed
characters to alphanumeric. In particular, it doesn't allow "."
(method, function names, and file extensions) and "/" (filenames). It
also gives a short reminder of what a keyword ought to be.
2015-12-10 12:56:23 -06:00
Martin von Zweigbergk
88327fd798 changegroup: don't add a second trailing '/' in dir name
The paths given from treemanifest.dir() already contains the trailing
slash.
2016-01-08 14:47:02 -08:00
Martin von Zweigbergk
ed1140692c changegroup: remove left-over debugging help 2016-01-08 14:33:13 -08:00
timeless
25686051e3 run-tests: skip threading for a single test
Threading is incompatible with most Python debuggers,
which makes debugging run-tests.py a real pain.

If there is only one test to run, skip using a thread for it.

Note that --debug is not compatible with debugging tests,
since it bypasses the output handling, which is where
much of the excitement is.
2015-12-28 17:48:40 +00:00
Urs Rau
e104ebf4e7 installer: add windows application version number to inno installer script
This addition to the inno installer script means that the windows uninstaller
registry key “DisplayVersion" is set to the application version number and
will show in Add/Remove Programs.
2016-01-07 12:49:26 +00:00
Laurent Charignon
693c12d5a7 run-tests: add 'diff' entry in json report
This patch adds to the json report the "diff" between expected and observed
result. This diff can be useful for automatically filing bug report on failing
tests.
2016-01-05 13:33:09 -08:00
Augie Fackler
c341de89c9 bookmarks: make _readactive safe when readlines raises ENOENT
When reading over static http, the file isn't actually opened until
the readlines() call, so we have to check for ENOENT IOErrors here
too. This is necessary so that we can use the bmstore everywhere for
managing the active bookmark, which will be true in the next change.
2015-12-01 13:08:05 -05:00
Matt Harbison
59bfa8869d wix: add help for current internal topics
This makes the changes in 68b7b759ebff and 71a3703364df available on Windows.

I'm not setup to make the installer, so someone with experience in this area
should probably give it a look.  In looking around to try to figure out how to
build the installer, it looks like the Makefile may need an update to $DOCFILES.
2015-12-17 21:24:08 -05:00
Gregory Szorc
a3879b199a help: fix quoting for bundle1 options 2016-01-07 14:03:11 -08:00
Matt Mackall
82e0719648 merge with stable 2016-01-07 17:51:54 -06:00
Yuya Nishihara
699ec74ad9 extdiff: use @command decorator to set up diff commands
It can set "inferrepo" attribute appropriately.
2016-01-01 22:35:34 +09:00
Yuya Nishihara
daf4a450f1 extdiff: factor out list of common options 2016-01-04 22:13:46 +09:00
Yuya Nishihara
27d625a5ea dispatch: copy inferrepo attribute to alias commands
The other attributes are copied. Let's do the same for the inferrepo.
2016-01-04 21:40:05 +09:00
timeless
35854385ce transplant: specify the right file and path for unfinishedstates 2016-01-06 04:59:46 +00:00
timeless
aa6a7a6e4d transplant: only use checkunfinished if not continue 2016-01-06 04:59:21 +00:00
timeless
57af46935b transplant: correct language to use working directory 2016-01-05 22:46:04 +00:00
timeless
37bdcf185f histedit: replace @addhisteditaction with @action
@action supports verbs, messages, priority, and internal

messages should be translated.
internal means the action should not be listed.

geteditcomment will construct the verbs list based on
@actions (prefering priority over non priority, otherwise
favoring verbs with short forms over verbs without).
2015-12-23 21:30:38 +00:00
timeless
84c6183618 histedit: prefer edit commit, edit message, use commit
Selecting editing commits, rewording commit messages, and
selecting commits are key actions, we will prefer them more
generally in a future commit, this pulls them ahead before
that to make the diffs easier to read.

The remaining commands are left alphabetically sorted
2015-12-23 21:20:08 +00:00
timeless
3b48ba0db9 histedit: replace editcomment with a function 2015-12-23 21:17:45 +00:00
Laurent Charignon
95ad56f2f0 debugignore: find out why a file is being ignored (issue4856)
This patch adds a capability to hg debugignore: to explain why a given file is
being ignores by mercurial. We display the filename, line and linenumber of the
rule that lead us to ignore the file.
2016-01-05 07:47:08 -08:00
Laurent Charignon
f5214fc7b3 debugignore: find out if a file is being ignored
Before this patch debugignore was just displaying the list of ignore patterns.
This patch makes it support a list of filename as argument and tells the user
if those given files are ignored or not.
2016-01-05 07:47:08 -08:00
Laurent Charignon
59af678158 dirstate: add a way to get the ignore file/line matching an ignored file
This information will be used to improve debugignore (issue4856).
2016-01-05 07:52:04 -08:00
timeless
4e03c1691c clone: move bookmarks and checkouts before pull help
The bookmark/checkout help actually split the pull help.
The subsequent verbose container is talking about pull too.
This change puts the pull help back together again.
2016-01-05 19:59:21 +00:00
Martin von Zweigbergk
aba61f81ad status: revert + flag-change == modified
After just changing the flag on a file, plain 'hg status' will report
the file as modified. However, after reverting a file to a previous
revision's state and changing the flag, it will be reported as clean.

Fix by comparing the flags that were previously ignored in
context._buildstatus().
2016-01-04 09:44:58 -08:00
Gregory Szorc
0708caa27a util: remove outdated comment about construction overhead
An old implementation of this class (possibly only in my local repo)
allocated nodes in the cache during construction time, making
__init__ slow for large cache capacities. The current implementation
lazily grow the cache size, making this comment wrong.
2016-01-05 20:52:34 -08:00
timeless
5129095046 test-transplant.t: improve test coverage
* ?, x, q
* not a parent
* --source
* outstanding local changes
* outstanding uncommitted merges
* no revision checked out
* checkopts all+branch+rev
* checkopts all-branch
* checkopts no-args
* checkopts continue+all
* revset:transplanted(...)
* filter corrupted changeset
2016-01-06 06:37:34 +00:00
Anton Shestakov
cd8547e761 help: use backticks for progress.format keywords, correct letter case 2016-01-06 15:17:28 +08:00
timeless
58c3371f4c log: help provide sort by date example 2016-01-06 07:55:57 +00:00
timeless
c27e8dde2d log: mention ordering
a user complained that hg help log did not hint how to sort
the output by date
2016-01-06 19:29:45 -05:00
Martin von Zweigbergk
6a744a4d74 transaction: remove 'if True:'
This seems to be left over from 5ae82d2dc4c0 (transaction: reorder
unlinking .hg/journal and .hg/journal.backupfiles, 2015-10-16).
2016-01-06 11:12:09 -08:00
Augie Fackler
73b63e2aed lazymanifest: check more return values in filtercopy
Spotted by Bryan O'Sullivan (and vexingly not the static analyzer I've
been using.)
2015-12-31 13:31:42 -05:00
Jun Wu
ea41b32b83 mercurial: pass ui to extensions.load (issue5007)
extensions.load does need ui argument to print error if an extension
fails to load.
2015-12-17 10:30:17 +00:00