Commit Graph

421 Commits

Author SHA1 Message Date
Nicolas Dumazet
cd488569d7 hg.clone: fix branch value when passing a repo object (issue2267)
Since d6ca622d1122 the branch argument for addbranchrevs should be a tuple:
  (hashbranch, branches)
The right empty value therefore is (None, []) instead of None.
2010-07-02 15:05:21 +09:00
Sune Foldager
4e663d3541 improve --branch processing (and differentiate from # syntax)
Previously #foo and --branch foo were handled identically.
The behavior of #foo hasn't changed, but --branch now works like this:

1) If branchmap is not supported on the remote, the operation fails.
2) If branch is '.', substitute with branch of the working dir parent.
3) If branch exists remotely, its heads are expanded.
4) Otherwise, the operation fails.

Tests have been added for the new cases.
2010-06-10 12:46:09 +02:00
Matt Mackall
8ac0858186 Merge with stable 2010-06-08 15:57:59 -05:00
Sune Foldager
3577ed71f2 fix encoding bug in 66b9176ecbe4 2010-06-08 13:19:22 +02:00
Sune Foldager
ebb213954d push/pull: fix bug in "--branch ." handling
The branch wasn't expanded, so only the tip was operated on.
2010-06-07 16:28:23 +02:00
Sune Foldager
e0cc1e8ad9 merge with stable 2010-06-07 16:29:06 +02:00
Matt Mackall
86ebd43d71 remoteui: move from cmdutil to hg 2010-06-01 11:18:57 -05:00
Adrian Buehlmann
5f0d937313 clone: save hardlink state of util.copyfiles()
When trying to do hardlink-cloning, the os_link() call of the
first file tried already fails on Windows, if the source is on a
UNC path.

This change avoids calling os_link() for the rest of files, leaving
us with a *single* failed os_link() call per clone operation, if the
source can't do hardlinks.
2010-05-28 17:28:34 +02:00
Adrian Buehlmann
e782bd53a4 clone: print number of linked/copied files on --debug 2010-05-31 13:47:51 +02:00
Adrian Buehlmann
008aa04539 clone: save hardlink state of util.copyfiles()
When trying to do hardlink-cloning, the os_link() call of the
first file tried already fails on Windows, if the source is on a
UNC path.

This change avoids calling os_link() for the rest of files, leaving
us with a *single* failed os_link() call per clone operation, if the
source can't do hardlinks.
2010-05-28 17:28:34 +02:00
Matt Mackall
eb7971b34e Merge with stable 2010-05-11 17:03:44 -05:00
Brendan Cully
791f92f6bd Merge with stable 2010-03-18 14:36:24 -07:00
Sune Foldager
d6ef50d413 fix bug in hg.clone when passing in a repository object 2010-03-18 16:38:07 +01:00
Benoit Boissinot
3db7df2869 style: use consistent variable names (*mod) with imports which would shadow 2010-03-11 17:43:44 +01:00
Alexander Solovyov
f11ee5abee expand paths to local repository or bundle in appropriate classes
This avoids problem with unexpanded paths when it's not possible to
expand it at higher level (for example, if file:~/path/ is supplied as
path in schemes).
2009-12-07 12:31:45 +02:00
Sune Foldager
9fef9be505 addbranchrevs: fallback for older servers 2010-02-07 15:57:16 +01:00
Sune Foldager
3f138e6345 add -b/--branch option to clone, bundle, incoming, outgoing, pull, push 2010-02-07 15:23:46 +01:00
Sune Foldager
5020620fca interpret repo#name url syntax as branch instead of revision
Previously, the name part of an repo#name url was interpreted as a
revision, similar to using the --rev option. Now it is instead looked
up as a branch first, and if that succeeds all the heads of the branch
will be processed instead of just its tip-most head. If the branch
lookup fails, it will be assumed to be an revision as before (e.g. for
tags).
2010-02-07 14:29:07 +01:00
Sune Foldager
75a1470319 pull: with -u and -r, update to the first revision given
This makes pull consistent with clone. The actual change is in
mercurial.hg.parseurl, changing its checkout result, which is only
used for pull.
2010-02-06 20:24:51 +01:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Brendan Cully
9c496e1d92 share: use defaultdest to compute unspecified destination
This harmonizes with clone, and avoids creating a .hg in the current directory if
the source ends with a /
2009-12-19 22:55:33 -08:00
Matt Mackall
07d8da7a2f share: fix interaction with clone 2009-12-01 19:28:15 -06:00
Thomas Arendsen Hein
5490333861 Branch name printed since 00655544b9f3 now in local encoding. 2009-11-07 23:35:46 +01:00
Adrian Buehlmann
ba9637aae6 clone: add option -u/--updaterev 2009-11-05 11:05:13 +01:00
Adrian Buehlmann
a482b04850 hg.clone: report branch name on update 2009-10-16 23:57:34 +02:00
Stuart W Marks
928c430865 hg: say 'hg update' instead of 'hg up' in merge status message
Includes the change to the message itself, along with several test
output files that also had to change.
2009-09-17 22:39:38 -07:00
Martin Geisler
cc89e210eb hg: avoid combining translated strings
Combining translated string fragments into bigger strings is bad
practice because it removes context from the fragments. The translator
sees the fragments in isolation and might not jump back to the source
to see how a string like "%d files %s" is actually used.
2009-09-14 23:48:25 +02:00
Martin Geisler
235f78e4fb Merge with crew-stable 2009-09-04 23:34:51 +02:00
Matt Mackall
c34b180a9c Make distinct lookup error for localrepo.lookup
This allows clone/share to correctly distinguish lookup errors from
corruption errors and catch only the former.
2009-08-31 10:58:33 -05:00
Matt Mackall
2900a327ba Merge with i18n-stable 2009-08-12 12:06:12 -05:00
Matt Mackall
56469b1da7 update: make a naked except more specific (issue1766) 2009-07-25 19:04:08 -05:00
Matt Mackall
1dece1c619 Merge with stable 2009-08-12 12:07:11 -05:00
Matt Mackall
eba820848f Merge with crew 2009-07-27 18:38:20 -05:00
Martin Geisler
b61af83551 hg: better wrapping of string literal 2009-07-17 20:52:21 +02:00
Fred Wulff
affad77f81 Add (pre)outgoing hooks for local clones. 2009-04-17 16:34:43 -07:00
Matt Mackall
430046de97 subrepo: add update/merge logic 2009-06-15 02:45:38 -05:00
Matt Mackall
f004f8a57f share: allow dest to default to the basename of source 2009-06-13 18:16:44 -05:00
Matt Mackall
3132e79527 add helper function to create shared repos 2009-06-13 18:01:47 -05:00
Benoit Boissinot
13b1ecd60e clone: fall back to pull source repo cannot be locked, 039087cb3900 was a noop
039087cb3900 was a noop, it was missing the wait keyword
2009-05-28 17:44:57 +02:00
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