Commit Graph

3772 Commits

Author SHA1 Message Date
Augie Fackler
99efe2586b Merge with stable. 2012-11-29 11:44:22 -06:00
Pierre-Yves David
39909ce228 rebase: fix pull --rev options clashing with --rebase (issue3619)
Rebase also have a plain `--rev` option used to select the rebase set (as
`--base` or `--source` would). But the content of the --rev option was intended
for the remote repo and is irrelevant for the local rebase operation. We expect
`hg pull --rebase` to stick with the default behavior here:

    hg rebase --base . --dest tip(branch(.))

The `rev` option is dropped from the option passed to rebase.
2012-11-29 16:37:15 +01:00
Julian Cowley
15e470ce7f convert: add config option to use the local time zone
The default for the time zone offset in a converted changeset has
always been 0 (UTC).  With this patch, the converted changeset is
modified so that the local offset from UTC is specified as the time
zone offset.

The option is specified as the boolean convert.localtimezone (default
False).  Example usage:

    hg convert -s cvs --config convert.localtimezone=True example-cvs example-hg

IMPORTANT: the patch only applies to conversions from cvs or svn.
The documentation for the option only appears in those two sections
in the convert help text.
2012-11-18 12:26:50 -10:00
Siddharth Agarwal
765063c1b4 rebase: use revlog.findmissingrevs to compute detach set 2012-11-27 16:24:21 -08:00
FUJIWARA Katsunori
5434449902 i18n: change output of largefiles for summary to distinguish from one for outgoing
Before this patch, largefiles extension uses "largefiles: No remote
repo" message not only for "outgoing" as status report, but also for
"summary" as summarized information.

This sharing prevents message translators from inserting white spaces
between "largefiles:" and "No remote repo" in translated message to
align column position of summarized information.

This patch changes output of largefiles for summary to distinguish
from one for outgoing.

This patch puts "no remote repo" into parentheses, because this is not
summarized information.
2012-10-31 03:59:28 +09:00
FUJIWARA Katsunori
536e35fc32 i18n: make column positioning message of MQ summary output translatable
Before this patch, one of column positioning messages of MQ summary
output is not translatable, and patches are always listed up at fixed
column position like below, when patch queue is not empty:

    mq:     1 applied, 1 unapplied

But column positioning messages for other summarized information are
translatable, so other information may be displayed at different
column position on non-English locale environments.

This patch makes column positioning message of MQ summary output
translatable.
2012-10-31 03:59:28 +09:00
FUJIWARA Katsunori
f05ff4243c i18n: add "i18n" comment to column positioning messages of "hg summary"
This comment makes it easier to distinguish such messages from others
for message translators.
2012-10-31 03:59:28 +09:00
Durham Goode
a2ecd990ef mq: fix qrefresh case sensitivity (issue3271)
When calling qrefresh with filenames, the filenames were being
treated as case-sensistive on case-insensitive file systems.
So 'qrefresh foo' would not match file 'Foo', and it failed silently.
This fix makes it work correctly on case-insensitive file systems.

Previously the matching function was applied directly to the filenames.
Now we apply the matching function through repo.status, which handles
the case logic for us. A side effect of using repo.status is that
if the qrefresh file doesn't exist, there is output stating it
doesn't exist.

Adds a test to an existing mq refresh case test.
2012-10-30 13:19:06 -07:00
Siddharth Agarwal
acc48ffd83 url: use open and not url.open for local files (issue3624) 2012-10-17 21:30:08 -07:00
Julian Cowley
af02d686b4 patchbomb: -c is not an alias for the --confirm option
The help text shows "-c/--confirm", which implies that -c is an alias
for --confirm.  Actually, it is an alias for --cc.  Correct the text
by removing -c.
2012-10-28 05:44:50 -10:00
Matt Harbison
eb56660b19 largefiles: don't copy largefiles from working dir to the store while converting
Previously, if one or more largefiles for a repo being converted were not in the
usercache, the convert would abort with a reference to the largefile being
missing (as opposed to the previous patch, where the standin was referenced as
missing).  This is because commitctx() tries to copy all largefiles to the
local store, first from the user cache, and if the file isn't found there, from
the working directory.  No files will exist in the working directory during a
convert, however.  It is not sufficient to force the source repo to be local
before proceeding, because clone and pull do not download largefiles by default.

This is slightly less than ideal because while the conversion will now complete,
it won't be possible to update to revs with missing largefiles unless the user
intervenes manually, because there is no default path pointing back to the
source repo.  Ideally these files would be cached during the conversion.

This check could have been done in reposetup.commitctx() instead, but this
ensures the local store directory is created, which is necessary to enable the
standin matcher.

The rm -> 'rm -f' change in the test is to temporarily suppress an error
clearing the cache- as noted, the cache is is not repopulated during convert.
When that is fixed, this can be changed back and the verification errors will
disappear too.
2012-10-23 21:32:19 -04:00
Matt Harbison
8973167c73 largefiles: respect the rev when reading standins in copytostore() (issue3630)
When the rev isn't specified, the standin for the working copy gets read.  But
convert doesn't update the working copy for each cset it processes, so there is
no standin and the 'hg convert' would abort complaining about the standin being
missing.

Note that if the largefile is not in the user cache, 'hg convert' complains
about the largefile itself missing from the destination repo.
2012-10-23 21:07:14 -04:00
Andrew Shadura
73cc2dd06e hgk: no committer please
Generate committer only if we really have it.
Update test-hgk.t accordingly.
2012-10-16 22:19:08 +02:00
Matt Mackall
fd58e8703f i18n: wrap false positives for translation detection 2012-11-25 13:53:47 -06:00
Bryan O'Sullivan
ffb0e7fc5d eol: don't refer to a random name-captured ui object
Previously, we used a ui object captured at the time of monkeypatching.
2012-11-20 14:21:56 -08:00
Bryan O'Sullivan
469a80b047 mq: don't refer to a random name-captured repo object
Previously, we used a repo object captured at the time of monkeypatching.
2012-11-20 11:52:47 -08:00
Bryan O'Sullivan
8f2116535a convert: fix a too-long line nag 2012-11-13 13:09:42 -08:00
YaNan Xu
69a8b90589 convert: add support for converting git submodule (issue3528)
Previously, convert aborted upon encountering a git submodule. This patch
changes it so that it now succeeds. It modifies convert_git to manually generate
'.hgsub' and '.hgsubstate' files for each git revision, so as to convert git sub
modules to non-mercurial subrepositories.
2012-10-29 17:40:13 -07:00
Augie Fackler
9766845689 bookmarks: introduce a bmstore to manage bookmark persistence
Bookmarks persistence still showed a fair amount of its legacy as a
monkeypatching extension. This encapsulates all bookmarks
serialization and parsing in a single class, and offers a single
location where other bookmarks storage engines can be substituted
in. As a result, many files no longer import the bookmarks module,
which strikes me as an encapsulation win.

This doesn't do anything to the current bookmark state yet, but I'm
hoping put that in the bmstore class as well.
2012-11-07 16:21:39 -06:00
Simon Heimberg
6523213f0e peer: subrepo isolation, pass repo instead of repo.ui to hg.peer
Do not pass ui because it contains the configuration of the repo. It is the
same object as repo.ui.
When a repo is passed to hg.peer, the global configuration is read from
repo.baseui.
2012-07-28 23:28:36 +02:00
Thomas Arendsen Hein
bf24be2a41 patchbomb: respect --in-reply-to for all mails if no intro message is sent
Before this change, the thread hierarchy looked like this:

PARENT
  PATCH1/x
    PATCH2/x
    PATCH3/x
    ...

Now it is:

PARENT
  PATCH1/x
  PATCH2/x
  PATCH3/x
  ...

With an introductory message the behaviour is unchanged:

PARENT
  INTRO
    PATCH1/x
    PATCH2/x
    PATCH3/x
    ...
2012-10-24 09:53:10 +02:00
Matt Harbison
ff98bafc79 largefiles: use 'default' instead of 'default-push' when pulling (issue3584)
This only applies to downloading largefiles, and only when no source for the
pull is explicitly provided.  The repository itself was properly being pulled
via 'default' previously.

Using --all-largefiles is not necessary on a bare pull to test this (this
existing test is merely a convenience), but it is required to test pulling on
the rebase path.

Note that the errors generated in the --rebase case are because the repo
specified doesn't have the largefiles in its cache (though they are in the user
cache), so the errors are misleading.  Specifying --all-largefiles when cloning
to 'b' fixes this, but instead of errors, it reports caching only 5 largefiles
instead of the 9 that come up missing.  Likely this is because the largefile
download procedure tries to download missing files for each rev, and some of the
files have standins in more than one rev that gets pulled.
2012-10-20 21:43:46 -04:00
FUJIWARA Katsunori
d06e5a0fa2 largefiles: distinguish "no remote repo" from "no files to upload" (issue3651)
Before this patch, when no files to upload, "hg outgoing --large" and
"hg summary --large" show "no remote repo", even though valid remote
repository is specified.

It is because that "getoutgoinglfiles()" returns None, not only if no
valid remote repository is specified, but also if no files to upload.

This patch makes "getoutgoinglfiles()" return empty list when no files
to upload, and makes largefiles show "no files to upload" message at
that time.

This patch doesn't test "if toupload is None" route in
"overrideoutgoing()", because this route is not executed unless remote
repository becomes inaccessible just before largefiles specific
processing: successful execution of "orig()" means that at least one
of "default", "default-push" or dest is valid one, and that
"getoutgoinglfiles()" never returns None in such cases.

At "hg summary --large" invocation, this patch shows message below:

    largefiles: (no files to upload)

This follows the message shown by "hg summary" with MQ:

    mq:     (empty queue)
2012-10-08 23:49:36 +09:00
Matt Harbison
7640adfa45 largefiles: always create the cache and standin directories when cloning
The standin matcher only works if the .hglf directory exists (and it won't exist
if 'clone -U' is used, unless --all-largefiles is also specified).  Since not
even 'update -r null' will get rid of the standin directory, this ensures that
the standin directory always exists if the repo has the 'largefiles'
requirement.  This requirement is only set after a largefile is committed, so
these directories will not be created for repos that have the extension enabled
but have not committed a largefile.

With the standin directory in place, 'lfconvert --to-normal' will now be able to
download the required largefiles when converting a repo that was created with
'clone -U', and whose files are not in the usercache.

The downloadlfiles command could probably be put inside the 'largefiles'
requirement conditional too, but given that the user specified --all-largefiles,
there is likely an expectation to print out the number of largefiles downloaded,
even if it is 0.
2012-10-14 15:10:13 -04:00
Matt Harbison
6217120715 largefiles: fix a traceback in lfconvert if a largefile is missing (issue3519)
The largefile may be missing for various reasons, including that a remote
repository was cloned without the --all-largefiles option.  Therefore, it seems
reasonable to attempt to download the missing files and failing that, abort and
indicate the affected file and revision so the user can manually fix the
problem.
2012-10-14 14:44:08 -04:00
Idan Kamara
1d290d6e7b grep: colorize all fields
Colors were picked in accordance to GNU grep.
2012-10-14 20:27:55 +02:00
Pierre-Yves David
dc4260df80 largefile: use self in repo method instead of repo
Most method added (or overwritten) to repo by largefile works on `repo`
instead of `self`. This currently works without trouble because `self` and
`repo` are likely the same. However this is semantically dubious and this may
cause issue for filtering. `self` may be proxy object different from the `repo`
one.

This changeset fix that and use `self` when applicable.
2012-10-08 15:41:58 +02:00
Shun-ichi GOTO
cc7e94372c win32mbcs: add reversing wrapper for some unicode-incompatible functions.
This changeset fix the problem to use win32mbcs with mercurial 2.3 or
later.

The problem is brought by side effect of modification of
encoding.upper() (changeset 17236:8b2442729eb3) because upper() does
not accept unicode string argument. So wrapped util.normcase() which
uses upper() will fail. In other words, upper() and lower() are
unicode incompatible.

To fix this issue, this changeset adds new wrapper for reversed
conversion (unicode to str) for lower() and upper() to use them
safely.
2012-10-17 18:09:00 +09:00
Huayang
2cbf7a996c convert: normalize paths in filemaps (issue3612)
convert doesn't normalise double slashes in paths. Path normalization
is applied when a path is loaded into filemap and when a file lookup
request is issued to filemap.
2012-10-05 16:27:34 -07:00
Christian Ebert
a53e549921 keyword: move commands.inferrepo for code maintenance 2012-10-17 17:32:01 +02:00
Matt Harbison
8c0a3d405b largefiles: update lfutil.findoutgoing() discovery method
It looks like this method missed the updates in 7a899bd0f9c0 (which changed the
preferred discovery method from findcommonincoming() to findcommonoutgoing()),
and 8b2938386599 (which rolls up the outgoing lists into a single object).
2012-10-08 22:43:54 -04:00
Siddharth Agarwal
a5e71891bd commands: don't infer repo for commands like update (issue2748)
Maintain a whitelist of commands to infer the repo for instead. The whitelist
contains those commands that take file(s) in the working dir as arguments.
2012-10-16 11:43:15 -07:00
Pierre-Yves David
4c13968496 histedit: create obsolescence markers in deterministic order
I arbitrary use the revnum of the precursor because it sound a right order.
2012-10-16 16:56:14 +02:00
Thomas Arendsen Hein
4ab7bd04fc histedit: max(x, key=y) and min(x, key=y) are not available in python 2.4
Use sorted(x, key=y)[-1] or sorted(x, key=y)[0] instead.
2012-10-16 16:04:28 +02:00
Pierre-Yves David
e5dbcdf7b1 histedit: do not use "min" on ctx
It does not crash but does not compare revision number at all. We actually
remove any call to min because the list is already topologically sorted.
2012-10-14 23:49:28 +02:00
Pierre-Yves David
29277d440c histedit: clean abort when there is nothing to edit 2012-10-14 23:58:02 +02:00
Pierre-Yves David
c86f3a557a histedit: rename revs in ctxs inside the between function
The variable content is actually contexts, not revision numbers.
2012-10-15 00:05:16 +02:00
Pierre-Yves David
f329dd0261 histedit: refuse to edit public changeset
Public changeset are immutable. This changeset enforce that in histedit.
2012-10-12 21:41:08 +02:00
Pierre-Yves David
2237d9bd3f histedit: ignores hidden revision when checking for orphaned nodes
We do not want hidden revision to block histedit. They are already "dead"
and we do not care about dead orphans. see similar changeset 40db49347807 for
rebase.
2012-09-27 14:00:52 +02:00
Pierre-Yves David
3607c94328 histedit: simplify computation of edited set (issue3620)
This complex code can be replaced by two simple revset calls.
2012-10-10 06:27:06 +02:00
Pierre-Yves David
e4f0351734 histedit: add obsolete support
When the obsolete feature is enabled, histedit creates obsolescence marker
instead of stripping replaced changesets.

For now, we keep stripping temporary nodes created along the way.
2012-09-27 13:59:48 +02:00
Pierre-Yves David
c922450686 histedit: replace various nodes lists with replacement graph (and issue3582)
This changeset rewrites the change tracking logic of histedit to record every
operation it does. Tracked operations record the full list of "old" node that
will eventually be removed to the list of new nodes that replace it. Operations
on temporary nodes are tracked too. Dropped changesets are also recorded as an
"old" node replacement by nothing. This logic is similar to the obsolescence
marker one and will be used for this purpose in later commit.

This new logic implies a big amount of change in the histedit code base.

histedit action functions now always return a tuple of

    (new-ctx, [list of rewriting operations])

The old `created`, `replaced` and `tmpnodes` are no longer returned and stored
during histedit operation. When such information is necessary it is computed
from the replacement graph. This computation is done in the `processreplacement`
function.

The `replacemap` is also dropped. It is computed at the end of the command from the
graph.  The `bootstrapcontinue` methods are altered to compute this different kind of
information.

This new mechanism requires much less information to be written on disk.

Note:

    This changes allows a more accurate bookmark movement. bookmark on dropped
    changeset are now move of their parent (or replacement of their parent)
    instead of their children.

    This fix issue3582
2012-10-11 08:36:50 +02:00
Matt Mackall
5047212c31 merge with durin42 2012-10-12 15:52:59 -05:00
Pierre-Yves David
8b8b1a2322 histedit: update bookmark movement notice
New format is:

    histedit: moving bookmarks <bookmark> from <old> to <new>
2012-10-10 05:54:38 +02:00
Pierre-Yves David
4a01290b0d histedit: simplify computation of newchildren during --continue
We are now checking for any changesets between the previous `parentctx` and the
current working directory parent. If the current working directory parent is
inconsistent, we abort.

This change is useful as it simplifies the --continue process, easing upcoming
changes.

While working on this changeset, I spotted an unhandled corner case. This corner
case is now documented and have an appropriate issue in the tracker (issue3655).
However, the corner case is still unhandled. handling this test case would
required some additional work:

- actually decide what the proper behavior should be:
- change content of "histedit-state" to add missing data necessary to detect
  the situation
- add proper testcase,

But leaving the case unhandled is "okay":

- this is not a regression,
- this is not the purpose of the current series,
- the freeze was near and I had more critical stuff to attend to,
- this is a simple but non trivial, (see above)
2012-10-10 06:20:14 +02:00
David Soria Parra
fb0ed62638 mq: update bookmarks during qrefresh
Bookmarks are updated during qpop and qpush, but they are not updated
during qrefresh. This behaviour makes it hard to work on an evolving
changeset at the head of a branch. qrefresh should update all bookmarks
that point to the refreshed commit with the new nodeid.
2012-10-01 02:44:46 +02:00
Bryan O'Sullivan
52fd9933cb mq: improve qqueue message with patches applied (issue3036) 2012-10-04 17:00:32 -05:00
Bryan O'Sullivan
3048607d30 Merge with crew-stable 2012-10-02 14:31:25 -07:00
Matt Harbison
ca1372542e largefiles: download missing subrepo revs when archiving
This is something plain hgsubrepos already do.  Previously, an abort message
complained about an unknown revision.
2012-09-23 00:08:13 -04:00
Pierre-Yves David
2448b893df histedit: move continue logic into a dedicated function
When histedit "continue", there is several complicated logic to apply in order to
detect intermediate changeset and concluded pending operation.

This changeset extract this logic in a dedicated function to lighten the main
one. No alteration to the logic is done.
2012-09-27 13:54:47 +02:00