Commit Graph

17748 Commits

Author SHA1 Message Date
Pierre-Yves David
6a88d239df clfilter: remove any explicit revision number from default cmdutil range
Revision "0" and "-1" may be filtered, we can't use them in any default
revrange.
2012-09-03 14:29:05 +02:00
Pierre-Yves David
df82aab75f clfilter: remove usage of range in favor of iteration over changelog
If we want to apply filtering at changelog level, we need to iterate over it.
See previous changeset description for details.
2012-09-20 19:01:53 +02:00
Pierre-Yves David
6d6a3d27a5 clfilter: split revlog.headrevs C call from python code
Make the pure python implementation of headrevs available to derived classes. It
is important because filtering logic applied by `revlog` derived class won't
have effect on `index`. We want to be able to bypass this C call to implement
our own.
2012-09-03 14:19:45 +02:00
Pierre-Yves David
23fb63d637 clfilter: handle non contiguous iteration in revlov.headrevs
This prepares changelog level filtering.  We can't assume that any revision can
be heads because filtered revisions need to be excluded.

New algorithm:
- All revisions now start as "non heads",
- every revision we iterate over is made candidate head,
- parents of iterated revisions are definitely not head.

Filtered revisions are never iterated over and never considered as candidate
head.
2012-09-03 14:12:45 +02:00
Pierre-Yves David
6981326b92 clfilter: make the revlog class responsible of all its iteration
This prepares changelog level filtering. We need the algorithms used in revlog to
work on a subset of revisions.  To achieve this, the use of explicit range of
revision is banned. `range` and `xrange` calls are replaced by a `revlog.irevs`
method. Filtered super class can then overwrite the `irevs` method to filter out
revision.
2012-09-20 19:00:59 +02:00
Pierre-Yves David
5ae3830b30 clfilter: introduce a hassecret function
We can only use copy clone if the cloned repo do not have any secret changeset.
The current method for that is to run the "secret()" revset on the remote repo.
But with proper filtering of hidden or unserved revision by the remote this
revset won't return any revision even if some exist remotely. This changeset
adds an explicit function to know if a repo have any secret revision or not.

The other option would be to disable filtering for the query but I prefer the
approach above, lighter both regarding code and performance.
2012-09-03 14:05:19 +02:00
Pierre-Yves David
2b76effa06 filter: updatebranchcache during addchangegroup instead of after lock
The forced recomputation of the branch cache was introduced by `b4909adfc093`.
Back there, `addchangegroup` did not handle any lock logic.

Later `6042c410e045` introduced lock logic to `addchangegroup`. Its description
does not explain why the `updatebranchcache` call is made outside locking. I
believe that the lock was released there because it fit well with the transaction
release already in the code.

Finally `1eda82d76f0c` moved all "unlocked" code of `addchangegroup` to an
`repo._afterlock` callback.

I do not think that the call to `updatebranchcache()` requires to be done
outside locking. That may even be a bad idea to do so. Bringing this call back
in the `addchangegroup` function makes the flow simpler and eases the following
up changelog level filtering business.
2012-09-03 14:03:38 +02:00
Matt Mackall
30d22a5093 Added signature for changeset 6f24a67844f4 2012-09-01 12:49:43 -05:00
Matt Mackall
a0c542e01a merge with crew 2012-09-01 12:48:08 -05:00
Martin Schröder
55f86dd83b i18n-de: synchronized with 47d4e30b1722; fix Bug 3082 2012-09-01 14:31:31 +02:00
Wagner Bruna
17a3e17fe2 i18n-pt_BR: synchronized with eaf9e3b776c6 2012-08-31 21:49:52 -03:00
Wagner Bruna
50f1bea0d0 merge with i18n 2012-08-31 21:44:58 -03:00
Pierre-Yves David
ef39934b8c amend: preserve phase of amended revision (issue3602)
New commit from the amend process were created without any phase contraint. If
the amended changeset had a different phase from it's parent, the phases data
were lost.

The changeset ensure the new commit are created in the same phase than the
original changeset.
2012-08-30 16:47:08 +02:00
Takumi IINO
ba400386b5 help: fix literal block syntax 2012-09-07 00:42:42 +09:00
Bryan O'Sullivan
e9f644bcea Merge 2012-09-04 15:50:15 -07:00
Bryan O'Sullivan
bccd757a71 subrepo: encode unicode path names (issue3610)
Subversion 1.7 changes its XML output to include an explicit encoding tag:

  <?xml version="1.0" encoding="UTF-8"?>

This triggers xml.dom.minidom to always return unicode strings, causing
other parts of the code to explode.

We unconditionally encode path names before handing them back, which
works with both str (actually a no-op) and unicode values.
2012-09-04 15:46:04 -07:00
Bryan O'Sullivan
2e63b30d98 Merge 2012-09-04 13:50:22 -07:00
Bryan O'Sullivan
b30060d2aa Merge with stable 2012-09-04 13:49:39 -07:00
Pierre-Yves David
f74fef3b80 strip: fix revset usage (issue3604)
The `repair` code builds a giant revset query instead of using the "%lr" idiom.
It is inefficient and crash when the number of stripped changeset is too big.

This changeset replaces the bad code by a better revset usage.
2012-08-31 23:27:26 +02:00
Mads Kiilerich
88105479b7 hgweb: avoid bad $$ processing in graph (issue3601)
JavaScript .replace always magically processed $$ $& $' $` in replacement
strings and thus displayed subject lines incorrectly in the graph view.

Instead of regexps and .replace we now just create the strings the right way in
the first place.
2012-08-29 02:09:43 +02:00
Steve Borho
985c4254c1 wix: pick up new template files 2012-08-29 13:16:56 -05:00
Steve Borho
029f4079a2 obsolete: import modules within mercurial/ without "from mercurial" 2012-08-28 11:15:34 -05:00
FUJIWARA Katsunori
c46088a9d3 i18n-ja: synchronized with b01e70463fde 2012-08-27 23:33:38 +09:00
John Li
50e5164eae tests: merging bookmarked heads
dbf799d4f78f fixed an error that occured when heads being merged were both
inactive bookmarks. Add a test for that case.
2012-08-27 09:57:58 -04:00
Bryan O'Sullivan
14c8cfede7 store: only one kind of OSError means "nonexistent entry" 2012-08-15 16:31:25 -07:00
Bryan O'Sullivan
d5c4b2870d store: sort the results of fncachestore.datafiles() 2012-08-15 16:30:32 -07:00
Sune Foldager
801d60844a rollback: write dirstate branch with correct encoding 2012-08-15 12:04:50 +02:00
Matt Mackall
1ee81ab920 merge with i18n 2012-08-11 12:45:37 -05:00
Nikolaj Sjujskij
43d12196b6 i18n-ru: fix spelling of "missing" equivalent 2012-08-10 15:42:15 +04:00
Alexander Sauta
f84ecbf167 i18n-ru: synchronized with b307594c00db 2012-08-09 13:31:08 +04:00
Wagner Bruna
cf94c7e3e7 i18n-pt_BR: synchronized with b7341f7d7837 2012-08-07 11:18:45 -03:00
Matt Mackall
b2cf3ac691 merge with i18n 2012-08-06 12:03:07 -05:00
Alexander Sauta
a8bc0caa46 i18n-ru: synchronized with 4d6b4e21d892 2012-08-06 18:15:16 +04:00
Adrian Buehlmann
5b16379fd5 debuginstall: show directory for Python lib
Example new output

on Windows:

  $ hg debuginstall
  checking encoding (cp1252)...
  checking Python lib (C:\Users\adi\hgrepos\hg-main\hg-python\lib)...
  checking installed modules (C:\Users\adi\hgrepos\hg-main\mercurial)...
  checking templates (C:\Users\adi\hgrepos\hg-main\mercurial\templates)...
  checking commit editor...
  C:\Program Files (x86)\Notepad++\notepad++.exe
  checking username...
  no problems detected

on Linux:

  adi@kork-ubuntu64:~/hgrepos/hg-main$ ./hg debuginstall
  checking encoding (UTF-8)...
  checking Python lib (/usr/lib/python2.7)...
  checking installed modules (/home/adi/hgrepos/hg-main/mercurial)...
  checking templates (/home/adi/hgrepos/hg-main/mercurial/templates)...
  checking commit editor...
  checking username...
  no problems detected
2012-08-06 12:59:47 +02:00
Adrian Buehlmann
9a52491dad update: fix typo in help text
Spotted by Kevin Chase <kevincha99@hotmail.com>
2012-08-06 10:45:11 +02:00
Augie Fackler
5200764eb8 clone: don't fail with --update for non-local clones (issue3578)
This was broken by e01343f7da6f due to lack of test coverage. This
adds a test and fixes the defect.
2012-08-08 10:04:02 -05:00
Ross Lagerwall
661779d660 util: replace util.nulldev with os.devnull
Python since 2.4 has supported os.devnull so having util.nulldev
is unnecessary.
2012-08-04 07:14:40 +02:00
Steve Borho
6ec99fd6af wix: bump MSI based installers to use Python 2.7
We're somewhat forced to use Python 2.7 for the bdist packages, so we might
as well use 2.7 for the MSI installers as well.
2012-08-23 18:19:19 -05:00
John Li
8400b38f0d merge: handle case when heads are all bookmarks
If all heads are bookmarks, merge fails to find what node to merge
with (throws an IndexError while indexing into the non-bookmark heads
list) as of 208ca72b9343. This catches that case and prints an error
to specify a rev explicitly.
2012-08-22 11:18:35 -04:00
Patrick Mezard
1e03a5cb1d verify: do not choke on valid changelog without manifest
Before this change:

  $ hg init
  $ hg branch foo
  $ hg ci -m branchfoo
  $ hg verify
  checking changesets
  checking manifests
   0: empty or missing manifest
  crosschecking files in changesets and manifests
  checking files
  0 files, 1 changesets, 0 total revisions
  1 integrity errors encountered!
  (first damaged changeset appears to be 0)
  [1]
2012-08-21 20:51:16 +02:00
Matt Mackall
b1f6dfb8ee merge heads in stable 2012-08-21 12:26:53 -05:00
Matt Mackall
30afcc9869 commit: normalize filenames when checking explicit files (issue3576) 2012-08-17 14:37:59 -05:00
Patrick Mezard
57f8b328dc fileset: fix generator vs list bug in fast path
$ hg debugfileset 'a or b'

would only return a or b but not both because the base file list was a
generator instead of a replayable sequence.
2012-08-15 22:50:23 +02:00
Patrick Mezard
04200aa71a debugfileset: implement --rev, more tests 2012-08-15 22:28:32 +02:00
Patrick Mezard
9da04ddd86 test-fileset: test remaining predicates
- exec
- symlink
- size
- resolved / unresolved
- subrepo
2012-08-15 22:09:09 +02:00
Patrick Mezard
afc53271b1 fileset: do not traceback on invalid grep pattern 2012-08-15 19:25:45 +02:00
Patrick Mezard
5874c142ff fileset: matchctx.existing() must consider ignored files
When running:

  $ hg debugfileset 'binary() and ignored()'

getfileset() was correctly retrieving ignored files but
matchctx.existing() was not taking them in account. Just add them along
with unknown files.
2012-08-15 22:29:32 +02:00
Patrick Mezard
faab1846cc fileset: matchctx.existing() must consider unknown files
By default, unknown files are ignored. If the 'unknown()' predicate
appears in the syntax tree, then they are taken in account.
Unfortunately, matchctx.existing() was filtering against non-deleted
context files, which does not include unknown files. So:

  $ hg debugfileset 'binary() and unknown()'

would not return existing binary unknown files.
2012-08-15 22:29:09 +02:00
Patrick Mezard
663673858e fileset: exclude deleted files from matchctx.existing()
Running:

  $ hg debugfileset 'binary()'

would traceback if there were one deleted file in the working directory.
It happened because matchctx.existing() was filtering files against the
ctx.__contains__() but deleted files are still considered part of
workingctx.
2012-08-15 21:44:00 +02:00
Patrick Mezard
d331997ea9 test-fileset: test file status predicates 2012-08-15 18:04:50 +02:00