Commit Graph

4988 Commits

Author SHA1 Message Date
Matt Mackall
49af250493 win32text: mark deprecated extension option deprecated 2015-06-25 17:42:45 -05:00
Matt Mackall
ef6c4dec08 transplant: mark some undocumented options deprecated 2015-06-25 17:42:09 -05:00
Matt Mackall
06c4019bce mq: tweak config reading to make check-config happy
The not-really-a-bool handling here upsets the type checker.
2015-06-25 17:41:40 -05:00
Matt Mackall
e8ae5150ee patchbomb: make sure all users of smtp.verifycert agree on the default 2015-07-17 13:41:07 -05:00
Matt Mackall
65f1e11a48 patchbomb: mark ancient option deprecated
This just exists for backwards compatibility with the earliest
versions of patchbomb.
2015-06-25 17:38:14 -05:00
Matt Mackall
f9425f2260 histedit: mark defaultrev option experimental 2015-06-25 17:37:35 -05:00
Matt Harbison
400240f7c1 extdiff: add support for subrepos
Git and svn subrepo support is incomplete, because they don't support archiving
the working copy.
2012-07-15 12:43:10 -04:00
Matt Harbison
6579c8c6d9 extdiff: use archiver to take snapshots of committed revisions
This is the last step before supporting extdiff -S.  It maintains the existing
behavior of diffing the largefile standins instead of the largefiles themselves.
Note however that the standins are not updated immediately upon modification, so
uncommitted largefile changes are ignored, as they previously were, even with
the diff command.
2012-07-11 20:48:51 -04:00
Matt Harbison
66766c7b03 largefiles: allow the archiving of largefiles to be disabled
There are currently no users of this, but it is a necessary step before
converting extdiff to use archive.  It may be useful to add an argument to
extdiff in the future and allow largefiles to be diffed, but archiving
largefiles can have significant overhead and may not be very diffable, so
archiving them by default seems wrong.

It is a mystery to me why the lfstatus attribute needs to be set on the
unfiltered repo.  However if it is set on the filtered repo instead (and the
filtered repo is passed to the original command), the lfstatus attribute is
False in the overrides for archival.archive() and hgsubrepo.archive() when
invoking the archive command.  This smells like the buggy status behavior (see
9fc565fa1621, which was reverted in e1574a4a2cad).  Neither the status nor
summary commands have this weird behavior in their respective overrides.
2015-07-11 23:26:33 -04:00
Laurent Charignon
e2ba5b2bbc histedit: mark temporary commits as obsolete when allowed to
Before this patch, we were stripping temporary commits at the end of a histedit
whether it was successful or not. If we can create obs markers, we should
create them instead of stripping because it is faster and safer.
2015-07-16 11:12:15 -07:00
Laurent Charignon
5d5716b606 histedit: minor refactoring of createmarkers check
We use a variable to store whether or not we can create obsolescence markers.
It makes the patch series more readable as we are going to reuse this
values in other places in the function.
2015-07-16 11:17:37 -07:00
FUJIWARA Katsunori
a8288b7afa censor: make various path forms available like other Mercurial commands
Before this patch, censored file should be exactly "a path relative to
repository root" regardless of current working directory, because "hg
censor" passes "path" to "repo.file()" directly without any
preparations.

To make various path forms available like other Mercurial commands,
this patch gets a target file path in the way of "hg parents FILE".

Getting "wctx" is relocated to reuse "wctx" for efficiency.
2015-07-17 00:22:16 +09:00
Eugene Baranov
afafa68827 convert: use 'default' for specifying branch name in branchmap (issue4753)
A fix for issue2653 with f5abbf51a76e introduced a discrepancy how default
branch should be denoted when converting with branchmap from different SCM.
E.g. for Git and Mercurial you need to use 'default' whilst for Perforce and
SVN you had to use 'None'. This changeset unifies 'default' for such purposes
whilst falling back to 'None' when no 'default' mapping specified.
2015-07-14 14:40:56 +01:00
FUJIWARA Katsunori
3894a2e107 shelve: omit incorrect 'commit' suggestion at 'hg shelve -i'
Before this patch, 'hg shelve -i' under non-interactive mode suggests
'use commit instead', and it obviously incorrect, because what user
wants to do isn't 'commit' but 'shelve'.

To omit incorrect 'commit' suggestion at 'hg shelve -i', this patch
specifies 'None' for 'cmdsuggest' argument of 'cmdutil.dorecord()'.
2015-07-15 04:45:58 +09:00
FUJIWARA Katsunori
a26b3feac9 record: omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i'
Before this patch, 'hg qrefresh -i' under non-interactive mode
suggests 'use qrefresh instead', and it obviously meaningless.

To omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i', this
patch specifies 'None' for 'cmdsuggest' argument of 'cmdutil.dorecord()'.
2015-07-15 04:45:58 +09:00
FUJIWARA Katsunori
b6717eba7b record: omit meaningless 'qnew' suggestion at 'hg qnew -i'
Before this patch, 'hg qnew -i' under non-interactive mode suggests
'use qnew instead', and it obviously meaningless.

To omit meaningless 'qnew' suggestion at 'hg qnew -i', this patch adds
internal function '_qrecord()' and specifies 'cmdsuggest' for each of
'qrecord' and 'qnew' separately.
2015-07-15 04:45:58 +09:00
FUJIWARA Katsunori
b3a7702a57 record: omit meaningless 'commit' suggestion at 'hg commit -i'
Before this patch, 'hg commit -i' under non-interactive mode suggests
'use commit instead', and it obviously meaningless.

This patch makes 'record.record'()' examine 'ui.interactive()' and
show suggestion by itself before calling 'commands.commit()'.

This allows 'commands.commit()' to specify 'None' for 'cmdsuggest'
argument of 'cmdutil.dorecord()' to omit meaningless 'commit'
suggestion at 'hg commit -i'.
2015-07-15 04:45:58 +09:00
Matt Mackall
5e9adcf8df hgk: tweak doc format for path option
This lets the config checker see it.
2015-06-25 17:37:14 -05:00
Matt Mackall
0dd375ec19 acl: mark deprecated config option
This option has been undocumented since day 0.
2015-06-25 17:36:46 -05:00
Matt Mackall
92ac7a79d1 gpg: mention undocumented options 2015-06-25 17:35:57 -05:00
Eugene Baranov
39327b5b56 convert: unescape Perforce-escaped special characters in filenames 2015-07-14 16:23:57 +01:00
Durham Goode
ecce172bba convert: allow customizing git remote prefix
Previously all git remotes were created as "remote/foo". This patch adds a
configuration option for deciding what the prefix should be. This is useful if
you want the bookmarks to be "origin/foo" like they are in git, or if you're
integrating with the remotenames extension and don't want the local remote/foo
bookmarks to overlap with the remote foo bookmarks.
2015-07-13 21:37:46 -07:00
Eugene Baranov
d5f94ee69d convert: ignore case changes in vieworder for Perforce
Perforce sometimes mixes the case resulting in files being ignored.
2015-07-13 15:05:03 +01:00
Eugene Baranov
4f5b6ec7cb convert: if getting a file from Perforce fails try to get it one more time
When converting a particularly large Perforce changelist (especially with  some
big files), it is very likely to run into an intermittent network issue (e.g.
WSAECONNRESET or WSAETIMEDOUT) getting one of the files, which will result in
the entire changelist converting being aborted. Which can be quite unfortunate
since you might have waited hours getting all other files. To mitigate this
let's attempt to get the file one more time, escalating original exception
if that attempt fails.
2015-07-08 18:11:40 +01:00
FUJIWARA Katsunori
ec38bf98b8 shelve: keep old backups if timestamp can't decide exact order of them
Before this patch, backups to be discarded are decided by steps below
at 'hg unshelve' or so:

  1. list '(st_mtime, filename)' tuples of each backups up
  2. sort list of these tuples, and
  3. discard backups other than 'maxbackups' ones at the end of list

This doesn't work well in the case below:

  - "sort by name" order differs from actual backup-ing order, and
  - some of backups have same timestamp

For example, 'test-shelve.t' satisfies the former condition:

  - 'default-01' < 'default-1' in "sort by name" order
  - 'default-1'  < 'default-01' in actual backup-ing order

Then, 'default-01' is discarded instead of 'default-1' unexpectedly,
if they have same timestamp. This failure appears occasionally,
because the most important condition "same timestamp" is timing
critical.

To avoid such unexpected discarding, this patch keeps old backups if
timestamp can't decide exact order of them.

Timestamp of the border backup (= the oldest one of recent
'maxbackups' ones) as 'bordermtime' is used to examine whether
timestamp can decide exact order of backups.
2015-07-13 23:34:12 +09:00
Gregory Szorc
c9f7c94c30 hg: support for auto sharing stores when cloning
Many 3rd party consumers of Mercurial have created wrappers to
essentially perform clone+share as a single operation. This is
especially popular in automated processes like continuous integration
systems. The Jenkins CI software and Mozilla's Firefox release
automation infrastructure have both implemented custom code that
effectively perform clone+share. The common use case here is that
clients want to obtain N>1 checkouts while minimizing disk space and
network requirements. Furthermore, they often don't care that a clone
is an exact mirror of a remote: they are simply looking to obtain
checkouts of specific revisions.

When multiple third parties implement a similar feature, it's a good
sign that the feature is worth adding to the core product. This patch
adds support for an easy-to-use clone+share feature.

The internal "clone" function now accepts options to control auto
sharing during clone. When the auto share mode is active, a store will
be created/updated under the base directory specified and a new
repository pointing to the shared store will be created at the path
specified by the user.

The share extension has grown the ability to pass these options into
the clone command/function.

No command line options for this feature are added because we don't
feel the feature will be popular enough to warrant their existence.

There are two modes for auto share mode. In the default mode, the shared
repo is derived from the first changeset (rev 0) in the remote
repository. This enables related repositories existing at different URLs
to automatically use the same storage. In environments that operate
several repositories (separate repo for branch/head/bookmark or separate
repo per user), this has the potential to drastically reduce storage
and network requirements. In the other mode, the name is derived from the
remote's path/URL.
2015-07-08 16:19:09 -07:00
Matt Mackall
60738c756c merge with stable 2015-07-08 16:43:49 -05:00
Eugene Baranov
4aa6a64667 convert: handle copies when converting from Perforce (issue4744) 2015-07-08 18:05:27 +01:00
Durham Goode
9f87b2f455 convert: add config for recording the source name
This creates the convert.hg.sourcename config option which will embed a user
defined name into each commit created by the convert. This is useful when using
the convert extension to merge several repositories together and we want to
record where each commit came from.
2015-07-08 10:31:09 -07:00
Durham Goode
54fa7659ef convert: support multiple specifed revs in git source
This allows specifying multiple revs/branches to convert from a git repo.
2015-07-08 10:29:11 -07:00
Durham Goode
0f795691b8 convert: add support for specifying multiple revs
Previously convert could only take one '--rev'. This change allows the user to
specify multiple --rev entries. For instance, this could allow converting
multiple branches (but not all branches) at once from git.

In this first patch, we disable support for this for all sources.  Future
patches will enable it for select sources (like git).
2015-07-08 10:27:43 -07:00
Eugene Baranov
65bf9615dd convert: handle deleted files when converting from Perforce (issue4743) 2015-07-03 18:10:58 +01:00
Pierre-Yves David
a7b191b4b3 transplant: only pull the transplanted revision (issue4692)
For some reason, transplant was pulling all remote revisions when transplanting
from a remote repository (unless --branch was
specified).
2015-06-29 19:09:42 -07:00
Durham Goode
70caa9d8e9 histedit: fix keep during --continue
The --keep option was being serialized to the state file, but it wasn't actually
being used when running a histedit --continue. This fixes that.
2015-05-28 20:30:20 -07:00
Matt Mackall
1899eff59c convert: properly pass null ids through .hgtags (issue4678)
Mercurial uses tags of null to mark deletions, but convert was
silently discarding these because it had no mapping for them. Thus, it
was resurrecting deleted tags.
2015-05-27 14:28:29 -05:00
Tony Tung
322aee926e rebase: check that the bookmark is still valid when restoring (issue4669)
After a rebase --abort, we attempt to restore the previously active
bookmark.  We need to ensure that the bookmark still exists.
2015-05-14 21:35:06 -07:00
Jordi Gutiérrez Hermoso
71d8479479 rebase: clear merge when aborting before any rebasing (issue4661)
The check of the inrebase function was not correct, and it failed to
consider the situation in which nothing has been rebased yet, *and*
the working dir had been updated away from the initial revision.

But this is easy to fix. Given the rebase state, we know exactly where
we should be standing: on the first unrebased commit. We check that
instead. I also took the liberty to rename the function, as "inrebase"
doesn't really describe the situation: we could still be in a rebase
state yet the user somehow forcibly updated to a different revision.

We also check that we're in a merge state, since an interrupted merge
is the only "safe" way to interrupt a rebase. If the rebase got
interrupted by power loss or whatever (so there's no merge state),
it's still safer to not blow away the working directory.
2015-05-10 10:57:24 -04:00
Durham Goode
af1cd08e45 histedit: fix --continue when rules are finished
If histedit failed after all the rules were complete (for instance, if there was
an exception in the cleanup phase), you couldn't --continue because it was
unable to pop a rule. Let's just skip the rule execution phase of --continue if
there are no more rules.
2015-05-01 15:45:07 -07:00
Durham Goode
be15b493fa histedit: fix serializing of None backupfile
If the histedit backupfile was None (like if evolve is enabled) it would get
serialized as 'None' into the state file. Later if the histedit was aborted and
the top most commit was unreachable (ex: if it was obsolete or stripped),
histedit would try to unbundle the backupfile and try to read .hg/None.

This fixes it to not serialize None. Since it only happens with evolve, I'm not
sure how to add test coverage here.
2015-05-01 15:28:47 -07:00
Durham Goode
d8291a43e1 histedit: fix --edit-plan
--edit-plan was completely broken from the command line because it used an old
api that was not updated (it would crash with a stack trace). Let's update it
and add tests to catch this.
2015-04-22 15:53:03 -07:00
FUJIWARA Katsunori
7174680f2d censor: fix incorrect configuration name for ignoring error at censored file
According to recent "filectx.data()" implementation, "censor.policy"
should be configured as "ignore" to ignore error at censored file:
"censor.allow" seems outdated name.
2015-05-01 22:19:20 +09:00
FUJIWARA Katsunori
8a40c00427 censor: remove meaningless explanation about .hgcensored
There is no code path handling ".hgcensored" in Mercurial source tree.

This meaningless explanation may make users misunderstand about
censor.
2015-04-30 03:39:39 +09:00
Laurent Charignon
18e5516b11 shelve: make the interactive mode experimental
While fixing issue4304: "record: allow editing new files" we introduced
changes in record/crecord. These changes need to be matched with changes in any
command using record. Shelve is one of these commands and the changes have
not been made for this release. Therefore, shelve -i should be an experimental
feature for this release.
2015-04-27 15:36:10 -07:00
Gregory Szorc
3d8a3cbed3 rebase: don't forward "source" argument to rebase (issue4633)
`hg pull` takes an optional "source" argument to define the path/url to
pull from. Under some circumstances, this option could get proxied to
rebase and interpretted as the --source argument to rebase, leading to
unexpected behavior.

In my local environment, "source" always appears in "opts" in
pullrebase. However, when attempting to write a test, I couldn't reproduce
this. Instead, the source is being captured as a positional argument in
"args." I suspect an interaction between **kwargs and an extension is to
blame for the differences in behavior. This is why no test has been
written.

I have tested behavior locally and the patch has the intended
side-effect of making `hg pull --rebase` work again.
2015-04-28 10:19:46 -07:00
FUJIWARA Katsunori
cc87b5c26d histedit: fix reST syntax problem of example code in help document
To show example code correctly in online help, text block of it should
be preceded by "::" and indented.
2015-04-28 23:27:18 +09:00
Matt Mackall
d238a66611 convert: avoid traceback in subversion sink
We've had a couple reports of subversion tracebacks that trigger when
the parents list is empty, and thus block showing what the commit
failure was on the next two lines.
2015-04-27 11:11:26 -05:00
Pierre-Yves David
3ecff4d3f6 ui: allow capture of subprocess output
We want to capture hooks output during bundle2 processing. For this purpose we
introduce a new 'subproc' argument to 'ui.pushbuffer'. When set, the output of
sub process created through 'ui.system' will be captured in the buffer too.

This will be used in the next changeset.
2015-04-23 14:57:39 +01:00
Wagner Bruna
9e590e39d1 histedit: fix typo in abort message 2015-04-21 21:01:17 -03:00
Durham Goode
f289436208 histedit: fix rollup prompting for a commit message (issue4606)
Commit 960f8ca79ab1 broke histedit's rollup by causing it to open the editor.
Turns out I missed a spot where the rollup option was read.

This fixes that and adjusts the test to catch this case.
2015-04-20 18:44:57 -07:00
Matt Mackall
55ee41405d mq: avoid silent failure when single patch doesn't apply (issue4604)
The error-handling here is quite byzantine. self._apply raises an
AbortNoCleanup, but self.apply was swallowing the exception and
returns 2. In self.push, we catch all exceptions.. and cleanup. We try
to print a message to clean up.. but that relies on having a
top-of-stack.

Instead, we re-raise the abort in self.apply, and avoid cleanup on
AbortNoCleanup in self.push by adding a trivial new except clause. We
also modernize the now-visible abort message.
2015-04-20 18:13:44 -05:00