Commit Graph

336 Commits

Author SHA1 Message Date
Augie Fackler
94a7ecbe68 Reorganize to have a more conventional module structure.
This means that hgsubversion now uses absolute imports instead of
relative ones, which makes the tests more reliable.
2009-05-13 21:39:39 -05:00
Augie Fackler
57b5041576 Use try/finally in an attempt to stop leaking svnserve processes. 2009-05-13 10:22:18 -05:00
Dan Villiom Podlaski Christiansen
a343bfe6af HgChangeReceiver: better diagnostics for invalid links
Issue better diagnostics when something pretends to be a link, but
isn't. This was reported by `doub' on #mercurial.
2009-05-13 18:00:31 +02:00
Dan Villiom Podlaski Christiansen
5c913fbb95 test_util: Make the patching of ui.ui.write_err() slightly more reusable. 2009-05-12 20:14:15 +02:00
Dan Villiom Podlaski Christiansen
a7e213adcc test_util: normalize path in svnls() 2009-05-12 20:12:32 +02:00
Dan Villiom Podlaski Christiansen
c36892b014 __init__: rewrite extension docstring to be slightly less hostile. 2009-05-19 11:05:45 +02:00
Dan Villiom Podlaski Christiansen
25a2353e91 Switch to using url scheme wrappers instead of duplicating each command we wrap.
The 'hg svn url' command has been killed; the replacement is
'.hg/hgrc'. More stuff related to its disappearance has been stripped,
including two tests.

HgChangeReceiver now takes a UUID argument, which it uses to ensure
that remote repositories remain unchanged. This is a temporary
solution, and I'm not entirely satisfied with how it's done either.

Access to the UUID file has been isolated in a HgChangeReceiver
property.

Some more tests have been updated to use ui.pushbuffer()/popbuffer(),
and to pass through the Mercurial API.

Moved the arguments to wrappers.pull() to the UI configuration.

Also, remove HgChangeReceiver.opts in favour of a 'usebranchnames'
instance & configuration variable. The name is taken from the
ConvertExtension.
2009-05-15 19:18:43 +02:00
Dan Villiom Podlaski Christiansen
1c7303a998 hg_delta_editor: simplify repository instantiation. 2009-05-09 14:46:12 +02:00
Dan Villiom Podlaski Christiansen
0b6459896f merge with stable 2009-05-09 12:36:17 +02:00
Dan Villiom Podlaski Christiansen
b76cd3613f Rename tag_repo.py to svnrepo.py and get rid of the 'fake' tags. 2009-05-09 12:34:29 +02:00
Dan Villiom Podlaski Christiansen
3de6c70c9e Remove leftover debug info. 2009-05-09 12:26:59 +02:00
Augie Fackler
fd079409fb push: Fix a bug in deletion of an entire tree.
This bug meant that if an entire subtree of the repo was
deleted and there were files at varying levels of the
hierarchy, then some of the files at higher levels
might escape deletion when the revision was pushed to svn.
2009-05-08 16:26:33 -05:00
Augie Fackler
61659a31ea Move some .warn() calls to noisy levels instead. 2009-05-08 16:11:52 -05:00
Augie Fackler
f1c5c61e5d Add an option to clone without branch names. 2009-05-08 16:11:08 -05:00
Dan Villiom Podlaski Christiansen
8646f77975 alternate approach for supporting svn schemes for repository paths
We now intercept the operations in the local repo class, and handle
the relevant operation ourselves. This frees us from wrapping all
relevant commands and replicating their functionality.

The implementation is incomplete; only one test has been modified to
use the standard Mercurial API with the changed URLs. Once changed,
those tests will likely reveal bugs or missing features in the new
wrappers. Also, new wrappers will be needed for handling conversion
flags such as -A/--authormap.
2009-05-07 20:50:53 +02:00
Augie Fackler
3ab8b47d30 Fix package name, use README for long_description 2009-05-03 22:01:23 -05:00
Augie Fackler
29c756e38c Ignore distutils generated files. 2009-05-03 22:01:01 -05:00
Augie Fackler
db322c0533 Style nit in setup.py 2009-05-03 21:57:48 -05:00
Augie Fackler
7d74895ced Less import * 2009-05-03 21:53:51 -05:00
Augie Fackler
74855c238a Merge with danchr's changes. 2009-05-03 21:44:53 -05:00
Patrick Mezard
e2670e5557 svnexternals: do not use peg revisions as --rev replacements
Peg revisions are now parsed separately. If a revision is supplied but not a
peg revision, we used the former as peg revision, as subversion seems to do.
2009-05-03 21:42:44 -05:00
Patrick Mezard
dbabc47d72 hg_delta_editor: missing plaintext paths are svn paths not branch paths 2009-05-03 21:42:43 -05:00
Patrick Mezard
b4010e516b hg_delta_editor: detect new branches issued from non-branch directories
This fix solves the following case: let's /dumb/layout/project be an existing
project. To normalize the trunk/branches/tags layout, people may do:

$ mkdir /project
$ mv /dumb/layout/project /project/project
# Oups, should have been trunk!
$ mv /project/project /project/trunk

trunk creation was ignore because:
- update_branch_map() sees it come from a non-branch copy source and ignores it
  (case #3).
- since it is not in self.branches, add_directory() ignores the non-existing path.
Then trunk is left uninitialized.

To solve this, we allow update_branch_map() to detect branches copied from
non-canonical locations.
2009-05-03 21:42:42 -05:00
Patrick Mezard
84cb3327bb hg_delta_editor: reformat huge comment, rename __determine_parent_branch() 2009-05-03 21:42:41 -05:00
Dan Villiom Podlaski Christiansen
a5b69c8d8c Change default author substitution to avoid updating test hashes.
Rather than '%s <%s%s>', just use '%s%s'. The two should be
functionally equivalent. All tests pass.

Added a comment about the handling of missing authors. This is tested
by test_push_to_default in tests/test_push_command.py; it is treated
the same as before.
2009-05-03 18:51:29 +02:00
Dan Villiom Podlaski Christiansen
dfbd282c53 svnwrap/tests: use the subprocess module rather than the popen module.
The output from the command is supressed. Use check_call() to ensure
the detection of failures.
2009-05-03 18:25:48 +02:00
Dan Villiom Podlaski Christiansen
134653252c A quick stab at a distutils installation script. 2009-05-03 15:29:59 +02:00
Dan Villiom Podlaski Christiansen
dab1411f87 Put authormap into a separate file, and make it much better too.
See the doc-strings in maps.py for details.
2009-05-03 15:28:43 +02:00
Dan Villiom Podlaski Christiansen
e80d09651d hg_delta_editor: fix _split_tag_path to actually work as intended.
I don't remember why I wrote this function, but it might be useful.

This changeset passes all tests, although I couldn't remember how to
run the comprehensive test suite.
2009-05-01 13:25:57 +02:00
Dan Villiom Podlaski Christiansen
0440b85931 svn_swig_wrapper: remove explicit invocation of the garbage collector
It's the Subversion bindings that are broken, not Python. I think.
2009-05-01 13:01:20 +02:00
Dan Villiom Podlaski Christiansen
4a604b8889 First merge, totally untested. 2009-05-01 10:28:59 +02:00
Patrick Mezard
564c68a81a cmdutil: fix svn path normalization corner case
When the subpath is empty we ended with "path/" instead of "path".
2009-04-29 12:01:31 +02:00
Patrick Mezard
47213a3ea8 Add 'updateexternals' to synchronize externals with remote repo.
To synchronize definitions in working copy .hgexternals with remote svn
repository:

$ hg svn updateexternals

To synchronize them with .hgexternals at revision REV:

$ hg svn updateexternals REV

Last synchronized externals referenced are stored in .hg/svn/externals (a dump
of the synchronized .hgexternals).
2009-04-22 23:24:58 +02:00
Patrick Mezard
c3904f7a56 hg_delta_editor: add timezone to default date to avoid DST issues 2009-04-28 21:16:35 +02:00
Patrick Mezard
2327836b0b cmdutil: fix islocalrepo() under Windows 2009-04-28 21:16:35 +02:00
Augie Fackler
0933c6ae94 BitBucket supports having the ReST declaration in a comment. 2009-04-27 19:11:00 -05:00
Martijn Pieters
cdd05a883d Implement the copy method on the mock ui to maintain it across tests.
See mercurial revision 2ffb2edf2c54.
2009-04-27 22:39:48 +02:00
Martijn Pieters
fb7240bc5e Replace mercurial.util.sort with sorted buildin (after mercurial cb38f4a2b698) 2009-04-27 09:39:39 -05:00
Martijn Pieters
e0df29b04e Rename parentui to src (after mercurial rev 9ec519785301)
Just pass in src to real_ui as a positional argument to avoid the problem in
the future.
2009-04-27 09:39:39 -05:00
Martijn Pieters
cdb6cab023 Implement parseurl support (#revision in repository urls)
Note: Normally when using parseurl, hg clone will treat the revision after # as
if it was passed in as --rev, treats that rev as a head and won't clone beyond
that. This wasn't implemented here, hence all the TODO's in the comments.

All we do is use the checkout parameter where appropriate to update the wc to
the selected revision.
2009-04-27 09:39:39 -05:00
Martijn Pieters
f7cafd1975 Implement -u/--update support when pulling.
Status messages now more closely follow standard hg pull. Added generic pull
tests as well as specific tests for this change.
2009-04-27 09:39:39 -05:00
Augie Fackler
5e74e21041 tools: bash script to convert tags as a stopgap until the tags refactor 2009-04-24 22:33:54 -05:00
Augie Fackler
a270012b6a util: drop 1.2 support in the encoding swap. 2009-04-24 21:07:59 -05:00
Augie Fackler
205682757f README: Now require 1.3. 2009-04-24 21:06:54 -05:00
Max Bowsher
276f37733e hg_delta_editor: Fix a bug in marking branches as deleted. 2009-04-24 21:04:25 -05:00
Martijn Pieters
9967e4b505 clone: prefer tip of default to overall tip when updating 2009-04-24 20:36:38 -05:00
Augie Fackler
0ca6ba9b90 push: Add a test that demonstrates base-text detection works 2009-04-24 20:31:17 -05:00
Augie Fackler
94c47be0bc clone: Fix url-escaping for new config parser 2009-04-24 20:26:00 -05:00
Augie Fackler
612c340307 util: kill unused function 2009-04-24 20:25:14 -05:00
Daniel Tang
bc7d0c40c8 Add help to the list of nourl commands 2009-04-23 14:51:13 -04:00