Commit Graph

431 Commits

Author SHA1 Message Date
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
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