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
Thomas Arendsen Hein
4d29c6dc8e
Updated copyright notices and add "and others" to "hg version"
2007-06-19 08:51:34 +02:00
Matt Mackall
41d9aaebb8
Add support for url#id syntax
...
This allows you to do:
hg clone http://server/repo#stable
which is equivalent to:
hg clone -r stable http://server/repo
Future incoming, outgoing, and push commands will default to using
this id because it's recorded in the default path.
Other commands that accept URLs (push, pull, bundle, incoming, and
outgoing) also accept this syntax.
2007-06-01 18:40:14 -05:00
Matt Mackall
aa00d22e56
clone: checkout the "default" branch if available
2007-06-01 18:52:18 -05:00
Alexis S. L. Carvalho
744364abd4
merge with crew-stable
2007-02-13 10:25:45 -02:00
Alexis S. L. Carvalho
06a58ad86b
Try to pass repo.ui to reposetup hooks
...
The ui object we received in this function may belong to another repo,
which could be confusing from the hook point of view. Trying to use
the ui object from the newly created repo should avoid this confusion.
2007-02-08 16:31:21 -02:00
Matt Mackall
296d6a7cb8
Simplify i18n imports
2006-12-14 20:25:19 -06:00
Matt Mackall
f17a4e1934
Replace demandload with new demandimport
2006-12-13 13:27:09 -06:00