Commit Graph

4304 Commits

Author SHA1 Message Date
Pierre-Yves David
485c1e9860 shelve: use the class constant in the clear method
This class attribut is used everywhere else. Not using it in clear will get us
in trouble sooner or later.
2013-10-14 17:46:47 +02:00
Pierre-Yves David
8e3855786c shelve: drop pickle usage
Pickle was used to the `shelvedstate` file. However the content of the file is
very simple and we can handle serialisation ourself. Not using pickle is a net
win.

Note incrementing the format version as no releases have been done so far.
2013-10-14 18:59:12 +02:00
Mads Kiilerich
749d4329a5 convert: update source shamap when using filemap, just as when not using filemap
The reverse mapping was introduced in 51f9f23e6ccc to make roundtrip
conversions possible ... but it did not work when using filemap.

Roundtrips with filemaps will of course only work flawlessly if inverse
mappings are used.

Especially, if a lossy convert mapping is used in one direction, then only
linear lines of development can be converted in the other direction. With this
constraint convert will do the right thing by assuming that excluded files
haven't been changed.)

A test case with general coverage of hg-hg roundtrips with filemap is added.

(There a cases where adding records of converted revisions to the shamap in the
source repository doesn't work - especially when converting the same repo to
several other repos and back. It would arguably be better if convert only
updated the shamaps in the target repo but read shamaps from both the source
and and target repo ... but that is a different story. Making the stuff we have
work consistently is step forward no matter what.)
2013-10-03 18:01:21 +02:00
Mads Kiilerich
1692899d8d convert: introduce hg.revs to replace hg.startrev and --rev with a revset
The existing knobs for controlling which revisions to convert were often
insufficient. Revsets is a shiny hammer that provides a better solution.

Revsets has been introduced in --rev handling in a lot of other places while
being more or less backwards compatible. Doing the same here would be a much
more elegant ... but that would unfortunately not work in this case.  "--rev 7"
used to mean revision 0 to 7 - it would be an unacceptable change if it
suddenly just meant revision 7.

Instead we introduce a new configuration setting. It will only work for
Mercurial repositories so adding a new commandline option for it would not be a
nice solution.

There is no way to use the fancy deprecation markup for configuration settings
so we just remove the documentation of hg.startrev.
2013-07-20 00:43:08 +02:00
Mads Kiilerich
b4c87902d8 convert: refactor head calculation for hg sources 2013-10-03 18:01:21 +02:00
Mads Kiilerich
8157f844e6 convert: remove unused and incorrect default handling for revmapfile
destc is not a string and can thus not be os.path.join'ed. Convert would crash
if we ended up there ... but we wouldn't because both the sinks (hg and
subversion) sinks implement .revmapfile and "never" throws exceptions.
2013-07-19 14:20:11 +02:00
Durham Goode
b8e2488338 shelve: fix dirstate corruption during unshelve (issue4055)
If you shelved on top of commit A, then rebased A to @ and unshelved, any file
changed in A would appear as modified in hg status despite the contents not having
changed.

The fix is to use dirstate.setparents() instead of doing it manually. This will
be a little slower since it has to iterate through everything in the dirstate
instead of only what's in the mergestate, but this will be more correct since
the mergestate did not include files which were merged but had no conflict.

The tests also had several bad dirstate's hardcoded in them. This change updates
the tests appropriately and adds a new test to cover this specific rebase case.
2013-10-11 17:19:40 -07:00
Sean Farley
a17a87c1b4 shelve: only save mq state if enabled
Test coverage has been added.
2013-10-09 14:15:20 -07:00
David Soria Parra
c8803a8b2c shelve: make no_backup parameter passing python 2.4 compatible
Python 2.4 doesn't allow passing named parameter after an list unpack,
but allows to unpack a dict.
2013-10-02 09:50:21 +02:00
David Soria Parra
943d81b08d shelve: copy bookmarks and restore them after a commit
cmdutil.commit() will advance the bookmarks. Therefore we have to restore
them afterwards. We have to use update() to ensure we preserve the bmstore
object.
2013-10-03 19:41:25 +02:00
Mads Kiilerich
1e900bb145 check-code: check for spaces around = for named parameters 2013-10-03 14:50:47 +02:00
Siddharth Agarwal
3bcce9ffe4 inotify: don't pass pidfile option to child
The child no longer needs it.
2013-10-02 14:24:25 -07:00
Siddharth Agarwal
1dc29a3f28 inotify: add pidfile to parent options
An upcoming patch will move pidfile writing from the parent to the child. This
means that if the pid file isn't specified on the command-line but is specified
as a config option, it needs to be added to the parent's opts dict.
2013-10-02 14:20:26 -07:00
Mads Kiilerich
29b14aad65 convert: fix description of 'convert --rev' 2013-07-19 02:32:36 +02:00
Mads Kiilerich
15460985a6 convert: fix crash when existing converted revision didn't come from source
This case can happen when converting from multiple repositories with filemap.
2013-10-02 19:46:48 +02:00
Mads Kiilerich
329d4ea1f9 convert: fix crash when filemap filtering is changed 2013-10-02 19:46:47 +02:00
Augie Fackler
fe680e6bea rebase: preserve metadata from grafts of changes (issue4001) 2013-10-01 14:48:53 -04:00
Augie Fackler
7d83107630 rebase: rework extrafn handling to support multiple extrafns
This makes it possible to pass keepbranches and extrafn to rebase at
the same time, although nobody uses that functionality presently. This
is a precursor to keeping graft metadata.
2013-10-01 14:28:18 -04:00
David Soria Parra
e6d74860f3 shelve: allow shelving of a change with an mq patch applied
We allow shelving of of changes on top of a MQ repository. MQ will
not allow repository changes on top of applied patches. We introduce
checkapplied in MQ to bypass this check.
2013-08-29 09:22:15 -07:00
David Soria Parra
db3958fb08 shelve: new output format for shelve listings
Use a more condensed and mercurial-like output format for shelve listing.
We don't prefix the message with 'shelved from...' anymore as our default
name contains the branch name or the user used his own name. To avoid
just printing the last commit message, we drop writing the description
to stdout.

old output:
  default         [1s ago]    shelved from default (01ba9745): create conflict

new output:
  default         (1s ago)    create conflict
2013-10-01 12:20:31 +02:00
David Soria Parra
72600cc4d7 shelve: add a shelve extension to save/restore working changes
This extension saves shelved changes using a temporary draft commit,
and bundles the temporary commit and its draft ancestors, then
strips them.

This strategy makes it possible to use Mercurial's bundle and merge
machinery to resolve conflicts if necessary when unshelving, even
when the destination commit or its ancestors have been amended,
squashed, or evolved. (Once a change has been unshelved, its
associated unbundled commits are either rolled back or stripped.)

Storing the shelved change as a bundle also avoids the difficulty
that hidden commits would cause, of making it impossible to amend
the parent if it is a draft commits (a common scenario).

Although this extension shares its name and some functionality with
the third party hgshelve extension, it has little else in common.
Notably, the hgshelve extension shelves changes as unified diffs,
which makes conflict resolution a matter of finding .rej files and
conflict markers, and cleaning up the mess by hand.

We do not yet allow hunk-level choosing of changes to record.
Compared to the hgshelve extension, this is a small regression in
usability, but we hope to integrate that at a later point, once the
record machinery becomes more reusable and robust.
2013-08-29 09:22:13 -07:00
Matt Mackall
7b8a7d221c merge with stable 2013-10-01 17:00:03 -07:00
FUJIWARA Katsunori
e4f428fc17 rebase: catch RepoLookupError at restoring rebase state for summary
Before this patch, "hg summary" may fail, when there is inconsistent
rebase state: for example, the root of rebase destination revisions
recorded in rebase state file is already stripped manually.

Mercurial earlier than 2.7 allows users to do anything other than
starting new rebase, even though current rebase is not finished or
aborted yet. So, such inconsistent rebase states may be left and
forgotten in repositories.

This patch catches RepoLookupError at restoring rebase state for
summary hook, and treat such state as "broken".
2013-10-01 00:35:07 +09:00
FUJIWARA Katsunori
d2e5b13e64 rebase: catch RepoLookupError at restoring rebase state for abort/continue
Before this patch, "rebase --abort"/"--continue" may fail, when rebase
state is inconsistent: for example, the root of rebase destination
revisions recorded in rebase state file is already stripped manually.

Mercurial earlier than 2.7 allows users to do anything other than
starting new rebase, even though current rebase is not finished or
aborted yet. So, such inconsistent rebase states may be left and
forgotten in repositories.

This patch catches RepoLookupError at restoring rebase state for
abort/continue, and treat such state as "broken".
2013-10-01 00:35:07 +09:00
FUJIWARA Katsunori
da45f9c6a0 histedit: suggest "histedit --abort" for inconsistent histedit state
Mercurial earlier than 2.7 allows users to do anything other than
starting new histedit, even though current histedit is not finished or
aborted yet. So, unfinished (and maybe inconsistent now) histedit
states may be left and forgotten in repositories.

Before this patch, histedit extension shows the message below, when it
detects such inconsistent state:

   abort: REV is not an ancestor of working directory
   (update to REV or descendant and run "hg histedit --continue" again)

But this message is incorrect, unless old Mercurial is re-installed,
because Mercurial 2.7 or later disallows users to update the working
directory to another revision.

This patch changes the hint message to suggest "hg histedit --abort".
2013-10-01 00:35:07 +09:00
FUJIWARA Katsunori
0aaf5e6516 histedit: add more detailed help about "--outgoing" 2013-10-01 00:12:34 +09:00
FUJIWARA Katsunori
e27c19b1b7 histedit: abort if there are multiple roots in "--outgoing" revisions
Before this patch, if there are multiple roots in "--outgoing"
revisions, result of "histedit --outgoing" depends on the parent of
the working directory. It succeeds only when the parent of the working
directory is a descendant of the oldest root in "--outgoing"
revisions, and fails otherwise.

It seems to be ambiguous and difficult for users.

This patch makes "histedit --outgoing" abort if there are multiple
roots in "--outgoing" revisions always.
2013-10-01 00:12:34 +09:00
FUJIWARA Katsunori
e190bd65ec histedit: add more detailed help about "--outgoing" 2013-10-01 00:12:34 +09:00
FUJIWARA Katsunori
cd5b67960a histedit: abort if there are multiple roots in "--outgoing" revisions
Before this patch, if there are multiple roots in "--outgoing"
revisions, result of "histedit --outgoing" depends on the parent of
the working directory. It succeeds only when the parent of the working
directory is a descendant of the oldest root in "--outgoing"
revisions, and fails otherwise.

It seems to be ambiguous and difficult for users.

This patch makes "histedit --outgoing" abort if there are multiple
roots in "--outgoing" revisions always.
2013-10-01 00:12:34 +09:00
Sean Farley
6064a14daf strip: set current bookmark to None if stripped 2013-09-07 15:07:10 -05:00
Kevin Bullock
513ec83540 strip: bring extension description in line with style and copy-edit 2013-09-27 21:54:53 -05:00
Pierre-Yves David
9a065a615c mq: extract strip function as its standalone extension (issue3824)
Strip now lives in its own extension

reminder: The extension is surprisingly called `strip`.  The `mq` extension
force the use of the strip extension when its enabled. This is both necessary
for backward compatibility (people expect `mq` to comes with strip) and become
some utility function used by `mq` are now in the strip extension.
2013-09-26 23:57:21 +02:00
Pierre-Yves David
7d361f0e67 strip: move the strip helper function for mq to strip
The next patch finally move the command. No joke! (hey, this is for issue3824)
2013-09-26 23:43:00 +02:00
Pierre-Yves David
c041cca5aa strip: move checklocalchanges from mq to strip
One more step for issue3824.
2013-09-26 23:32:52 +02:00
Pierre-Yves David
c91342584d strip: move checksubstate from mq to strip
One more step for issue3824
2013-09-26 23:12:43 +02:00
Pierre-Yves David
7cc217e108 mq: prepare a strip extension for extraction
Strip will lives in its own extension. The extension is surprisingly called
`strip`. (as discussed in issue3824) The `mq` extension force the use of the
strip extension when its enabled. This will both necessary for backward
compatibility (people expect `mq` to comes with strip) and become some utility
function used by `mq` will move in the strip extension.
2013-09-26 23:10:11 +02:00
David Soria Parra
22083388ea histedit: remove unused parents() call 2013-09-26 14:47:19 +02:00
Pierre-Yves David
775803a1d5 mq: have the strip command functionnal on repo without mq
This is the last step before being able to extract `strip` in its own extension.
The changes are made in mq to allow a move only extraction without touching a
line of code.
2013-09-25 14:16:51 +02:00
Pierre-Yves David
a85f87aed5 mq: extract mq.queue.strip
It does not depend on `mq.queue` anymore.
2013-09-25 14:07:37 +02:00
Pierre-Yves David
b35e49d479 mq: drop the use of mq.queue.qparent in mq.queue.strip
Same as in the previous changeset, rev is never `None`. We can just copy the two
relevant lines in in `queue.strip`. This help having `queue.strip` independent
from `queue`. One further step toward the extraction of `strip` in an independent
extension. (As discussed in issue3824).
2013-09-25 13:41:43 +02:00
Pierre-Yves David
e78203d763 mq: drop the use of mq.queue.qparent in mq.strip
In this case, rev is never `None`. We can just copy the two relevant lines in
in `strip`. This help having `strip` independent from `queue` one
further step toward its extraction in an independent extension. (As
discussed in issue3824).
2013-09-25 14:10:34 +02:00
Pierre-Yves David
cdfc54ba34 mq: document repo.mq.qparents
The function is not very complex but writing this doc helped me to check if
I got everything right.
2013-09-25 19:34:45 +02:00
Pierre-Yves David
63702d52a8 mq: use the new checklocalchange in the strip command
The strip command never use the `refresh` argument. So we can use the function
we just extracted.
2013-09-25 19:32:53 +02:00
Pierre-Yves David
c66ccb3bbf mq: extract checklocalchanges from mq.queue
The core part of `checklocalchanges` is now mq independent. We can extract it in
a standalone function to help the extraction of `strip` as discussed in issue3824.

A `checklocalchanges` function stay in `mq.queue` with the part related to
"refresh first" messages.
2013-09-25 12:43:14 +02:00
Pierre-Yves David
b30305598b mq: extract checksubstate from the queue class
This function does not need any of the the `mq.queue` method or attributes. It
is indirectly used by the `strip` command. We are trying to extract this command
in a standalone extension as discussed in issue issue3824.
2013-09-25 11:24:43 +02:00
Pierre-Yves David
0f912df18c mq: simplifies the refresh hint in checklocalchanges
The `checklocalchanges` function in the `mq.queue` class takes a `refresh` argument that
changes the error message of raised exception. When refresh is
`True` the exception message is "local changes found, refresh first" otherwise,
the message is just "local changes found".

This changeset is the first of a series that extract `strip` into a standalone
extension (as discussed in issue3824). This `checklocalchanges` function is
indirectly used by the strip command. But in a standalone strip extension the
concept of "refresh first" has no sense. In practice, When used in the context
of the strip commands `refresh`'s value is always `False`.

So my final goal is a be able to extract the `checklocalchanges` logic in a
standalone extension but to keep the part related to "refresh first" in the mq
extension. However the refresh handling is deeply entangled into the
`checklocalchanges` code. It is handled as low a possible at the point we raise
the exception.

So we moves handling of refresh upper in the `checklocalchanges` code. This will
allow the extraction of a simple version in the strip extension while mq can
still inject its logic when needed.

Two helper functions `localchangesfound` and `localchangedsubreposfound` died in
the process they are replaced by simple raise lines.
2013-09-25 12:28:40 +02:00
Augie Fackler
67877b90cc python2.4: fix imports of sub-packages of the email package
These all have an obvious comment so if/when we finally ditch Python
2.4 we can eradicate them easily.
2013-09-24 15:10:32 -04:00
Siddharth Agarwal
99a29f5838 largefiles: standardize error message for dirty working dir 2013-09-23 21:41:01 -07:00
FUJIWARA Katsunori
ca113e2a18 histedit: add description about "histedit --outgoing" to command help
Before this patch, there is no explicit description that argument is
treated as the URL of the destination repository when "--outgoing" is
specified.

This patch adds description about "histedit --outgoing" to command
help of it.
2013-08-26 16:11:21 +09:00
FUJIWARA Katsunori
bc5efe5be4 histedit: add description about basic histedit function to command help
Before this patch, there is no explicit description that histedit
edits changesets between specified ancestor and the parent of the
working directory: users may notice it by error message "REV is not an
ancestor of working directory".

This patch adds description about basic histedit function to command
help of it.

This patch uses term "ancestor" instead of "parent", because it seems
to be more suitable, and almost all (error) messages already use it.
2013-08-26 16:11:21 +09:00
Bryan O'Sullivan
c32bb7d1f6 rebase: handle bookmarks matching revset function names (issue3950)
We handled these correctly with all rev-specifying options except,
somehow, -r/--rev.
2013-09-03 15:12:35 -04:00
Matt Mackall
d52228b61b histedit: don't clobber working copy on --abort if not on histedit cset
Similar to issue4009, 2.7 will force people to abort histedits before
doing interesting things. Without this fix, people with histedit
sessions they wandered away from before upgrading to 2.7 could clobber
their working copy for no reason.
2013-08-01 19:55:02 -05:00
Matt Mackall
758ebca217 rebase: allow aborting when descendants detected
With this, all aborts will succeed in removing the state, rather than
leaving the user in 'what do I do now?' limbo.
2013-08-01 17:54:12 -05:00
Matt Mackall
c63eb47329 rebase: continue abort without strip for immutable csets (issue3997)
This causes us to simply discard the rebase state.
2013-08-01 17:45:13 -05:00
Matt Mackall
0cf44a4d14 rebase: don't clobber wd on --abort when we've updated away (issue4009) 2013-08-01 17:33:09 -05:00
Frank Kingswood
cded2790ad convert: handle changeset sorting errors without traceback (issue3961) 2013-07-26 14:44:13 +01:00
Augie Fackler
a3022f6834 mq: rename next() to nextpatch() to avoid confusing a future check-code patch
next() is a builtin starting in 2.6, so it's also nice to avoid
shadowing the builtin.
2013-07-25 10:42:36 -04:00
Matt Mackall
d177c8d161 record: add checkunfinished support (issue3955) 2013-07-25 02:34:09 -05:00
Matt Mackall
6d0d30f28a checkunfinished: accommodate histedit quirk
Turns out histedit actually intends for commits (but not other
operations like update) to be possible during its operation.
2013-07-25 02:17:52 -05:00
Augie Fackler
8031af5c75 notify: correct import of email module, sort stdlib modules to top 2013-09-20 10:16:55 -04:00
Augie Fackler
5621af34e7 patchbomb: correct import of email module 2013-09-20 10:16:35 -04:00
Augie Fackler
aeb89622cb convert: move import of xml.minidom.dom to its own line for check-code 2013-09-20 10:15:23 -04:00
FUJIWARA Katsunori
0b216b06c5 largefiles: setup "largefiles" feature in each repositories individually
Before this patch, if largefiles extension is enabled once in any of
target repositories, commands handling multiple repositories at a time
like below misunderstand that "largefiles" feature is supported also
in all other local repositories:

  - clone/pull from or push to localhost
  - recursive execution in subrepo tree

This patch registers "featuresetup()" into "featuresetupfuncs" of
"localrepository" to support "largefiles" features only in
repositories enabling largefiles extension, instead of adding
"largefiles" feature to class variable "_basesupported" of
"localrepository".

This patch also adds checking below to the largefiles specific class
derived from "localrepository":

  - push to localhost: whether features supported in the local(= dst)
    repository satisfies ones required in the remote(= src)

This can prevent useless looking up in the remote repository, when
supported and required features are mismatched: "push()" of
"localrepository" also checks it, but it is executed after looking up
in the remote.
2013-09-21 21:33:29 +09:00
FUJIWARA Katsunori
c1e7da5d4f localrepo: make supported features manageable in each repositories individually
Before this patch, all localrepositories support same features,
because supported features are managed by the class variable
"supported" of "localrepository".

For example, "largefiles" feature provided by largefiles extension is
recognized as supported, by adding the feature name to "supported" of
"localrepository".

So, commands handling multiple repositories at a time like below
misunderstand that such features are supported also in repositories
not enabling corresponded extensions:

  - clone/pull from or push to localhost
  - recursive execution in subrepo tree

"reposetup()" can't be used to fix this problem, because it is invoked
after checking whether supported features satisfy ones required in the
target repository.

So, this patch adds the set object named as "featuresetupfuncs" to
"localrepository" to manage hook functions to setup supported features
of each repositories.

If any functions are added to "featuresetupfuncs", they are invoked,
and information about supported features is managed in each
repositories individually.

This patch also adds checking below:

  - pull from localhost: whether features supported in the local(= dst)
    repository satisfies ones required in the remote(= src)

  - push to localhost: whether features supported in the remote(= dst)
    repository satisfies ones required in the local(= src)

Managing supported features by the class variable means that there is
no difference of supported features between each instances of
"localrepository" in the same Python process, so such checking is not
needed before this patch.

Even with this patch, if intermediate bundlefile is used as pulling
source, pulling indirectly from the remote repository, which requires
features more than ones supported in the local, can't be prevented,
because bundlefile has no information about "required features" in it.
2013-09-21 21:33:29 +09:00
Siddharth Agarwal
3f3eb7081b largefiles: remove bailifchanged check from overridepull (BC)
This brings pull --rebase with largefiles in line with pull --rebase without.
2013-09-20 15:26:30 -07:00
Siddharth Agarwal
139b4eb522 rebase: remove bailifchanged check from pullrebase (BC)
This saves us a relatively superfluous status check for pull --rebase (if
rebase runs, it'll check for a clean working directory anyway), and brings hg
pull --rebase closer to hg pull && hg rebase.

This is a behavior change because pull --rebase with a dirty working directory
will now abort after performing the pull rather than before.
2013-09-20 16:32:05 -07:00
Matt Mackall
ef33fd3506 merge with stable 2013-09-20 11:47:03 -05:00
Brodie Rao
cb4c4b7e31 mq: remove unused repo._committingpatch-related code
This was introduced in f59671804f58 but its usage was removed in
ffd6ded23224.
2013-09-16 01:08:29 -07:00
Bryan O'Sullivan
3967183235 rebase: handle bookmarks matching revset function names (issue3950)
We handled these correctly with all rev-specifying options except,
somehow, -r/--rev.
2013-09-03 15:12:35 -04:00
Angel Ezquerra
98ae79f962 mq: update subrepos when applying / unapplying patches that change .hgsubstate
Up until now applying or unapplying a patch that modified .hgsubstate would not
work as expected because it would not update the subrepos according to the
.hgsubstate change. This made it very easy to lose subrepo changes when using
mq.

This revision also changes the test-mq-subrepo test so that on the qpop / qpush
tests. We no longer use the debugsub command to check the state of the subrepos
after the qpop and qpush operations. Instead we directly run the id command on
the subrepos that we want to check. The reason is that using the debugsub
command is misleading because it does not really check the state of the subrepos
on the working directory (it just returns what the change that is specified on a
given revision). Because of this the tests did not detect the problem that this
revision fixes (i.e. that applying a patch did not update the subrepos to the
corresponding revisions).


# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@gmail.com>
# Date 1376350710 -7200
#      Tue Aug 13 01:38:30 2013 +0200
# Node ID 60897e264858cdcd46f89e27a702086f08adca02
# Parent  2defb5453f223c3027eb2f7788fbddd52bbb3352
mq: update subrepos when applying / unapplying patches that change .hgsubstate

Up until now applying or unapplying a patch that modified .hgsubstate would not
work as expected because it would not update the subrepos according to the
.hgsubstate change. This made it very easy to lose subrepo changes when using
mq.

This revision also changes the test-mq-subrepo test so that on the qpop / qpush
tests. We no longer use the debugsub command to check the state of the subrepos
after the qpop and qpush operations. Instead we directly run the id command on
the subrepos that we want to check. The reason is that using the debugsub
command is misleading because it does not really check the state of the subrepos
on the working directory (it just returns what the change that is specified on a
given revision). Because of this the tests did not detect the problem that this
revision fixes (i.e. that applying a patch did not update the subrepos to the
corresponding revisions).
2013-08-13 01:38:30 +02:00
Angel Ezquerra
d278e5fc26 mq: look for modified subrepos when checking for local changes
It was possible to apply, unapply, fold, patches (etc) with modified subrepos,
which resulted in surprising behavior. For example it was easy to apply a patch
with a modified subrepo, and then the refresh it and accidentally end up
including the modified subrepo on the refreshed patch.

A test has been added to verify this new check.


# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@gmail.com>
# Date 1375742979 -7200
#      Tue Aug 06 00:49:39 2013 +0200
# Node ID a5c90acff5e61aae714ba6c9457d766c54b4f124
# Parent  bacc55ce64d5de9d1eb7fcefccd3829161d5dcf7
mq: look for modified subrepos when checking for local changes

It was possible to apply, unapply, fold, patches (etc) with modified subrepos,
which resulted in surprising behavior. For example it was easy to apply a patch
with a modified subrepo, and then the refresh it and accidentally end up
including the modified subrepo on the refreshed patch.

A test has been added to verify this new check.
2013-08-06 00:49:39 +02:00
FUJIWARA Katsunori
08d72f6934 histedit: discard meaningless comment about 'hexlify node'
Refactoring in c253d4a7ab54 made this comment meaningless. The node
gotten by "discovery.findcommonoutgoing()" is hexlified in "between()"
by "repo.set('%n::%n', old, new)".
2013-08-26 16:11:21 +09:00
FUJIWARA Katsunori
61c090bc67 histedit: add description about "histedit --outgoing" to command help
Before this patch, there is no explicit description that argument is
treated as the URL of the destination repository when "--outgoing" is
specified.

This patch adds description about "histedit --outgoing" to command
help of it.
2013-08-26 16:11:21 +09:00
FUJIWARA Katsunori
0d68f18089 histedit: add description about basic histedit function to command help
Before this patch, there is no explicit description that histedit
edits changesets between specified ancestor and the parent of the
working directory: users may notice it by error message "REV is not an
ancestor of working directory".

This patch adds description about basic histedit function to command
help of it.

This patch uses term "ancestor" instead of "parent", because it seems
to be more suitable, and almost all (error) messages already use it.
2013-08-26 16:11:21 +09:00
Augie Fackler
3aa5f557a5 progress: stop getting stuck in a nested topic during a long inner step
Convert, for example, has loops like this:
for revision in source_repo:
  progress(revisions)
  for file in revision:
    progresss(file)

Prior to this change, we would start showing the file-level progress
when we encountered a big revision, and then we'd get stuck in showing
file-progress instead of revision progress, often producing many many
instantly-completing progress bars rather than the actually-helpful
top-level revisions bar.
2013-08-23 13:28:18 -04:00
Jeff Sickel
638ca0e5b2 factotum: clean up keychain for multiple hg repository authentication 2013-08-12 17:44:31 -05:00
Sean Farley
fbb07e88d9 largefiles: remove unnecessary check of instance
The refactoring of all the context objects allows us to simply pass a basectx
to the __new__ constructor and have it return the same object without
allocating new memory.

This also removes the need to import the context module.
2013-08-06 15:10:09 -05:00
Matt Mackall
99270e3bb3 mq: add checkunfinished support (issue3955) 2013-07-25 00:00:47 -05:00
Matt Mackall
d033919984 transplant: add checkunfinished (issue3955)
Nobody loves transplant anymore, but it was the first command to have
a --continue flag.
2013-07-24 23:51:44 -05:00
Matt Mackall
90a5bc169d histedit: add checkunfinished support (issue3955)
The tests contain a couple corner cases where workarounds are now
required. Strictly speaking, these are behavior regressions, but of an
extremely obscure and marginal sort. Commits or updates in the middle
of a histedit would have almost always been fairly serious user error.
2013-07-24 23:51:44 -05:00
Matt Mackall
f699a2855a rebase: add checkunfinished support (issue3955) 2013-07-24 23:51:44 -05:00
Matt Mackall
e821cd51aa rebase: reorder parent check and state storage
This could cause a rebase to be 'in progress' even though it aborted.
2013-07-24 23:51:44 -05:00
Augie Fackler
190da7405a histedit: refuse to edit history that contains merges (issue3962) 2013-07-24 17:39:29 -04:00
Wei, Elson
8a3265a449 largefiles: overridematch() should replace the file path instead of extending (issue3934) 2013-07-24 13:20:44 +08:00
Matt Mackall
a65a9a8446 convert: catch empty origpaths in svn gettags (issue3941) 2013-07-19 16:45:44 -05:00
Matthew Turk
b4f1aac7b6 churn: split email aliases from the right
This splits churn email aliases from the right, to enable incorrectly-specified
addresses that include equal signs to be mapped to correct addresses.  This
will enable aliasing of bad addresses (typically typos) such as:

sername=myusername

that appear in the churn output through a churn alias such as:

sername=myusername = myusername

whereas previously splitting from the left would not enable this behavior.
2013-07-17 10:40:40 -04:00
Mads Kiilerich
e49b0f2e4b convert: fix bad conversion of copies when hg.startrev is specified
The 'copynode' was looked up in self.keep as if it was a changeset node. It is
however a filelog node, and self.keep would thus fail if it actually looked at
its parameter ... which it only did if a startrev was specified.

Instead we now don't check the copy node - we don't have to. It must have been
copied from one of the parents, and we already check whether one of the parents
have the copy source.

We could perhaps use linkrev to see if the corresponding changeset was
converted ... but that would sometimes be wrong.

The existing test of this was wrong - now it is better, but it seems like it
exposes a 'log' issue.
2013-07-19 01:40:57 +02:00
Wei, Elson
a776319fd8 gpg: show "Unknown key ID xxxxxxxx" when the status is ERRSIG 2013-07-14 21:50:52 +08:00
Wei, Elson
0e2f791596 gpg: add shortkey() to convert from long id to short 2013-07-14 21:50:45 +08:00
Wei, Elson
1d07daf08d gpg: getkeys() removes unused returning value "err" 2013-07-12 10:10:46 +08:00
Wei, Elson
31e845a1aa gpg: treat "ERRSIG" as a valid key id but no fingerprint 2013-07-12 10:05:11 +08:00
Matt Mackall
96ec634739 progress: respect HGPLAIN 2013-07-16 11:17:01 -05:00
Matt Mackall
cc099c8d79 share: remove reference to tip 2013-07-11 19:26:53 -05:00
Matt Mackall
f0a874d0d5 rebase: simplify references to branch tips 2013-07-11 19:26:34 -05:00
Matt Mackall
8954b4fab8 mq: remove reference to tip 2013-07-11 19:25:44 -05:00
Pierre-Yves David
3defa86817 mq: use an unfiltered property cache for the queue object
The same `queue` object should be used in all situations. This allows to store
global states on the object (like the reworked shelve extension plans to).  The
queue object does not need to be distinct for all possible views (no reference
to the repo/view used at creation time) it's even a bit surprising that mq still
works with the current code.
2013-07-14 17:23:07 +02:00
Augie Fackler
7ec2710f5c Merge histedit fixes from stable. 2013-07-16 11:13:18 -05:00
Martin Geisler
ed39a6fe25 histedit: use base for computing renames when folding (issue3729)
When a file was renamed in the very first changeset being histedited,
the rename was not detected. Consider a history like this:

   0  base: add a.txt
   1  first: rename a.txt to b.txt
   2  last: edit b.txt

When 1 and 2 are edited, copies.pathcopies(first, last) correctly
returns that nothing was renamed. We must instead use
copies.pathcopies(first, last) to detect the initial rename.
2013-07-15 15:04:42 +02:00
Shun-ichi GOTO
00c29a9036 win32mbcs: wrap util.split()
util.split() should be wrapped because it is an alias of unsafe
os.path.split().
2013-07-04 23:05:59 +09:00
Simon Heimberg
ca09e06304 histedit: raise ImportError when demandloading is enabled 2013-06-05 21:16:49 +02:00
Durham Goode
7689f31a9c blackbox: fix blackbox causing exceptions in tests
In the tests some scripts call reposetup with the base ui instead of the
one the extensions have modified.  This causes an exception in
blackbox.reposetup since it expected a method to be there. So I just
check for it first. This only happened when the blackbox extension
was enabled during tests.
2013-05-22 17:38:24 -07:00
Alexander Plavin
f31c563383 highlight: fix page layout with empty first and last lines
Repeated newlines were stripped by pygmentize, now give the option not to do so.
2013-05-10 00:26:39 +04:00
Takumi IINO
97e34bea4f blackbox: fix literal block syntax 2013-05-09 11:37:20 +09:00
FUJIWARA Katsunori
72d4082125 largefiles: check unknown files with case awareness of the filesystem
Before this patch, largefiles extension checks unknown files in the
working directory always case sensitively.

This causes failure in updating from the revision X consisting of
'.hglf/A' (and "A" implicitly) to the revision Y consisting of 'a'
(not ".hglf/A") on case insensitive filesystem, because "A" in the
working directory is treated as colliding against and different from
'a' on the revision Y.

This patch uses "repo.dirstate.normalize()" to check unknown files
with case awareness of the filesystem.
2013-05-07 05:04:11 +09:00
FUJIWARA Katsunori
1d7c1875df largefiles: check existence of the file with case awareness of the filesystem
Before this patch, largefiles extension always unlinks largefiles
untracked on the target context in merging/updating after updating
working directory.

For example, it is assumed that the revision X consists of ".hglf/A"
(and "A" implicitly) and revision Y consists of "a" (not ".hglf/A").

In the case of updating from X to Y, largefiles extension tries to
unlink "A" after updating "a" in working directory. This causes
unexpected unlinking "a" on the case insensitive filesystem.

This patch checks existence of the file in the working context with
case awareness of the filesystem to prevent from such unexpected
unlinking.

"lfcommands._updatelfile()" also unlinks target file in the case
"largefile is tracked in the target context, but fails to be fetched".

This patch doesn't apply "repo.dirstate.normalize()" in this case,
because it should be already ensured in the manifest merging that
there is no normal file colliding against any largefiles.
2013-05-07 05:04:11 +09:00
Blesso hrvoje1212@gmail.com
36f0d7039a convert: fix bug of wrong CVS path parsing without port number (issue3678)
The cvsps.py:getrepopath suffers from a string parsing bug (it returns
"user@server/path/to/repository" if the CVSROOT is given like this:
":pserver:user@server/path/to/repository" ), which gives returnes the wrong
value becouse cvsps.py fails to strip the prefix from filenames.
With this patch for the same input we get the correct repo path that is:
"/path/to/repository"
2013-05-03 19:34:59 +02:00
Mads Kiilerich
69da8bff75 largefiles: use repo.wwrite for writing standins (issue3909) 2013-04-27 00:41:42 +02:00
Mads Kiilerich
2f9545c92c largefiles: drop repo wrapping detection
After 08202d1ef738 I see:

  $ hg id -q
  largefiles: repo method 'commit' appears to have already been wrapped by another extension: largefiles may behave incorrectly
  largefiles: repo method 'push' appears to have already been wrapped by another extension: largefiles may behave incorrectly
  3bd0c95ec1bf

The warning is bad:

* The message gives no hint what the problem is and how it can be resolved.
  The message is useless.

* Largefiles do have its share of problems, but I don't think I ever have seen
  a problem where this warning would have helped. The 'may' in the warning
  seems like an exaggeration of the risk. Having largefiles enabled in
  combination with for instance mq, hggit and hgsubversion causes a warning
  (depending on the configuration order) but do not cause problems. Extensions
  might of course be incompatible, but they can be that in many other ways.
  The check and the message are incorrect.

It would thus be better to remove the check and the warning completely.

Before 08202d1ef738 the check always failed. That change made the check work
more like intended ... but the intention was wrong. This change will thus also
back that change out.
2013-04-26 19:04:01 +02:00
Siddharth Agarwal
dd5ad83252 color: set _colormode to None when mode is unset (issue3895)
Previously, colorui assumed that it would only be called when mode wasn't
None. 255b770b2eff changed that, so now colorui needs to care about whether it
should colorize output.
2013-04-19 16:57:10 -07:00
Siddharth Agarwal
423eaf6e61 color: turn colorui functions into forwards when color is None
colorui will be set to None as necessary in an upcoming patch.
2013-04-19 16:57:20 -07:00
Wagner Bruna
bf79f90e32 largefiles: fix typos in documentation 2013-04-19 18:26:35 -03:00
Bryan O'Sullivan
228c308a0d blackbox: automatically rotate log files
If enabled, log rotation prevents the amount of space used by the
blackbox log from growing without bound. This becomes important in
cases where there are a lot of busy repositories managed by humans
and automation on many machines.

In large deployments, we cannot reasonably track all the repos where
blackbox logs need to be managed, so it is safer to have blackbox
manage its own logs than to move responsibility to an external tool
such as logrotate.

This change adds two configuration keys:

* blackbox.maxsize is the maximum allowable size of the current log

* blackbox.maxfiles is the number of log files to maintain
2013-04-18 16:17:59 -07:00
Simon Heimberg
08371841f9 mq: do not inherit settings form base repo in mqrepo (Fixes issue2358)
This is done by using repo.baseui when creating the queue repo.
2013-04-18 23:53:39 +02:00
Simon Heimberg
7edcf8a9d5 color: set the ui class in reposetup, before a repo is created
Previously only the class of repo.ui was set. The class was set in the wrapper
of dispatch._runcommand. But this is called after the repo is created. Only
the class of repo.ui is set because repo.baseui already exists and is not
accessible.
We now set the class in uisetup because this is called before repo creation.
This is also the place suggested in the wiki for modifying classes.
2013-04-18 23:53:24 +02:00
Siddharth Agarwal
a7818c164f rebase: check no-op before checking phase (issue3891)
This could lead to user confusion, because phases aren't really involved at
all when attempting to perform a no-op rebase.
2013-04-18 14:28:06 -07:00
Mads Kiilerich
ec228a65b1 largefiles: wlock in status before lfdirstate.write() 2013-04-17 03:41:11 +02:00
Mads Kiilerich
498a388ae4 transplant: use set for prune lookup 2013-04-16 19:31:59 +02:00
Bryan O'Sullivan
eed131db97 blackbox: fix a case of name capture 2013-04-18 12:55:58 -07:00
Pierre-Yves David
c044ef8de0 histedit: more precise user message when changeset is missing
Now that we explicitly detect duplicated changesets, we can explicitly
detect missing ones. We cover the same cases as before, some others
and we offer a better error message in all cases.
2013-04-18 15:27:50 +02:00
Pierre-Yves David
f340c552d8 histedit: protect against duplicated entries
Before this change one would issue rules with duplicated entries. For
this to happen some other changeset had to be missing to maintain the
rules length.
2013-04-18 15:22:24 +02:00
Pierre-Yves David
f70c25782a histedit: track short hash instead of changectx object
This simplifies set usage and allow us to add a missing revision check
in a later commit.
2013-04-18 15:13:35 +02:00
Pierre-Yves David
1df8cacc3e histedit: ensure rules return short hex at all time
Handling homogeneous data is both simpler and safer.
2013-04-18 15:10:01 +02:00
Pierre-Yves David
96ebb157a6 histedit: handle multiple spaces between action and hash (issue3893)
There is some clue that the previous code intended to handle that but it was
actually not the case.

As a result action could apply to the empty string '' changeset,
leading to the use the current working directory parent in some
operations.
2013-04-18 11:52:34 -04:00
Mads Kiilerich
4abe784ebb transplant: improve documentation 2013-04-16 19:20:23 +02:00
Mads Kiilerich
c4edbe5043 transplant: clarify what --branch do - it has nothing to do with branches
--branch specifies heads and has nothing to do with named branches, and it only
deals with topological branches to the same extent as all other DAG operations
do.
2013-04-16 19:18:38 +02:00
Pierre-Yves David
5aac367884 histedit: move outgoing processing to its own function
Every piece of code extracted from the main command is a win. We simplify
changeset determination in the process. Parent ceases being a list before
becoming a node. We how have a root variable containing a node all the time.
2013-04-16 21:14:50 +02:00
Pierre-Yves David
8136aa6698 histedit: move all arguments checks to the beginning of the command
This changeset move all checks and raises related to arguments
validation to the top of the file. This gathers all the logic in one
place and clarifies the code doing actual work. This paves the way for
splitting this gigantic function in separated functions.

A `goal` variable is introduced in the process. It holds the action to
be done by this invocation (new, continue or abort).

An invalid invocation is found in the process (the new code is a bit stricter).
2013-04-16 21:17:13 +02:00
Pierre-Yves David
aabd767b0a histedit: allow "-" as a command file
When "-" is specified as a command file, we read rules from stdin. Alter a
single test to demo the behavior, but most of them could benefit from this.

There is minor change in test output resulting from the fact we no
longer change log messages.
2013-04-16 20:48:37 +02:00
Pierre-Yves David
ab56a3f4b1 histedit: properly handle --continue on empty fold
When all changes from the fold have been dropped, the --continue code was
confused. This changeset handles this case.

The test for this case existed but was broken.
2013-04-16 16:58:25 +02:00
Mads Kiilerich
9c2c68a468 largefiles: don't hash all largefiles when initializing a lfdirstate
The largefiles will be hashed on demand if necessary ... and sometimes it isn't
necessary.
2013-04-15 23:31:56 +02:00
Mads Kiilerich
9a6bd8ef12 largefiles: use filechunkiter for iterating largefile when serving getlfile
The default file iterator is line based and will give odd chunk sizes - often
very short and relatively expensive.
2013-04-16 00:40:21 +02:00
Mads Kiilerich
208aa05eca largefiles: stat all largefiles in one batch before downloading
This avoids a lot of expensive roundtrips to remote repositories ... but might
be slightly slower for local operations.

This will also change some aborts on missing files to warnings. That will in
some situations make it possible to continue working on a repository with
missing largefiles.
2013-04-15 23:37:43 +02:00
Mads Kiilerich
f099974674 largefiles: 'put' should store 'source' file in under 'hash', also in localstore 2013-04-15 23:34:36 +02:00
Mads Kiilerich
bfe49038e9 largefiles: getlfile must hit end of HTTP chunked streams to reuse connections
We did read the exactly the right number of bytes from the response body. But
if the response came in chunked encoding then that meant that the HTTP layer
still hadn't read the last 0-sized chunk and expected the app layer to read
more data from the stream. The app layer was however happy and sent another
request which had to be sent on another HTTP connection while the old one was
lingering until some other event closed the connection.

Adding an extra read where we expect to hit the end of file makes the HTTP
connection ready for reuse. This thus plugs a real socket leak.

To distinguish HTTP from SSH we look at self's class, just like it is done in
putlfile.
2013-04-16 04:35:10 +02:00
Mads Kiilerich
70924c1c48 largefiles: drop limitreader, use filechunkiter limit
filechunkiter.close was a noop.
2013-04-16 01:55:57 +02:00
Mads Kiilerich
c479eff330 largefiles: move protocol conversion into getlfile and make it an iterable
Avoid the intermediate limitreader and filechunkiter between getlfile and
copyandhash - return the right protocol and put the complexity where it better
can be managed.
2013-04-16 01:46:39 +02:00
Mads Kiilerich
eef7ef8e25 largefiles: don't close the fd passed to store._getfile 2013-04-15 23:47:04 +02:00
Mads Kiilerich
76454d8f22 largefiles: remove blecch from lfutil.copyandhash - don't close the passed fd 2013-04-15 23:43:50 +02:00
Mads Kiilerich
d9e36e98f8 largefiles: drop lfutil.blockstream - use filechunkiter like everybody else
The old chunk size is kept - just to avoid changing it.
2013-04-15 23:43:44 +02:00
Mads Kiilerich
cb8479f469 largefiles: refactoring - use findfile in localstore._getfile 2013-04-15 23:35:43 +02:00
Mads Kiilerich
9fb2d6a4da largefiles: refactoring - return hex from _getfile and copyandhash 2013-04-15 23:35:18 +02:00
Mads Kiilerich
092b44d44d largefiles: refactoring - create destination dir in lfutil.link 2013-04-15 23:32:33 +02:00
FUJIWARA Katsunori
8a7f148b06 histedit: make "hg histedit" sensitive to branch in URL
Before this patch, "hg histedit" are not sensitive to the branch
specified in the URL of the destination repository, even though "hg
push"/"hg outgoing" are so:

Invocation of "discovery.findcommonoutgoing()" without "onlyheads"
argument treats revisions on branches other than the one specified in
the URL as outgoing ones unexpectedly.

This patch specifies list of head revisions, which are already
detected by "hg.addbranchrevs()" from URL and looked up against local
repository, as "onlyheads" to "discovery.findcommonoutgoing()" to
limit calculation of outgoing revisions.
2013-04-09 23:40:10 +09:00
Mads Kiilerich
a83579d8b9 largefiles: deprecate --all-largefiles for pull
The same can be achieved with --lfrev pulled() and we shouldn't advertise
unnecessary command line options.
2013-04-15 01:59:11 +02:00
Mads Kiilerich
f03134c0a8 largefiles: implement pull --all-largefiles as a special case of --lfrev 2013-04-15 01:59:11 +02:00
Mads Kiilerich
fa7d021ee4 largefiles: drop --cache-largefiles again
This goes a step further than 974959d637b7 and backs out the unreleased
--cache-largefiles option. The same can be achieved with --lfrev heads(pulled()) and
we shouldn't introduce unnecessary command line options.
2013-04-15 01:59:11 +02:00
Mads Kiilerich
7e0e7a8927 largefiles: introduce pulled() revset expression for use in --lfrev
This provides a general way to do what already can be done with
--all-largefiles and --cache-largefiles.
2013-04-15 01:59:04 +02:00
Mads Kiilerich
a81c3f8371 largefiles: introduce pull --lfrev option
The revset will be evaluated after the changesets has been pulled, and missing
largefiles from matching revisions will be pulled to the local caches.

This in combination with revsets will make it possible to specify different
strategies for pulling largefiles.

The revset expressions used for this option might be quite complex and will
probably be most useful from scripts or an alias ... but less complicated than
configuring hooks.
2013-04-15 01:57:16 +02:00
Mads Kiilerich
0ae0b2850d largefiles: refactor overridepull internals 2013-04-15 01:54:43 +02:00
Mads Kiilerich
8db31ff332 largefiles: introduce lfpull command for pulling missing largefiles 2013-04-15 01:53:37 +02:00
Mads Kiilerich
704d1b4d79 largefiles: update help
Some clarifications, and some clean-up after --cache-largefiles was introduced.
2013-04-15 01:46:10 +02:00
Mads Kiilerich
2e2ad4f35e largefiles: fix cat of non-largefiles from subdirectory
We were calling back to the original commands.cat from inside the walk loop
that handled and filtered out largefiles. That did however happen with file
paths relative to repo root and the original cat would fail when it applied its
own walk and match on top of that.

Instead we now duplicate and modify the code from commands.cat and patch it to
handle both normal and largefiles.

A change in test output shows that this also makes the exit code with
largefiles consistent with the normal one in the case where one of several
specified files are missing.

This also fixes the combination of --output and largefiles.
2013-04-15 01:43:31 +02:00
Mads Kiilerich
f8ce95d4b0 largefiles: don't store whole file in memory for 'cat' 2013-04-15 01:41:49 +02:00
FUJIWARA Katsunori
b8042ee37a largefiles: improve repo wrapping detection
Before this patch, repo wrapping detection in "reposetup()" of
largefiles can detect only limited repo wrapping: replacing target
functions by another one named as "wrap".

So, it can't detect repo wrapping even in recommended style: replacing
"__class__" of repo by derived class.

This patch can detect repo wrapping in both styles below:

  - replacing "__class__" of repo by derived class (recommended style):

        class derived(repo.__class__):
            def push(self, *args, **kwargs):
                return super(derived, self).push(*args, **kwargs)
        repo.__class__ = derived

  - replacing function of repo by another one (not recommended style):

        orgpush = repo.push
        def push(*args, **kwargs):
            return orgpush(*args, **kwargs)
        repo.push = push
2013-04-10 02:27:35 +09:00
Mads Kiilerich
a8db98ea05 spelling: fix typos and spelling errors 2013-04-15 01:37:23 +02:00
Matt Mackall
1035a87704 merge with stable 2013-06-07 16:59:59 -05:00
Simon Heimberg
a9f4d5238f color: use pythons isinstance method instead of reprogramming it 2013-06-05 22:06:16 +02:00
Simon Heimberg
ece17e9392 color: only provide the required opt to _modesetup 2013-06-05 22:06:02 +02:00
Matt Mackall
ae59675587 merge with stable 2013-05-23 17:52:21 -05:00
Matt Mackall
13d2a13ea6 ui: merge prompt text components into a singe string
This will help avoid problems with partial or mismatched translation
of the components.
2013-05-22 17:31:43 -05:00
Bryan O'Sullivan
fdf311e2c6 summary: add a histedit hook 2013-05-14 11:23:18 -07:00
Bryan O'Sullivan
33e74866b9 summary: indicate if a rebase is underway 2013-05-14 11:23:17 -07:00
Bryan O'Sullivan
84ed4f2032 mq: switch to new summary hook mechanism 2013-05-14 11:23:16 -07:00
Szymon Wroblewski
f07e68437b splicemap: support paths with spaces in splicemap (issue3844)
Shlex module was used to split line as suggested. Split operates in POSIX mode.
2013-05-08 20:55:56 +02:00
Matt Mackall
28fc779166 merge with stable 2013-05-09 18:34:04 -05:00
Matt Mackall
0cb1d8e0c6 merge with stable 2013-05-09 10:51:03 -05:00
Matt Mackall
0f25695305 merge with stable 2013-05-05 18:51:34 -05:00
Siddharth Agarwal
8e7066e5f2 match: make explicitdir and traversedir None by default
With this, extensions can easily tell when traversedir and/or explicitdir don't
need to be called.
2013-05-03 14:41:58 -07:00
Siddharth Agarwal
1e12630870 inotify: call match.explicitdir
inotify only returns explicit directories matched.
2013-04-28 21:28:31 -07:00
Siddharth Agarwal
45c34a6c9f purge: hook into match.explicitdir and traversedir 2013-04-28 21:27:57 -07:00
Ben Goswami
bf2e9422e6 splicemap: improve error handling when source is subversion (issue2084)
Implemented error handling on splicemap file when source is
subversion (This checks are similar to when source is hg or git).

The revision string is expected to be of svn:<uuid><path>@<number>
format.

the test case has been enhanced to check this format.
2013-04-25 18:01:00 -07:00
Ben Goswami
d334de37cd splicemap: improve error handling when source is git (issue2084)
Implemented similar error handling that is done for hg in an earlier revision.
These are:
   a. add checking for splicemap file format
   b. add checking for each revision string formats
2013-04-25 16:02:58 -07:00
Ben Goswami
8afeeb7248 splicemap: improve error handling when source is hg (issue2084)
1. Introduced 2 levels of error handling for splicemap files
   a. Check the splicemap file for rules which are same across different
      types of source repos.  This is done through enhancing parsesplicemap
      function
   b. Check revision string formats.  Each repo may have their own format.
      This is done usign checkrevformat function
   c. Implemented the above two for hg
2013-04-25 11:50:26 -07:00
Ben Goswami
e47f0885b5 splicemap: move parsesplicemap to convcmd.py (issue2084)
parsesplicemap is only referenced from convcmd.py
This move is necessary to enable other changes related to
this issue
2013-04-24 18:26:37 -07:00
Mads Kiilerich
886d6922c4 record: ignore trailing content when parsing patches - introduce 'other' lines
This makes record work more like import which ignores for instance mail footers
in a patch file.

This also makes it possible for TortoiseHg to preview unapplied patches
containing such footers.
2012-06-13 23:06:34 +02:00
Mads Kiilerich
dbfffc0abf record: abort on malformed patches instead of crashing 2013-04-11 19:03:33 +02:00
Augie Fackler
45ed657bf8 histedit: switch from util.Abort to util.InterventionRequired where appropriate (bc) 2013-02-08 16:27:49 -06:00
Augie Fackler
60b871ef75 rebase: switch from util.Abort to util.InterventionRequired where appropriate (bc) 2013-02-08 16:27:59 -06:00
Bryan O'Sullivan
747f253c06 transplant: pass source through to recover 2013-04-12 18:44:22 -07:00
Bryan O'Sullivan
4a4e45180d pager: add missing imports of errno and shlex
Found using Cython.
2013-04-12 17:35:56 -07:00
Bryan O'Sullivan
af3ab5c0be largefiles: quiet (and document) undefined name errors (issue3886)
These names were found using Cython; I was completely puzzled until
I searched the rest of the tree. It's icky to mess with another
module's namespace, but ickier yet to do so without a comment :-)
2013-04-12 17:33:24 -07:00
Bryan O'Sullivan
cb3da91764 color: add missing import of error
Found using Cython.
2013-04-12 17:27:09 -07:00
Bryan O'Sullivan
6bdbf1a461 repoview: remove unreachable code
Found using Cython.
2013-04-12 17:18:52 -07:00
Bryan O'Sullivan
434777d4af histedit: support editing of the first commit (issue3767) 2013-04-12 16:01:18 -07:00
Mads Kiilerich
c7d556777b scheme: don't crash on invalid URLs 2013-04-11 14:41:22 +02:00
FUJIWARA Katsunori
3a3aca3c72 smtp: verify the certificate of the SMTP server for STARTTLS/SMTPS
Before this patch, the certificate of the SMTP server for STARTTLS or
SMTPS isn't verified.

This may cause man-in-the-middle security problem (stealing
authentication information), even though SMTP channel itself is
encrypted by SSL.

When "[smtp] tls" is configured as "smtps" or "starttls", this patch:

  - uses classes introduced by preceding patches instead of "SMTP" or
    "SMTP_SSL" of smtplib, and

  - verifies the certificate of the SMTP server, if "[smtp]
    verifycert" is configured as other than False

"[smtp] verifycert" can be configured in 3 levels:

  - "strict":

    This verifies peer certificate, and aborts if:

      - peer certification is not valid, or
      - no configuration in "[hostfingerprints]" and "[web] cacerts"

    This is default value of "[smtp] verifycert" for security.

  - "loose":

    This verifies peer certificate, and aborts if peer certification is
    not valid.

    This just shows warning message ("certificate not verified"), if
    there is no configuration in "[hostfingerprints]" and "[web]
    cacerts".

    This is as same as verification for HTTPS connection.

  - False(no verification):

    Peer certificate is not verified.

    This is as same as the behavior before this patch series.

"hg email --insecure" uses "loose" level, and ignores "[web] cacerts"
as same as push/pull/etc... with --insecure.

Ignoring "[web] cacerts" configuration for "hg email --insecure" is
already done in "dispatch._dispatch()" by looking "insecure" up in the
table of command options.
2013-03-26 02:28:10 +09:00
Bryan O'Sullivan
e905def78f blackbox: defer opening a log file until needed (issue3869)
Previously, we opened the log file when creating a repo object. This
was inefficient (not all repo creation is going to result in a need to
log something), but more importantly it broke subrepo updates when used
on NFS.

* perform an update in the master repo that triggers a subrepo clone

* empty subrepo already exists, and has an open, empty blackbox.log file
  due to it being opened eagerly/prematurely

* hg decides to blow away the skeletal subrepo (see use of shutil.rmtree
  in subrepo._get)

* we crash, due to NFS treating a delete of an open file as really a
  rename to a hidden ".nfs" file

Now that we open the blackbox log file on demand, no file exists at the
time the empty subrepo is deleted, so the above problem does not occur.
2013-03-26 16:27:51 -07:00
Simon Heimberg
0f30974d2c color: drop unnecessary global statement 2013-03-21 18:16:49 +01:00
Simon Heimberg
9e6ca20cff repo: repo isolation, do not pass on repo.ui for creating new repos
A repo should not get the configuration from an other repo, so create it with
the global configuration in repo.baseui.
This is done too when recreating a repo. The repo configuration is reread
anyway. And now deleted repo configuration does not persist.
2012-10-10 21:55:49 +02:00
Constantine Linnick
4d22c22a01 convert: add closesort algorithm to mercurial sources
If you actively work with branches, sometimes you need to close old branches
which last commited hundreds revisions ago. After close you will see long
lines in graph visually spoiling history. This sort only moves closed
revisions as close as possible to parents and does not increase storage size
as datesort do.
2013-03-24 00:06:52 +07:00
Bryan O'Sullivan
68de7be6ca hgk: fix a pyflakes error 2013-03-25 16:57:36 -07:00
Siddharth Agarwal
a91711a512 largefiles: fix _always for match overrides
Upcoming patches will speed dirstate.walk up by not filtering based on the
match function when match.always() is True. For that to work, match.always()
needs to be accurate. Previously it wasn't so for largefiles.
2013-03-25 14:22:34 -07:00
Bryan O'Sullivan
15ac9d5048 blackbox: account for another source of errors 2013-03-22 10:56:55 -07:00
Andrew Shadura
2c0de232d6 hgk: add support for phases
Add support for phases. Update tests.
2013-03-22 09:19:41 -07:00
Bryan O'Sullivan
ec76ade165 blackbox: use util.getuser for portability
On Windows, our implementation is more robust than Python's version.
2013-03-20 13:40:06 -07:00
Bryan O'Sullivan
c6e69fe607 blackbox: prevent failed I/O from causing hg to abort
Instead, we simply print a warning message if opening the blackbox log
file fails, or if writing to it fails.
2013-03-20 13:40:05 -07:00
Siddharth Agarwal
b2140786db largefiles: don't query the dirstate for key None
lfutil.splitstandin(f) can be None, and we query the dirstate for that without
checking if it is. This will cause problems with the upcoming move to critbit-
based dicts, since they only support strings as keys.
2013-03-19 13:49:34 -07:00
Durham Goode
474ac2b31e rebase: fix --collapse when a file was added then removed
When a series of commits first adds a file and then removes it,
hg rebase --collapse prompts whether to keep the file or delete it. This is
due to it reusing the branch merge code. In a noninteractive terminal it
defaults to keeping the file, which results in a collapsed commit that is
has a file that should be deleted. This bug resulted in developers accidentally
commiting unintentional changes to our repo twice today, so it's fairly
important to get fixed.

This change allows rebase --collapse to tell the merge code to accept the
latest version every time without prompting.

Adds a test as well.
2013-03-15 11:23:29 -07:00
Bryan O'Sullivan
6c6b0d29a3 merge with crew-stable 2013-03-12 10:43:59 -07:00
Durham Goode
83c3af4210 rebase: restore active bookmark after rebase --continue
When a rebase has conflicts and the user uses rebase --continue, the previously
active bookmark was not being made active once again. With this change that
bookmark is made active again, just as if the rebase had never been interrupted.

This changes the rebasestate file format, but should handle old formats correctly.
Since the file is transient, this is even less of a problem.

Adds a test to verify the new behavior. I manually tested continuing rebases
with and without an active bookmark, and with and without being on the bookmark
being rebased.
2013-03-11 15:37:28 -07:00
Durham Goode
83b3faf2ec strip: make --keep option not set all dirstate times to 0
hg strip -k was using dirstate.rebuild() which reset all the dirstate
entries timestamps to 0.  This meant that the next time hg status was
run every file was considered to be 'unsure', which caused it to do
expensive read operations on every filelog. On a repo with >150,000
files it took 70 seconds when everything was in memory.  From a cold
cache it took several minutes.

The fix is to only reset files that have changed between the working
context and the destination context.

For reference, --keep means the working directory is left alone during
the strip. We have users wanting to use this operation to store their
work-in-progress as a commit on a branch while they go work on another
branch, then come back later and be able to uncommit that work and
continue working.  They currently use 'git reset HARD^' to accomplish
this in git.
2013-03-06 20:13:09 -08:00
Mads Kiilerich
265b736027 largefiles: remove wrong comment on standin matcher and code for creating dirs
The existence of these directories could not be relied on anyway and all
dependencies on them should have been removed.
2013-02-28 14:05:15 +01:00
Mads Kiilerich
00a100f5a5 merge with stable 2013-02-28 14:51:59 +01:00
Mads Kiilerich
335985feed largefiles: updatelfiles should use working dir standins, not standins from p1
This makes a difference when working directory is dirty, especially when
merging with a revision for which we don't have largefiles.
2013-02-28 13:45:18 +01:00
Mads Kiilerich
090ace70e1 largefiles: simplify cachelfiles - don't spend a lot of time checking hashes
cachelfiles jumped through loops to handle merges and modified files ... but it
did apparently no longer have a valid reason to do so. It should just always
make sure that the largefiles referenced from the standins are present - no
matter which actual largefile is stored in the working directory. If there is
no standin then there is nothing to fetch.

The old code usually verified the hash of all largefiles every time this
function was invoked - for examply by 'update'.

This change makes a trivial noop update 5-10 seconds faster on our repo (with
the other 50% spent doing another unnecessary hashing of all largefiles).
2013-02-28 13:45:18 +01:00
Mads Kiilerich
1d9aca9cb3 largefiles: don't let update leave wrong largefiles in wd if fetch fails
Situations where a largefile for some reason wasn't available sometimes caused
wrong largefile content and state. It has mostly been seen when interrupting
download of largefiles ... and when introducing programming errors.

Instead we now make sure to delete the old and wrong largefile. A missing file
is a well-known error condition and much more reasonable way to handle the
situation.
2013-02-28 13:45:18 +01:00
Mads Kiilerich
68d046f103 largefiles: missing largefiles should not be committed as removed
Largefiles can easily become missing - for example if it simply isn't available
or the download fail. It might even be convenient to be able to work that way
in some cases.

But commiting missing largefiles as if they had been 'hg remove'd is plain wrong.
2013-02-28 13:45:18 +01:00
Mads Kiilerich
8c5a6710d0 largefiles: don't assume that .hg/largefiles/ still exists
It might not have been created and it might have been removed.
2013-02-28 13:45:18 +01:00
Mads Kiilerich
34d52d8c6e largefiles: getstandinmatcher should not depend on existence of directories
Looking for a (potentially empty) directory was not reliable - both because it
is a reasonable assumption that empty directories can be removed and because it
wasn't created in all cases ... such as when pulling to an existing repository.
2013-02-28 13:45:18 +01:00
Mads Kiilerich
d00a3f9b96 largefiles: fix download of largefiles from an empty list of changesets
The empty list was interpreted as all revisions - just like None is.

The empty list is now handled explicitly.
2013-02-28 13:44:24 +01:00
Mads Kiilerich
6e16465965 largefiles: fix off-by-one error on pull --all-largefiles
Test output is changed in a case where one revision was pulled, but because of
the off-by-one error it thought that 0 revisions were pulled ... and because of
another bug it thus (tried to) fetch largefiles for all revisions.

After this change it no longer reports failure when it failed while trying to
fetch largefiles it shouldn't fetch.  Largefiles that it shouldn't fetch but
managed to fetch anyway will now correctly be missing later on.

This change thus resolves some of unexplained test output introduced in
8664d9900884.
2013-02-28 13:44:22 +01:00
Matt Mackall
ce5cc60bf7 convert: stabilize cvsps commitid sort order 2013-02-22 16:40:27 -06:00
Matt Mackall
fb3c5e53c4 pager: catch ctrl-c on exit (issue3834) 2013-02-22 15:17:33 -06:00
Na'Tosha Bard
f1bd9d017e largefiles: don't cache largefiles for pulled heads by default
After discussion, we've agreed that largefiles for newly pulled heads should
not be cached by default.  The use case for this is using largefiles repos
with multiple remote servers (and therefore multiple remote largefiles caches),
where users will be pulling from non-default locations on a regular basis.  We
think this use case will be significantly less common than the use case where
all largefiles are stored on the same central server, so the default should be
no caching.

The old behavior can be obtained by passing the --cache-largefiles flag to
pull.
2013-02-09 21:07:42 +00:00
Siddharth Agarwal
afbf9327e6 rebase: derive node from target rev (issue3802)
dest.rev() is the same as target when a new rebase is run, but dest
isn't set when rebase --continue is run. Bug introduced in 97aaac321ced,
which fixed issue3685.
2013-02-03 14:26:39 -08:00
Pierre-Yves David
5b37f126e0 rebase: mention --rev in the help
This changeset adds a small mention of it in the help to prevent
confusion. This small addition references online help that is easier to
update and improve at release time.

Following Wagner Bruna's advice, this is added in a plain new paragraph
to not invalidate current translation this close to the release.
2013-02-01 02:01:11 +01:00
Kevin Bullock
6246126341 rebase: mention phases in the help
Mention that Mercurial helps you not do what you've just been warned not
to do, with a reference to the 'phases' help topic (not the 'phase'
command help).

Thanks to Pierre-Yves David <pierre-yves.david@ens-lyon.org> for
motivating this change and Wagner Bruna
<wagner.bruna+mercurial@gmail.com> for advising on how to do it in an
i18n-friendly way.
2013-01-31 20:01:26 -06:00
Siddharth Agarwal
eb2c7139a5 rebase: delete divergent bookmarks on destination (issue3685)
Similar to merge, divergent bookmarks are only deleted when the bookmark is on
the destination parent.
2013-01-30 16:08:32 -08:00
Siddharth Agarwal
dd1e6af7ac rebase: remove bogus nullmerge check in updatebookmarks
nstate[v] is a node, not an int, and the nullmerge check was done while
building nstate anyway.
2013-01-30 17:49:54 -08:00
Augie Fackler
404721d3a3 histedit: prevent parent guessed via --outgoing from being a revset (issue3770)
If the binary hash of the parent node guessed via --outgoing happened
to contain a special revset character (":" was specified in the bug),
the revset parser would abort. Hexlifying the node before passing it
to the revsingle call should fix that.
2013-01-30 10:57:28 -05:00
Mads Kiilerich
f66f2bb471 largefiles: fix cat when using relative paths from subdirectory 2013-01-25 18:20:13 +01:00
Mads Kiilerich
c066baf66c largefiles: fix commit when using relative paths from subdirectory
Remove cwd handling from getstandinmatcher - it did not belong there, as proven
by the tests.
2013-01-25 16:59:34 +01:00
Mads Kiilerich
2ec95abd3b largefiles: allow use of urls with #revision
largefiles tried to create a peer directly with the specified url. That caused
  abort: unsupported URL component: "..."
if a revision was specified in the url.

The branch name do not matter for largefiles' use of remote peers. Largefiles
will be shared among all branches anyway.
2013-01-28 15:19:44 +01:00
Mads Kiilerich
4b17e20f7c largefiles: don't verify largefile hashes on servers when processing statlfile
When changesets referencing largefiles are pushed then the corresponding
largefiles will be pushed too - unless the target already has them. The client
will use statlfile to make sure it only sends largefiles that the target
doesn't have. The server would however on every statlfile check that the
content of the largefile had the expected hash. What should be cheap thus
became an expensive operation that trashed the disk and the cache.

Largefile hashes are already checked by putlfile before being stored on the
server. A server should thus be able to keep its largefile store free of
errors - even more than it can keep revlogs free of errors. Verification should
happen when running 'hg verify' locally on the server. Rehashing every
largefile on every remote stat is too expensive.

Clients will also stat lfiles before downloading them. When the server verified
the hash in stat it meant that it had to read the file twice to serve it.

With this change the server will assume its own hashes are ok without checking
them on every statlfile.

Some consequences of this change:
- in case of server side corruption the problem will be detected by the
  existing check on the client side - not on server side
- clients that could upload an uncorrupted largefile when pushing will no
  longer magically heal the server (and break hardlinks) - a client will now
  only upload its uncorrupted files after the corrupted file has been removed
  on the server side
- client side verify will no longer report corruption in files it doesn't have

(Issue3123 discussed related problems - and how they have been fixed.)
2013-01-28 15:19:44 +01:00
Mads Kiilerich
46ab1da155 largefiles: verify all files in each revision and report errors in any revision
Verify used 'any' and would stop verifying after the first failure in each
changeset.

The exit code only reported the result from the last changeset.
2013-01-28 15:19:44 +01:00
Mads Kiilerich
6608184763 largefiles: adapt remotestore._getfile to batched statlfile
6fb54510b150 introduced batching of statlfile, but not all codepaths got
converted.

_getfile gave _stat garbage and got garbage back. The garbage didn't match the
expected error codes and was thus interpreted as success. It could thus end up
trying to fetch a largefile that didn't exist.

Instead we now pass _stat valid input and handle both correct and invalid
output correctly.

This makes the code work as intended ... but it would probably be better if it
didn't abort on missing largefiles, just like it happened to do before.
2013-01-28 15:19:44 +01:00
Mads Kiilerich
30af46c496 largefiles: don't allow corruption to propagate after detection
basestore.get uses util.atomictempfile when checking and receiving a new
largefile ... but the close/discard logic was too clever for largefiles.
Largefiles relied on being able to discard the file and thus prevent it from
being written to the store. That was however too brittle. lfutil.copyandhash
closes the infile after writing to it ... with a 'blecch' comment. The discard
was thus a silent noop, and as a result of that corruption would be detected
... and then the corrupted files would be used anyway.

Instead we now use a tmp file and rename or unlink it after validating it.

A better solution should be implemented ... but not now.
2013-01-28 15:19:44 +01:00
Mads Kiilerich
896f340423 largefiles: adapt verify to batched remote statlfile (issue3780)
6fb54510b150 introduced batching of statlfile, but not all codepaths got
converted.

'hg verify' with a remotestore could thus crash with
  TypeError: 'builtin_function_or_method' object is not iterable

Also, the 'hash' variable was used without assigning to it. Don't use variable
names that collide with Python built-in functions. Instead we use 'expecthash'
as in localstore.

The tests for this issue covers an untested area. The tests happens to also
reveal incorrect attempts at getting non-existing largefiles, bad server side
handling of that, and corruption issues - all to be fixed later.
2013-01-28 15:19:44 +01:00
Mads Kiilerich
0abb17e594 largefiles: let wirestore._stat return stats as expected by remotestore verify
- preparing for fixing verify crash.
2013-01-28 15:19:44 +01:00
Wagner Bruna
30efeaefbe largefiles: enhance error message to make it more i18n-friendly 2013-01-21 13:42:04 -02:00
Benoit Boissinot
8f1400147f largefiles: fix largefiles+subrepo update (issue3752)
Override updaterepo() instead of individual methods that may not be called for
each subrepo. Add test.
Based on patch from Matt Harbison.

Changes the order of update-related messages (now largefiles comes before the
global status).
2013-01-23 00:51:53 +01:00
Pierre-Yves David
b3f0e4c581 rebase: properly handle unrebased revision between rebased one
With rebase taking multiple roots it is possible to have revision in the "rebase
domain" not rebased themself. We do not want rebased revision above them to be
detached. We want such revision to be rebased on the nearest rebased ancestors.
This allows to preserve the topology of the rebase set as much a possible

To achieve this we introduce a new state `revignored` which informs
`defineparents` of the situation.

The test in `test-rebase-obsolete.t` was actually wrote and his now fixed.
2013-01-18 23:41:48 +01:00
Pierre-Yves David
5820a2b31c rebase: lose the comparison to nullmerge
For a proper behavior of the `--rev` revision we will need another possible
state for revision ignored by rebase. We alter the comparison to `nullmerge`
to match this future lower state too.
2013-01-18 23:21:32 +01:00
Pierre-Yves David
b24e3849df rebase: do not invent successor to skipped changeset
When rebase results in an empty a changeset it is "skipped" and no related
changeset is created at all. When we added obsolescence support to rebase (in
cee0a253a56c) it seemed a good idea to use its parent successor as the
successors for such dropped changesets. (see old version of the altered test).
This option was chosen because it seems a good way to hint about were the
dropped changeset "intended" to be. Such hint would have been used by automatic
evolution mechanism to rebase potential unstable children.

However, field testing of this version are not conclusive. It very often leads
to the creation of (totally unfounded) evolution divergence. This changeset
changes this behavior and mark skipped changesets as pruned (obsolete without
successors). This prevents the issue and seems semantically better probably a
win for obsolescence reading tool.

See example bellow for details:

User Babar has five changesets of interest:
- O, its current base of development.
- U, the new upstream
- A and C, some development changesets
- B another development changeset independent from A

    O - A - B - C
      \
        U

Babar decides that B is more critical than the A and C and rebase it first

  $ hg rebase --rev B --dest U

B is now obsolete (in lower case bellow). Rebase result, B', is its
successors.(note, C is unstable)

    O - A - b - C
      \
        U - B'

Babar is now done with B', and want to rebase the rest of its history:

  $ hg rebase --source A --dest B'


hg rebase process A, B and C. B is skipped as all its changes are already contained
in B'.

    O - U - B' - A' - C'

Babar have the expected result graph wise, obsolescence marker are as follow:

    B -> B' (from first rebase)
    A -> A' (from second rebase)
    C -> C' (from second rebase)
    B -> ?? (from second rebase)

Before this changeset, the last marker is `B -> A'`. This cause two issues:

- This is semantically wrong. B have nothing to do with A'
- B has now two successors sets: (B',) and (A',). We detect a divergent
  rewriting. The B' and A' are reported as "divergent" to Babar, confusion
  ensues. In addition such divergent situation (divergent changeset are children
  to each other) is tricky to solve.

With this changeset the last marker is `B -> ø`:

- This is semantically better.
- B has a single successors set (B',)

This scenario is added to the tests suite.
2013-01-18 14:15:32 +01:00
Bryan O'Sullivan
9b64f1d6bd blackbox: fix copyright 2013-02-13 10:54:52 -08:00
Bryan O'Sullivan
55a5166e90 blackbox: fix a failing pyflakes test 2013-02-12 16:02:35 -08:00
Durham Goode
cf493e6ded blackbox: adds a 'blackbox' command for viewing recent logs
Adds a 'hg blackbox' command for viewing the latest entries in the blackbox log.
By default it shows the last 10 entries, but -l allows the user to specify.
2013-02-09 09:09:46 -08:00
Durham Goode
4add84adea blackbox: adds a blackbox extension
Adds a blackbox extension that listens to ui.log() and writes the messages to
.hg/blackbox.log. Future commits will use ui.log() to log commands, unhandled
exceptions, incoming changes, and hooks.  The extension defaults to logging
everything, but can be configured via blackbox.track to only log certain events.
Log lines are of the format:  "date time user> message"

Example log line:
2013/02/09 08:35:19 durham> 1 incoming changes - new heads: d84ced58aaa
2013-02-12 14:08:33 -08:00
Pierre-Yves David
853b87cfc0 mq: comply with filtering when injecting fake tags (issue3812)
mq was injecting fake tags whenever the revisions were accessible
to the filtering level.

This issue impacts hgweb since it's common to have "secret" mq
patches. As secret changesets are filtered by hgweb, the tags
computation could break.
2013-02-11 16:21:48 +01:00
Mads Kiilerich
9f7a8fb2c4 factotum: fix urllib2 import so it no longer relies on a demandimport bug
demandimport will do that urllib2 can be imported 'from mercurial' even though
it doesn't exist there.
2013-02-10 18:26:04 +01:00
Mads Kiilerich
5787baee50 spelling: fix some minor issues found by spell checker 2013-02-10 18:24:29 +01:00
Na'Tosha Bard
7b4ce40b7d largefiles: fix test and check code 2013-02-09 16:02:01 +00:00
Simon Heimberg
d394522225 histedit: always abort with same message when working dir is wrong.
Using only one message makes live easier for translators. The clearer
error message was supposed by Augie Fackler.
2013-08-03 16:40:13 +02:00
Simon Heimberg
6e94c23bab histedit: report when revisions to edit are not ancestors of working dir
Editing the history only is possible when the working dir is a descendant of
the revisions to edit. When this happens explain it by writing
  abort: %s is not an ancestor of working directory
2013-08-03 16:37:17 +02:00
Siddharth Agarwal
ace5cac25b manifestmerge: pass in branchmerge and force separately
This will be used in an upcoming patch.
2013-02-08 15:23:23 +00:00
Na'Tosha Bard
3d65ebe9c1 largefiles: make caching largefiles message more explicit
In some cases, caching largefiles may take a long time (if the user has
pulled a lot of new heads).  This patch makes it more clear what is happening,
by showing the number of heads we are caching largefiles for.
2013-02-09 15:08:21 +00:00
Na'Tosha Bard
5cbae337c9 largefiles: document behavior of caching largefiles for new heads 2013-02-09 15:25:46 +00:00
Mads Kiilerich
1f565a1b35 largefiles: docstrings for verify methods 2013-02-08 13:08:25 +01:00
Mads Kiilerich
e9a72ba5f1 largefiles: fold oddly named _verify into remotestore.exists 2013-02-08 13:00:08 +01:00
Augie Fackler
5c8acaf5b4 git convert: some versions of git use fatal: instead of error:
I saw this behavior with git 1.7.12 on my Mac.
2013-02-08 07:09:48 -06:00