Brett Carter
d69cd3912f
clone: try updating to the actual changeset specified in options
...
When cloning with the -r option or # url format from a tag the destination
repo most likely won't have the tag. We can save the lookup result to get to
the correct parent anyway. Similar to issue1306, but for tags.
2009-05-14 22:00:56 +02:00
Simon Heimberg
09ac1e6c92
separate import lines from mercurial and general python modules
2009-04-28 17:40:46 +02:00
Martin Geisler
750183bdad
updated license to be explicit about GPL version 2
2009-04-26 01:08:54 +02:00
Matt Mackall
68db339c4b
clone: config escaping no longer needed
2009-04-26 16:50:43 -05:00
Martijn Pieters
4abe231925
hg: allow hg.parseurl(url, None)
...
In many places hg.parseurl is called with a url and "opts.get('rev')",
suggesting the second, optional argument can be None. Because opts['rev']
usually defaults to [] this never happens in practice.
However, extensions don't necessarily behave the same, but do copy this
pattern.
Also, include wider hg.parseurl tests, beyond a demonstration of the problem.
2009-04-24 18:17:42 +02:00
Ronny Pfannschmidt
9c365a3b4f
switch dircleanup in mercurial.hg.clone from gc based to explicit
2009-04-22 02:01:22 +02:00
Ronny Pfannschmidt
5356baa346
switch lock releasing in the core from gc to explicit
2009-04-22 02:01:22 +02:00
Steve Borho
63d4e6092c
on clone failure, only remove directories we created
...
If the user created the clone target directory before running
the clone command, only cleanup the .hg/ repository when errors
occur. Leave the empty target directory in place.
2009-03-31 21:21:53 -05:00
Steve Borho
ad54f46fa2
allow clone into existing but empty directories
2009-03-29 16:15:06 -05:00
Augie Fackler
bf90b0cbb4
merge: better error messages to lead users to hg update --clean to abandon merges.
...
Fixes issue1533.
2009-03-04 13:06:16 -06:00
Matt Mackall
76c90d50e6
error: move lock errors
...
rename LockException to LockError
2009-01-12 11:09:14 -06:00
Benoit Boissinot
abff8a39e9
add a comment about the need of hg._update()
2008-12-28 19:59:42 +01:00
Benoit Boissinot
ea7fe6dacc
remove unused variables
2008-10-28 19:25:26 +01:00
Dirkjan Ochtman
ba6b67f951
merge with crew-stable
2008-09-24 13:50:29 +02:00
Dirkjan Ochtman
fcf19417f1
clone: honor -r even when pulling named branches
2008-09-24 13:10:09 +02:00
Benoit Boissinot
66c79ea6b0
merge with -stable
2008-09-22 14:47:21 +02:00
Benoit Boissinot
0d1cd8705f
Escape '%' when writing to hgrc (issue1199)
...
Fixes clone with paths containing '%'.
Patch provided by mjc.
2008-09-20 15:00:58 +02:00
Benoit Boissinot
5562ddda56
fix regression on empty repo cloning introduced by d87e43563bf4
...
The store directory wasn't copied. Unconditionally create the directories
instead.
2008-08-29 16:50:11 +02:00
Matt Mackall
3bf58ba630
clone: get a list of files to clone from store
2008-08-13 20:18:44 -05:00
Bryan O'Sullivan
369f2e957f
repo: add rjoin method
2008-04-11 22:19:52 -07:00
Bryan O'Sullivan
6676f1cebf
parseurl: make revs optional
2008-04-11 22:19:51 -07:00
Bryan O'Sullivan
99462bd4ec
Hoist localpath to the top level
2008-04-11 22:18:38 -07:00
Matt Mackall
edf5a0f5d0
resolve: new command
...
- add basic resolve command functionality
- point failed update and merge at resolve
2008-04-11 12:52:56 -05:00
Adrian Buehlmann
153675561e
clone: print "updating working directory" status message
...
With this change, "hg clone" looks like this:
% hg clone http://example.com/repo/big big
requesting all changes
adding changesets
adding manifests
adding file changes
added XXX changesets with XXX changes to XXX files
updating working directory
XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
So the user sees
% hg clone http://example.com/repo/big big
requesting all changes
adding changesets
adding manifests
adding file changes
added XXX changesets with XXX changes to XXX files
updating working directory
while Mercurial is writing to disk to populate the working directory
With this change, "hg clone" looks like this:
% hg clone big big-work
updating working directory
XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
2008-03-21 14:52:24 +01:00
Matt Mackall
0dec779241
clone: use cancopy
2008-03-20 11:12:35 -05:00
Joel Rosdahl
c26213193c
Avoid importing mercurial.node/mercurial.repo stuff from mercurial.hg
2008-03-06 22:51:16 +01:00
Joel Rosdahl
5dae3059a0
Expand import * to allow Pyflakes to find problems
2008-03-06 22:23:26 +01:00
Thomas Arendsen Hein
94ab532ffb
Allow "file://localhost/" in addition to "file:///" (issue728)
...
file://localhost/ URLs are generated by Mac OS X API calls like
[NSURL fileURLWithPath:].
Imported patch from Paul Bx.
2008-02-22 21:58:15 +01:00
Alexis S. L. Carvalho
ffa3574a24
merge with crew-stable
2008-02-13 19:34:28 -02:00
Alexis S. L. Carvalho
b7de0fe439
clone: make things work when source is a repo object
2008-02-13 18:37:38 -02:00
Alexis S. L. Carvalho
d7bfbe69bb
clone: expand the path before saving it in .hg/hgrc
...
This should fix issue976
2008-02-13 18:37:38 -02:00
Patrick Mezard
3cc8f21213
hg: fail upon copy/link errors while cloning locally
2007-12-27 22:28:41 +01:00
Matt Mackall
ad0a02c7c8
merge: make return codes more sensible
...
Commands that call merge were exiting with a return code equal to the
number of unresolved files. We now return 1 if there are unresolved
files.
2007-12-10 10:24:14 -06:00
Matt Mackall
6a1dd997b2
clone: fix race with same target directory (issue716)
...
Whichever side creates .hg first wins the race, and the other aborts
politely without deleting the tree.
2007-12-02 13:37:30 -06:00
Benoit Boissinot
e0d07dc91a
merge with crew
2007-08-31 23:15:44 +02:00
Benoit Boissinot
5025962412
merge with crew-stable
2007-08-31 22:31:43 +02:00
Benoit Boissinot
5e4804df51
fix the dummy 00changelog.i not being copied on clone
2007-08-31 22:31:03 +02:00
Alexis S. L. Carvalho
714fa94597
Merge with crew-stable
2007-08-27 02:21:58 -03:00
Alexis S. L. Carvalho
b7234419e2
clone: remove "file://" before making the path absolute
...
This avoids writing bogus paths to .hgrc. Fixes issue695.
2007-08-27 01:44:35 -03:00
Alexis S. L. Carvalho
616367be9a
clone: if "url#rev" was given, update to rev
2007-08-27 01:44:35 -03:00
Alexis S. L. Carvalho
88d2731fa8
parseurl: also return the revision after the "#"; add a test
2007-08-27 01:44:35 -03:00
Alexis S. L. Carvalho
dc23a7db18
Move cmdtable and reposetup handling out of extensions.py
...
A new function (extensions.extensions) allows the code that is
interested in those attributes to handle them directly.
This allows some cleanups of extensions.py. Notably, we can
remove the extensions.commandtable hack.
It also makes it easier to add standard extension attributes,
like a "hgwebsetup" function or a "helptable" dict that augments
the data in help.py, etc.
2007-08-17 17:33:27 -03:00
Matt Mackall
7065cf1716
Merge with crew
2007-08-17 00:35:16 -05:00
Benoit Boissinot
0369364273
merge with -stable
2007-08-17 00:43:49 +02:00
Benoit Boissinot
c012edc900
clone: do not delete the target if only the update fails
2007-08-17 00:42:22 +02:00
Matt Mackall
1d9daf6473
move parseurl from cmdutil to hg
2007-08-15 16:10:36 -05:00
Matt Mackall
3a3bd8ec5b
Make repo locks recursive, eliminate all passing of lock/wlock
2007-07-21 16:02:10 -05:00
Matt Mackall
3e13c68628
Use try/finally pattern to cleanup locks and transactions
2007-07-21 16:02:10 -05:00
Thomas Arendsen Hein
d486a44410
Removed deprecated hg:// and old-http:// protocols (issue406)
2007-07-08 09:54:42 +02:00
Matt Mackall
dc9134201b
extensions: untangle some recursive dependencies
2007-07-05 15:37:23 -05:00