Commit Graph

9332 Commits

Author SHA1 Message Date
Bryan O'Sullivan
61197562ff verify: fix all doubled-slash sites (issue3665) 2012-10-24 09:27:47 -07:00
Pierre-Yves David
42a23bce4e obsolete: add missing line feed in debug error message 2012-10-19 13:52:34 +02:00
Thomas Arendsen Hein
6e6ed4e398 localrepo: translate "push includes X changeset" only once
This was introduced in 72831ff4aa10
2012-10-23 09:22:46 +02:00
Thomas Arendsen Hein
fd8f5397ba merge stable heads 2012-10-23 09:27:48 +02:00
Bryan O'Sullivan
0fb982e719 Merge repeated-slash fix 2012-10-22 21:54:36 -07:00
Bryan O'Sullivan
dde0f8331e verify: tolerate repeated slashes in a converted repo (issue3665)
These slashes are a hangover from issue3612, fixed in d5787cfaa7cf.

Although the bugfix in that commit is correct, the test it adds
does not replicate the conditions for the bug correctly.
2012-10-22 18:05:40 -07:00
Bryan O'Sullivan
9d4dd6b048 scmutil: add mustaudit delegation to filtervfs (issue3673) 2012-10-22 12:00:21 -07:00
Bryan O'Sullivan
b59090c617 scmutil: abstract out mustaudit delegation 2012-10-22 11:59:11 -07:00
Wagner Bruna
cc8c722c61 scmutil: generalize message to make it more i18n-friendly 2012-10-21 11:20:33 -02:00
Matt Mackall
9bae2c49ee update: check for missing files with --check (issue3595) 2012-10-22 17:23:31 -05:00
Matt Mackall
f5bc386500 remove: don't return error on directories with tracked files
Spotted by Sergey <sergemp@mail.ru>
2012-10-22 16:06:47 -05:00
Matt Mackall
86c978bc2c clone: don't %-escape the default destination (issue3145) 2012-10-19 14:47:55 -05:00
Matt Mackall
b170ca8911 repair: use node to track post-strip bookmark target
Revision numbers are unstable when non-consecutive revs are stripped.
2012-10-17 15:37:25 -05:00
Wagner Bruna
795c3947e9 wireproto: fix pushkey hook failure and output on remote http repo
Over http, a failed pushkey hook simply crashed the server, and
successful hook output was never sent to the client.
2012-10-15 18:37:34 -03:00
Sean Farley
26d22253ab phases: add a phase and phasestr method to file context 2012-10-16 17:09:50 -05:00
Kevin Bullock
6d33154670 bookmarks: simplify code
Remove some unnecessary return statements and collect some checks into
one place. As requested by Thomas Arendsen Hein <thomas@intevation.de>.
2012-10-17 12:15:23 -05:00
David Soria Parra
da3fc820fa bookmarks: abort when incompatible options are used (issue3663)
Options like --delete and --rename are incompatible with each
other. In this case we abort. We do not abort if the result is a nullop.
Nullops are: '--delete --inactive', '--delete --force'.
2012-10-17 11:50:47 +02:00
David Soria Parra
a224be4441 bookmarks: check bookmark format during rename (issue3662) 2012-10-17 08:44:49 +02:00
Sean Farley
a5e6af16d7 color: add additional changeset.phase label to log.changeset and log.parent
This allows the user to set different colors for each phase, e.g.

[color]
changeset.public = blue
changeset.draft = green
changeset.secret = red

In addition, this doesn't affect current configuration for custom log.changeset
colors, but rather adds the option for users that want to visually see which
changesets are amendable.
2012-10-16 13:35:58 -05:00
Augie Fackler
05dca2a258 http2: make it possible to connect w/o ssl on port 443
The fix is just to make sure we always pass use_ssl=False to non-SSL
connections.
2012-10-16 18:05:33 -05:00
Pierre-Yves David
abf7ca7986 branchpoint: remove useless intermediate set creation
We don't need to compute the set of all branchpoints. We can just check the
number of children that element of subset have. The extra work did not seems to
had particular performance impact but the code is simpler this way.
2012-10-15 17:43:05 +02:00
Pierre-Yves David
dcd3550206 clfilter: use changelog to iterate over the repo in branchpoint
Otherwise filtered changesets may cause false positives in `branchpoint()`.
2012-10-15 17:42:40 +02:00
Adrian Buehlmann
ac772dd620 store: fncache may contain non-existent entries (fixes e76e2e89c766) 2012-10-12 10:52:33 +02:00
Adrian Buehlmann
637c55b9a8 store: add new _exists helper function on fncachestore 2012-10-12 10:52:32 +02:00
Adrian Buehlmann
f86ce05929 store: move __contains__() implementation from class fncache into fncachestore
This restores the previous semantics of fncache.__contains__().

(a followup to e76e2e89c766)
2012-10-12 10:40:09 +02:00
Pierre-Yves David
2bf3f1f2c0 obsolete: flip obstore.successors and obsolete.precursors
People were confused by the fact `obstore.precursors` contained marker allowing
to find "precursors" and vice-versa.

This changeset changes their meaning to:

- precursors[x] -> set(markers on precursors edges of x)
- successors[x] -> set(markers on successors edges of x)

Some documentation is added to clarify the situation.
2012-10-16 15:39:12 +02:00
Pierre-Yves David
e7bae9b381 obsolete: add example of marker usage in the documentation
Recent discussion with Augie Fackler pointed the lack of such example in the
documentation.
2012-10-14 23:33:10 +02:00
Pierre-Yves David
57d4155cf7 obsolete: cheap detection of nullid as successors
Nullid as successors create multiple issues:

- Nullid revnum is -1, confusing algorithm that use revnum unless you add
  special handling in all of them.
- Nullid confuses "divergent" changeset detection and resolution. As you can't
  add any successors to Nullid without being in even more troubles

Fortunately, there is no good reason to use nullid as a successor. The only
sensible meaning of "succeed by nullid" is "dropped" and this meaning is already
covered by obsolescence marker with empty successors set.

However, letting some nullid successors to slip in may cause terrible damage in
such algorithm difficult to debug. So I prefer to perform and clear detection of
of such pathological changeset. We could be much smarter by cleaning up nullid
successors on the fly but it would be much for expensive. As core Mercurial does
not create any such changeset, I think it is fine to just abort when suspicious
situation is detected.

Earlier experimental version created such changesets, so there are some out
there.  The evolve extension added the necessary logic to clean up its mess.
2012-10-15 00:12:06 +02:00
Siddharth Agarwal
a5e71891bd commands: don't infer repo for commands like update (issue2748)
Maintain a whitelist of commands to infer the repo for instead. The whitelist
contains those commands that take file(s) in the working dir as arguments.
2012-10-16 11:43:15 -07:00
Siddharth Agarwal
a03ea859ec hgweb: make the escape filter remove null characters (issue2567) 2012-10-15 09:43:34 -07:00
David M. Carr
c447f272ec bookmarks: when @ bookmark diverges, don't double the @ sign (BC)
This changeset treats the bookmark "@" as a special case for the naming of
divergent bookmarks, as per the tables below.  For the <no alias> case, the
actual suffix will vary, depending on what suffixes are already in use.

Before:
Bookmark | Remote     | Divergent Bookmark
--------------------------------------
foo      | bar        | foo@bar
foo      | <no alias> | foo@1
@        | bar        | @@bar
@        | <no alias> | @@1

After:
Bookmark | Remote     | Divergent Bookmark
--------------------------------------
foo      | bar        | foo@bar
foo      | <no alias> | foo@1
@        | bar        | @bar
@        | <no alias> | @1

This case is likely to be more common now that c1644655c164 has made the "@"
bookmark have special meaning to clone.

The change in behavior was discussed on the mailing list in the thread below:
http://markmail.org/thread/rwedgxp7le5j2h2f
2012-10-15 23:54:54 -04:00
Matt Mackall
5b51bfe8c9 vfs: use self.write to write symlink placeholders
The existing write() path is much more robust than the hand-rolled
version that was inlined here.
2012-10-13 15:10:39 -05:00
Matt Mackall
c3b65813c8 vfs: backout fchmod change from 0232a1565a3d
Only works on Unix with Python >= 2.6, need a different fix.
2012-10-13 15:03:00 -05:00
Angel Ezquerra
8a78ba05e3 hgwebdir: make collapsed folders easier to distinguish from repositories
Add a "/" character after the collapsed folder names, to make them easier to
distinguish from regular repository and subrepository entries.
2012-07-26 21:29:39 +02:00
FUJIWARA Katsunori
477c2590ac help: indicate help omitting if help document is not fully displayed
Before this patch, there is no information about whether help document
is fully displayed or not.

So, some users seem to misunderstand "-v" for "hg help" just as "the
option to show list of global options": experience on "hg help -v" for
some commands not containing verbose containers may strengthen this
misunderstanding.

Such users have less opportunity for noticing omitted help document,
and this may cause insufficient understanding about Mercurial.

This patch indicates help omitting, if help document is not fully
displayed.

For command help, the message below is displayed at the end of help
output, if help document is not fully displayed:

    use "hg -v help xxxx" to show more complete help and the global
    options

and otherwise:

    use "hg -v help xxxx" to show the global options

For topics and extensions help, the message below is displayed, only
if help document is not fully displayed:

    use "hg help -v xxxx" to show more complete help

This allows users to know whether there is any omitted information or
not exactly, and can trigger "hg help -v" invocation.

This patch causes formatting help document twice, to switch messages
one for omitted help, and another for not omitted. This decreases
performance of help document formatting, but it is not mainly focused
at help command invocation, so this wouldn't become problem.
2012-10-18 10:31:15 +09:00
Matt Mackall
22317edb2f httpclient: fix calling convention violation 2012-10-18 23:55:15 -05:00
Pierre-Yves David
b3155544bd push: refuse to push bumped changeset
This applies the same logic as used for `obsolete` and `unstable` changesets.
Refuse to push them without force.

We'll probably want to factor this logic with two new functions
`pctx.troubled()` and `ctx.troubles()`. But I'm waiting for the third
"trouble" to make it into core.
2012-10-19 00:50:12 +02:00
push includes an xxx changeset: yyyyyyyyyy
8af08441ab obsolete: simplify push abort message
to:   push includes xxx changeset: yyyyyyyyyy
2012-10-19 00:46:39 +02:00
Pierre-Yves David
b3f5aa66c1 context: add a bumped method to changectx
Same as `unstable()`, returns true if the changeset is bumped.
2012-10-19 00:43:44 +02:00
Pierre-Yves David
14f39efa9f obsolete: add a flag that allows fixing "bumped" changeset
The first obsolescence flag is introduced to allows for fixing the "bumped"
changeset situation.

    bumpedfix == 1.

Creator of new changesets intended to fix "bumped" situation should not forget
to add this flag to the marker. Otherwise the newly created changeset will be
bumped too. See inlined documentation for details.
2012-10-19 00:41:53 +02:00
Pierre-Yves David
d1da4847fe debugobsolete: add --flags option
This options allows to specify the `flag` part of obsolete markers. For details
about marker flags, check the `mercurial/obsolete.py` documentation. Some random
flag are added to a marker to test this feature.
2012-10-15 14:45:27 +02:00
Pierre-Yves David
6f4d6c0cd4 revset: add a bumped revset
Select bumped changesets.
2012-10-19 00:39:06 +02:00
Pierre-Yves David
7463f55b32 obsolete: add the detection of bumped changeset.
Bumped changesets are non-public changesets that tries to succeed a public()
changeset.
2012-10-19 00:36:18 +02:00
Pierre-Yves David
19b261d640 obsolete: have allsuccessors takes a list of nodes
Additional logic, used to detect mutable history troubles, will need to quickly
compute successors of a whole set of changeset.
2012-10-16 15:49:58 +02:00
Pierre-Yves David
1d9b00f6af obsolete: rename anysuccessors into allsuccessors
The "any" prefix looks like it returned a boolean. `allsuccessors` is more
accurate.
2012-10-19 00:30:11 +02:00
Pierre-Yves David
bc08c6dbf1 obsolete: rename getobscache into getrevs
The old name was not very good for two reasons:
- caller does not care about "cache",
- set of revision returned may not be obsolete at all.

The new name was suggested by Kevin Bullock.
2012-10-19 00:28:13 +02:00
Kevin Bullock
7baa4b0e9c bookmarks: further flatten code
This hopefully clarifies the behavior when no NAME is passed, by
separating the branches for listing bookmarks vs. deactivating the
current bookmark.
2012-10-18 16:34:13 -05:00
Kevin Bullock
13bf0fbbec scmutil: add bad character checking to checknewlabel
This factors out the checks from tags and bookmarks, and newly applies
the same prohibitions to branches. checknewlabel takes a new parameter,
kind, indicating the kind of label being checked.

Test coverage is added for all three types of labels.
2012-10-17 21:42:06 -05:00
Kevin Bullock
4abe92a68a tag: disallow '\0' in tag names
This brings the list of disallowed characters in line with bookmarks.
2012-10-17 21:39:07 -05:00
Kevin Bullock
68efaf1422 dirstate: use scmutil.checknewlabel to check new branch name 2012-10-17 21:32:19 -05:00