Commit Graph

443 Commits

Author SHA1 Message Date
Peter Arrenbrecht
8f2d068a05 discovery: avoid discovery when local graph is a subset of remote
Immediately sends local's heads to the server to check whether the server knows them all.
If it does, we can call getbundle immediately.

Interesting test output changes are:

-  added 1 changesets with 0 changes to 1 files (+1 heads)
+  added 1 changesets with 0 changes to 0 files (+1 heads)

-> The new getbundle() actually fixes a bug vs. changegroupsubset() in that it no longer
returns unnecessary files when file revs are reused.

warning: repository is unrelated
+  requesting all changes

-> The new use of common instead of bases correctly indicates that an unrelated pull
gets all changes from the server.
2011-03-23 16:06:55 +01:00
Matt Mackall
9bb3fa8c69 merge with stable 2011-03-17 17:08:13 -05:00
Miloš Hadžić
b3d3d7aa76 push/outgoing: print remote target path even if there's an error (issue2561)
This is a simple patch to make hg push/hg outgoing print their remote target
path even if the operation fails. I'm not sure if the original behavior was by
design.

This patch also changes one test to reflect the changed behaviour.
2011-03-17 22:55:02 +01:00
David Soria Parra
d5ce5f0e0b hg: add support for cloning bookmarks 2011-03-13 12:24:17 +01:00
Mads Kiilerich
adb37b3b39 merge with stable 2011-01-28 03:09:22 +01:00
Mads Kiilerich
e10e504454 url: 'ssh known host'-like checking of fingerprints of HTTPS certificates
Known fingerprints of HTTPS servers can now be configured in the
hostfingerprints section. That makes it possible to verify the identify of web
servers without configuring and trusting the CA chain.

Limitations:
* Portnumbers are ignored, just like with ordinary certificates.
* Host name matching is case sensitive.
2011-01-28 02:57:59 +01:00
Eduard-Cristian Stefan
c66ec9cf09 url: expand path for web.cacerts 2011-01-02 15:30:12 +02:00
Martin Geisler
dc8a50e193 merge with stable 2011-01-05 15:56:03 +01:00
Mads Kiilerich
d9f11887ef https: use web.cacerts configuration from local repo to validate remote repo 2010-12-27 17:49:58 +01:00
Mads Kiilerich
2f015848bf merge with stable 2010-12-27 17:54:45 +01:00
Greg Ward
885d349b11 merge: document some internal return values. 2010-12-13 11:46:31 -05:00
Matt Mackall
8b31da4540 branch: operate on branch names in local string space where possible
Previously, branch names were ideally manipulated as UTF-8 strings,
because they were stored as UTF-8 in the dirstate and the changelog
and could not be safely converted to the local encoding and back.

However, only about 80% of branch name code was actually using the
right encoding conventions. This patch uses the localstr addition to
allow working on branch names as local strings, which simplifies
handling so that the previously incorrect code becomes correct.
2010-11-24 15:56:32 -06:00
Nicolas Dumazet
6b618a96de outgoing: unify common graphlog.outgoing and hg.outgoing code 2010-10-15 05:21:51 +02:00
Nicolas Dumazet
15e204f50d bundlerepo: unify common code into a new getremotechanges
The pattern where we fetch incoming remote changes and return
them as a local bundlerepo seems common. It's nicer to have this
code unified.
2010-10-14 22:41:43 +02:00
Nicolas Dumazet
171049119e incoming: unify code for incoming and graphlog.incoming 2010-10-14 21:36:00 +02:00
Nicolas Dumazet
631a3bb472 incoming: rename variable
Groundwork so that incoming and graphlog.incoming code look the same and get
easier to unify.
2010-10-14 21:37:00 +02:00
Erik Zielke
ddbd88fdcf incoming/outgoing: Fix recursion on sub repositories
Incoming and outgoing are fixed so they go through the whole three of
repositories instead of only visiting first level of sub repositories.
2010-09-24 12:00:55 +02:00
Brodie Rao
4be7b3bfc3 merge: suggest 'hg up -C .' for discarding changes, not 'hg up -C'
Without specifying the parent revision of the working copy, users will
update to tip, which is most likely the other head they were trying to
merge, not the revision they were at before the merge.
2010-09-12 18:05:53 -05:00
Martin Geisler
e849a4fa16 incoming: move code from commands to cmdutil
This makes it easier to reuse it in a recursive fashion for subrepos.
2010-09-13 13:09:30 +02:00
Martin Geisler
d191f04663 outgoing: move code from commands to cmdutil
This makes it easier to reuse it in a recursive fashion for subrepos.
2010-09-13 13:09:24 +02:00
Martin Geisler
c27c54faec clone, patch, convert: use hex(nullid) instead of '0'*40 2010-09-02 12:08:13 +02:00
Nicolas Dumazet
bd660e421e hg.clone: do not ignore branch argument when source is a repo object
This is a revert of f6aa66376f81. The "bug" mentioned in this changeset is unclear:
hopefully using a test to cover this usage should prevent any bugs.
2010-07-02 15:12:50 +09:00
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