Commit Graph

735 Commits

Author SHA1 Message Date
Dan Villiom Podlaski Christiansen
266d07be60 editor: handle property changes to links.
Previously, property changes to links caused 'link ' to be prepended
to the link destination. Removing a line that prepended it in
Revision::set() appears to fix it. In these cases, the "file marked as
link, but contains data" warning might be triggered. This should be
safe, so it's lowered to a note and the language made less conclusive.

In order to test this, extra revisions are added to the
'symlinks.svndump' fixture. As one of the new revisions add a link
that points to 'link to this', a check that asserted that link
destinations must not start with 'link ' was removed. This change is
safe, as the test later on asserts exact equality with the contents of
the 'links' dictionary.
2010-11-09 13:05:16 +01:00
Dan Villiom Podlaski Christiansen
4305e3545f help topic: numerous cleanups.
Many of these are thanks to timeless' review!
2010-11-04 18:24:18 +01:00
Patrick Mezard
5f20856c4b stupid: handle patch.iterhunks() changed brought by 909cb420154c 2010-11-03 22:03:42 +01:00
anatoly techtonik
51b4a561d4 usage examples for single directory clones 2010-10-25 16:20:32 +03:00
Dan Villiom Podlaski Christiansen
594b08e65f help topic: mention how "hg clone" can delete stuff.
This quip was requested by Steve Borho.
2010-10-30 19:58:32 -05:00
Dan Villiom Podlaski Christiansen
2fa6c3592c maps: map a missing author to '(no author)'
"None" doesn't really make much sense, so we use what 'svn log' shows
instead. This also fixes mapping this author to something else.
2010-10-09 16:20:52 -05:00
Dan Villiom Podlaski Christiansen
09bf857897 test_util: use SkipTest if provided by the unittest module.
This is the case with Python 2.7.
2010-10-09 16:20:52 -05:00
Augie Fackler
7b2029d1b8 Merge 2010-10-10 10:22:37 -05:00
Dan Villiom Podlaski Christiansen
5d7a95eac5 setup/README: update Subvertpy requirement to 0.7.4. 2010-10-09 10:16:07 -05:00
Dirkjan Ochtman
bfc7292462 implement tag renames
This uses a separate map, since the purpose is very different from the purpose
of the TagMap that we currently have. It seemed to me that unifying both will
only serve to make the implementation more complicated. The name TagRenames
is not that elegant, but I didn't have any better idea. Feel free to change.
2010-10-08 19:07:04 +02:00
Dirkjan Ochtman
c868a8ce9c rename TagMap to Tags, to free up the TagMap name 2010-10-06 16:50:10 +02:00
Augie Fackler
79afa2e8c5 tests: fix test skipping in pure unittest 2010-10-08 13:58:26 -05:00
Dirkjan Ochtman
6b1191ea6a keep variables more local, add some whitespace 2010-10-06 15:18:05 +02:00
Dirkjan Ochtman
c6d23ef903 fix some style nits 2010-10-06 15:18:15 +02:00
Dirkjan Ochtman
8dad8599ed fix some line lengths 2010-10-06 15:18:23 +02:00
Augie Fackler
2dea063a65 revset tests: use requiresmodule decorator 2010-10-05 17:30:01 -05:00
Dan Villiom Podlaski Christiansen
04eaea5235 uisetup: add fromsvn() and svnrev() revsets. 2010-10-05 16:26:19 +02:00
Augie Fackler
02dcb2eece test_template_keywords: use new requiresmodule decorator 2010-10-04 23:03:28 -05:00
Augie Fackler
a66c5fb585 test_util: new requiresmodule decorator for tests that require a feature 2010-10-04 23:03:12 -05:00
Augie Fackler
7f3bfdf9b1 test_util: refactor requiresoption to ease creation of other skip decorators 2010-10-04 23:02:15 -05:00
Dan Villiom Podlaski Christiansen
dc354599e2 wrapper: fail properly with unsupported versions of Subvertpy (fixes #212)
Calling subvertpy.wc.api_version() will raise an AttributeError with
versions of Subvertpy prior to 0.7.4. This AttributeError completely
breaks hgsubversion, as our infrastructure assumes that only
ImportErrors are raised during imports.

Delaying the call to api_version() until after the Subvertpy version
check should make things work again.
2010-10-03 17:53:20 +02:00
Dan Villiom Podlaski Christiansen
7a95293acb svnwrap: fix handling of quotable URLs (fixes #197, refs #132)
The way hgsubversion handles URLs that may or may not be quoted is
somewhat fragile. As part of fixing issue 132 in 06d89c2063a2, the
path component of URLs was always quoted. The URL has been attempted
encoded since the initial check-in.

The fix from 06d89c2063a2 was incomplete; reverting it allows us to
clone a URL with a '~' in it.[1] Encoding the URL as UTF-8 seldom
works as expected, as the default string encoding is ASCII, causing
Python to be unable to decode any URL containing an 8-bit
character.

The core problem here is that we don't know whether the URL specified
by the user is quoted or not. Rather than trying to deal with this
ourselves, we pass the problem on to Subversion. Then, we obtain the
URL from the RA instance, where it is always quoted. (It's worth
noting that the editor interface, on the other hand, always deals with
unquoted paths...)

Thus, the following invariants should apply to SubversionRepo
attributes:
- svn_url and root will always be quoted.
- subdir will always be unquoted.

Tests are added that verify that it won't affect the conversion
whether a URL is specified in quoted or unquoted form. Furthermore, a
test fixture for this is added *twice*, so that we can thoroughly test
both quoted and unquoted URLs. I'm not adding a test dedicated to
tildes in URLs; it doesn't seem necessary.

[1] Such as <https://svn.kenai.com/svn/winsw~subversion>.
2010-10-04 21:00:36 -05:00
Augie Fackler
04680bd261 test_push_dirs: use common commit-building infrastructure 2010-10-02 17:44:08 -05:00
Augie Fackler
1c831e7ab3 requiresoption: raise SkipTest if available
This has the unfortunate (I guess?) side effect that you can no longer
use pure unittest to run skipped tests if nose or unittest2 is
installed.
2010-10-02 16:44:37 -05:00
Augie Fackler
a804a68cdf requiresoption: clean up docstring 2010-10-02 16:44:17 -05:00
Dan Villiom Podlaski Christiansen
799dc6ce7b help topic: cosmetic improvements.
First, use of :hg:`...` is replaced with ``hg ...``. The former syntax
isn't useful outside core Mercurial. Second, a few instances of `...`
are replaced with ``...``. The minirst parser doesn't distinguish
between the two, but using docutils, the former results italics and
the latter in fixed width text. Finally, a few extra ``...`` are added.

With these changes, we could process the help topic with rst2html and
put it somewhere appropriate on the internet.
2010-09-29 18:04:26 +02:00
Dan Villiom Podlaski Christiansen
0cae46f932 clone: call the wrapped function (fixes #181)
This is a regression that was brought to my attention in #mercurial:
hgsubversion breaks the --update flag. The cause is that we call
hg.clone() directly rather than the original wrapped function. A
comment in 'wrapper.py' noted that the call to hg.clone() should be
kept in sync with 'mercurial/commands.py'. That didn't happen.

The original reason for calling hg.clone() directly was that we needed
its return values. Another wrapper is added (and cleared) within
clone() to get them anyway.
2010-09-29 18:04:26 +02:00
Dan Villiom Podlaski Christiansen
d7fde1dbae tests & help: fix compatibility with Mercurial 1.4 and earlier.
The --branch option to clone, pull, etc., was introduced in 1.5, and
our handling of it assumes that Mercurial also provides it. As a
result, both documentation and the test are changed to reflect this.
2010-09-29 18:04:26 +02:00
Dan Villiom Podlaski Christiansen
c52fcd858e test_util: add requiresoption decorator function. 2010-09-29 18:04:26 +02:00
Dan Villiom Podlaski Christiansen
182aa26e32 svnrepo: make the svnurl property obtain the URL from Subversion.
This causes an access to the svnurl property to connect to the
repository. One of the tests uses an invalid URL, and so had to be
updated to bypass this.
2010-09-29 18:04:26 +02:00
Dan Villiom Podlaski Christiansen
cf80fcfd04 subvertpy wrapper: check against Subversion version compiled against.
The previously used method for checking the Subversion version,
subvertpy.wc.version(), reported back the version of the runtime
library used. This is not what we're interested in; we want to know
what version it was compiled against.

These functions were not available in Subvertpy 0.7.3, necessitating
the earlier bump of the version requirement to 0.7.4.
2010-09-29 18:04:26 +02:00
Dan Villiom Podlaski Christiansen
8c1023cd7c subvertpy wrapper: bump version requirement to 0.7.4.
0.7.4 was released on 2010-09-25 or 25 September 2010.
2010-09-29 18:04:26 +02:00
Dan Villiom Podlaski Christiansen
d0bade927f templatekw: clean up implementation & test; add help.
The core logic is cleaned up and moved to the wrappers module. The
test made to test that it works with original Mercurial changesets, is
cleaned up so that it can be more easily extended in the
future. Finally, documentation is added for the feature.
2010-09-29 18:04:26 +02:00
Dan Villiom Podlaski Christiansen
ed55dc0ce6 test_util: use the Mercurial dispatch logic for cloning repositories.
This makes our test environment more similar to deployment environments.
2010-09-24 22:11:24 +02:00
Peter Arrenbrecht
a97590f5ae subvertpy: fix bug with pushing changes to stuff in subdirs
Seems one needs to call direditor.open_file(path) with a full path, not
one that is relative to the direditor's directory.
2010-09-23 13:50:17 +02:00
Dan Villiom Podlaski Christiansen
dd4b302e9a pull: reveal the handled SubversionException to --traceback. 2010-09-14 21:03:02 +02:00
Dan Villiom Podlaski Christiansen
d624550482 subversion.rst: mention externals support limitations. 2010-09-07 14:33:56 +02:00
Dan Villiom Podlaski Christiansen
076d839f19 subversion.rst: list memory leaks in the section on limitations 2010-09-07 14:33:56 +02:00
Dan Villiom Podlaski Christiansen
37ae8de40c verify: fix verifying mapped branches. 2010-09-07 14:33:56 +02:00
Dan Villiom Podlaski Christiansen
ee6b1311b0 clone: replace the --singlebranch with overloading for --branch
Instead of adding yet another option, we take the --branch option to
mean the resulting branch name. It's stored in the branch map.
2010-09-23 16:54:27 +02:00
Dan Villiom Podlaski Christiansen
aca3f33ea4 test_push_dirs.py: activate tests that were previously overlooked
The existing tests were rather weird, so they were cleaned up a bit
while at it.
2010-09-23 15:27:08 +02:00
Dan Villiom Podlaski Christiansen
647475e9a2 tests_urls: activate a test that was previously overlooked 2010-09-14 19:24:55 +02:00
Dan Villiom Podlaski Christiansen
4cb42fcb70 svnwrap: improve error message when no bindings are found. 2010-09-14 15:25:45 +02:00
Dan Villiom Podlaski Christiansen
bd458ffecd testrunner: don't use os.putenv(), as it may not affect os.environ. 2010-09-14 15:25:45 +02:00
Dan Villiom Podlaski Christiansen
1447707dac tests: enable hgsubversion in the generated UI.
This allows testing hgsubversion using Mercurial's dispatch logic.
2010-09-20 17:08:18 +02:00
Dan Villiom Podlaski Christiansen
6909ff1bc2 subvertpy_wrapper: don't assume the version is a three-tuple (fixes #206)
0.7.3.1 breaks this. While at it, the capitalisation of `Subvertpy' is
made consistent, and the Subversion tag, if present, is included in
the output.
2010-09-14 21:02:49 +02:00
Peter Arrenbrecht
76a82dfc04 subvertpy: set default username/pwd as with swig
Fixes wrong user name being used for pushed commits.
2010-09-15 17:50:30 +02:00
Peter Arrenbrecht
293fa6f0e3 clone: add --singlebranch option
Allows one to specify branch name for layout=single without an external
branchmap file.
2010-09-15 17:49:27 +02:00
Peter Arrenbrecht
700d808aa5 push: simplify code for remapping rebased node ids 2010-09-10 07:50:40 +02:00
Peter Arrenbrecht
01cf3d3249 push: fix case where we get >1 revs back after svn commit
This hinges on looking not only at children(), but at descendants()
to find things.
2010-09-08 10:43:02 +02:00