Commit Graph

20627 Commits

Author SHA1 Message Date
Lucas Moscovicz
e87d3ac6ae revset: added ordered generatorset classes with __contains__ method
They stop iterating as soon as they go past the value they are looking for,
so, for values not in the generator they return faster.
2014-02-27 17:27:03 -08:00
Mads Kiilerich
f6187cda8d merge: use the right ancestor when both sides copied the same file
The tests shows no real changes because of this ... but there must be some
weird corner cases where using the right ancestor for the merge planning is
better than using the wrong one.
2014-02-25 20:29:46 +01:00
Mads Kiilerich
43ddf0086b copies: when both sides made the same copy, report it as a copy
Not used yet ... but shows up in debug output.
2014-02-25 20:29:14 +01:00
Mads Kiilerich
24ed93fbb6 merge: handle create+delete prompts in calculateupdates
I would like to move it all the way to the interactive resolve state like
merges are ... but this is a first intermediate step.
2014-03-02 18:36:02 +01:00
Mads Kiilerich
23f515d5c2 merge: handle acceptremove of create+delete early in manifest merge 2014-02-28 02:26:03 +01:00
Mads Kiilerich
7ee3d68332 largefiles: override calculateupdates instead of manifestmerge
That will give calculateupdates a purpose in life ... and be convenient later.
2014-03-02 18:30:41 +01:00
Mads Kiilerich
b991c5191a tests: add systematic test of merge ancestor calculation
There is probably some overlap with the existing tests - it is hard to figure
out what these tests are doing.
2014-02-25 20:28:40 +01:00
Mads Kiilerich
7162028f03 tests: add test case for criss cross merge
The test do not fit in any existing test file...
2014-03-02 18:25:19 +01:00
Matt Mackall
c9e6159ca7 merge with stable 2014-03-03 15:34:09 -06:00
Lucas Moscovicz
d710c5103e revset: changed generatorset code to remove unnecesary function call
Removed _nextitem() method, now __iter__ has that logic and __contains__ uses
__iter__ to check for membership.
2014-03-03 12:54:46 -08:00
Yuya Nishihara
0cf2db5155 dirstate: remove double imports of errno 2014-03-03 15:50:41 +09:00
Yuya Nishihara
da4723cea3 cmdserver: mask return code of runcommand in the same way as dispatch.run
"hg help" does not state that the code for abort is 255, but it's confusing
to have different code between hg command and command server.

Tests of python-hglib 1.2 passed with this change.
2014-03-03 15:50:51 +09:00
Yuya Nishihara
4d6229a6b6 cmdserver: include non-zero return code of runcommand in test output 2014-03-03 15:50:48 +09:00
Yuya Nishihara
16bbd89ec4 cmdserver: recreate mq object on runcommand in case queue path was changed
repo.mq needs to be recreated after queue path change.  Since there is little
benefit to keep invalidated mq object, it always delete repo.mq.
2014-03-03 19:41:30 +09:00
Yuya Nishihara
ff2e18c10c cmdserver: reload mq on each runcommand request to avoid corruption
If mq was changed by another process, command server should invalidate caches.
Otherwise, mq status would go wrong.
2014-03-03 19:41:26 +09:00
Yuya Nishihara
cb7c7a6489 localrepo: add hook point to invalidate everything on each command-server run
MQ extension will wrap this function to invalidate its state.

repo.invalidate cannot be wrapped for this purpose because qpush obtains
repo.lock in the middle of the operation, triggering repo.invalidate.  Also,
it seems wrong to obtain lock earlier because mq data is non-store parts.
2014-03-03 19:41:23 +09:00
Matt Mackall
b41bd8b777 contrib: drop tmplrewrite
Needed for the 1.3 transition in 2009, no longer relevant
2014-03-01 20:08:41 -06:00
Matt Mackall
8953a169ba extensions: mark win32text deprecated
Happened a long time ago.
2014-03-01 19:51:22 -06:00
Matt Mackall
3e1e5c2044 extensions: remove interhg
Has been built-in for a few releases.
2014-03-01 19:44:14 -06:00
Matt Mackall
66c8bd54e8 extensions: remove the inotify extension (BC)
This extension has always had correctness issues and has been
unmaintained for years. It is now removed in favor of the third-party
hgwatchman which is maintained and appears to be correct.

Users with inotify enabled in their config files will fall back to
standard status performance.
2014-03-01 16:20:15 -06:00
Augie Fackler
e5cf4ffdba merge main and crew 2014-03-01 21:08:43 -05:00
Augie Fackler
5b6342a4d8 merge with stable 2014-03-01 21:08:28 -05:00
Augie Fackler
3da355d794 merge with mpm 2014-03-01 09:30:23 -05:00
Augie Fackler
957de138ce test-help.t: fix for non-Linux platforms 2014-03-01 09:21:45 -05:00
Matt Mackall
53c79c65e4 config: make repo optional again 2014-02-27 23:17:37 -06:00
Olle Lundberg
bee0a3e630 merge: fix spelling of length 2014-02-28 02:28:12 +01:00
Alexander Drozdov
8bd59ff2d8 ui: edit(): transplant: set HGREVISION environment variable for an editor
transplant command set 'transplant_source' extra for the revision.
Allow an editor to access the extra using HGREVISION environment variable.

This may be useful when an editor is actually a script which modifies a commit
message. Transplant filters is an alternative way to do it.
2014-02-10 07:13:10 +04:00
Lucas Moscovicz
fbd41fa2f4 revset: added basic operators to orderedlazyset
Now __and__ and __sub__ return orderedlazyset.
2014-02-06 17:42:08 -08:00
Lucas Moscovicz
66c7004b8c revset: changed revset code to use filter method
Revset methods now use the filter code to apply a condition.
2014-02-06 09:28:41 -08:00
Lucas Moscovicz
e70d62798f revset: added filter method to revset classes
This method will replace the creation of lazysets inside the revset methods.
Instead, the classes that handle lazy structures will create them based on
their current order.
2014-02-06 17:18:11 -08:00
Alexander Drozdov
bc85c50d9f ui: edit(): rebase, graft: set HGREVISION environment variable for an editor
rebase and graft commands set 'rebase_source' or 'source' extras for the revision.
Allow an editor to access the extras using HGREVISION environment variable.

This may be useful when an editor is actually a script which modifies a commit
message.

The name 'HGREVISION' has been selected as transplant already sets this variable
for its filters (--filter).
2014-02-06 12:21:20 +04:00
Alexander Drozdov
53f98064f3 cmdutil: make commitforceeditor() to pass revision extras to ui.edit() 2014-02-06 10:15:20 +04:00
Alexander Drozdov
76bdfab906 ui: allow edit() to work with revision extras
Make edit() to accept optional 'extra' dictionary. Revision extras will be
used in upcoming patches to set some environment variables.
2014-02-06 11:38:28 +04:00
Simon Heimberg
6ae309cc92 tests: glob match has a glob character for not getting a warning on windows
When / matches on / on windows, and there is no other glob character, this
results in a warning. Avoid this by using an other glob character.
2014-02-14 00:36:44 +01:00
Simon Heimberg
66d9266de8 run-tests: fixed warn detection on failures with too many output
The state "warned" was reported too often. The problem fixed here is that
warnonly was only reset when a line did not match. When there was a line too
much, warnonly remained set.
Fix this by setting more states to warnonly.

More negative testing (testing on result "Failed") has been done this time.
2014-02-16 23:41:24 +01:00
Simon Heimberg
f532046c29 run-tests: fixed warn detection on detecting warn only for lines
The state "warned" was reported too often. The main problem was that
"False == 0" is true in python. Therefore use an empty string instead of 0
for reporting warn only for a line.
The other problem is fixed in the next patch.
2014-02-16 23:36:02 +01:00
Pierre-Yves David
a61297246c obsolete: extract encoding of marker for pushkey from the list key function
We now have a function taking a list and marker and returning an encoded
version. This will allow obsolescence marker exchange experimentation to easily
pushkey-encode markers to be pushed after selection.
2014-02-27 20:01:28 -08:00
Danek Duvall
4a6ebc20e6 solaris: diff -u emits "No differences encountered"
Solaris diff -u isn't silent when two files are identical, and tests that
don't account for that will fail.  Fix those tests, and introduce a check
that prevents reintroduction.
2014-02-19 13:46:49 -08:00
Simon Heimberg
7be64b106f rebase: do not raise an UnboundLocalError when called wrong (issue4106)
When the base is not found, we should not raise a traceback about a not defined
variable. This hides the real problem: the function rebasenode was (probably)
called wrong.

An AssertionError is raised to highlight that the caller of the function did
something wrong.

An alternative approach is to only assign None to the variable "base" and let
the merge mechanism raise an abort message. This was the behaviour for this
case before 544133bac670. But the only known case for this problem is when an
extension calls this function wrong. An AssertionError makes this clearer than
an abort message. When a different case is detected, the behaviour can be
improved then.
2014-02-14 00:34:20 +01:00
Siddharth Agarwal
fdc2cd7e0e exchange: fix docs for pulloperation
'remote' is actually the remote, not the repo one is pulling into. This
confused me quite a bit.
2014-02-27 19:56:36 -08:00
Matt Mackall
59e35ecc4f merge with stable 2014-02-27 18:57:03 -06:00
Lucas Moscovicz
5d74d40ff4 revset: changed spanset __add__ implementation to work lazily
$ time hg log -qr "first(0:tip or draft())"
...

real  0m1.032s
user  0m0.841s
sys 0m0.179s

$ time ./hg log -qr "first(0:tip or draft())"
...

real  0m0.378s
user  0m0.291s
sys 0m0.085s
2014-02-13 09:18:16 -08:00
Lucas Moscovicz
3c92337f5c revset: changed lazyset __add__ implementation to work lazily
Performance Benchmarking:

$ time hg log -qr "first(author(mpm) or branch(default))"
0:3a6a38229d41

real  0m3.875s
user  0m3.818s
sys 0m0.051s

$ time ./hg log -qr "first(author(mpm) or branch(default))"
0:3a6a38229d41

real  0m0.213s
user  0m0.174s
sys 0m0.038s
2014-02-13 09:00:25 -08:00
Pierre-Yves David
d8fd55e6c1 obsstore: add a __len__ method
We can already use "for mark in store:" it make sense to allow
"len(store)" too.
2014-02-25 10:32:54 -08:00
Pierre-Yves David
8ed33f95d4 obsstore: create method return True if a marker is actually added
The obsstore method now have a return value. This informs caller about the
actual creation of a new markers. No new markers are created if it would have
been a duplicate.
2014-02-25 10:21:54 -08:00
Matt Mackall
4ac430f87c merge with crew 2014-02-27 15:31:44 -06:00
Matt Mackall
ab8d3b450f ui: fix extra space in username abort 2014-02-27 15:14:37 -06:00
Matt Mackall
7c4d60a93e tests: fix up config --edit breakage 2014-02-27 14:58:44 -06:00
Matt Mackall
9fadaa2173 merge with stable 2014-02-27 14:48:36 -06:00
Matt Mackall
6ba3cc7397 ui: suggest config --edit when no username is set 2014-02-27 14:46:29 -06:00