Commit Graph

4141 Commits

Author SHA1 Message Date
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