Commit Graph

261 Commits

Author SHA1 Message Date
Erik Zielke
68282c3062 subrepo: make update -C clean the working directory for git subrepos
This makes 'hg update --clean' behave the same way for all three kinds
of subrepositories [hg, svn, git]. Before git subrepos did not take
the clean parameter into account, but just updated to the given
revision and merged uncommitted changes into that.
2011-01-31 13:40:05 +01:00
Martin Geisler
17df79113a merge with stable 2011-01-31 13:38:00 +01:00
Patrick Mezard
276b88543c Merge with stable 2011-01-22 16:29:10 +01:00
Kevin Bullock
e69254e948 subrepo: fix svnsubrepo.dirty() checking of ignoreupdate (issue2499)
The ignoreupdate flag to subrepo.dirty(), introduced in 55e4073493fc, is
correctly checked with this change.
2011-01-04 11:33:47 -06:00
Matt Mackall
eec34ddf7c subrepo: backed out changeset 9ce26f91f137 2010-12-10 19:08:17 -06:00
Mads Kiilerich
9933c7a60f subrepo: initialize subrepo relative default paths relative to their root 2010-12-10 01:30:16 +01:00
Eric Eisner
5a68596380 subrepo: basic support for status of git subrepos 2010-12-20 13:59:33 -05:00
Eric Eisner
ca54cd3a42 subrepo: fix subrelpath for git subrepos
This patch conforms gitsubrepo code to the variable naming scheme of the other
subrepo implementations. All user-facing path references should be relative
to the root repository.
2010-12-20 13:59:33 -05:00
Eric Eisner
ec2e32efb2 subrepo: fix git archive parsing of directories and symfiles 2010-12-20 13:59:33 -05:00
Eric Eisner
056bbfc80f subrepo: support ignoreupdate in gitsubrepo's dirty() 2010-12-20 13:59:33 -05:00
Eric Eisner
c6b2baa3dd subrepo: backout 4f4b977c5189
Unfortunately git 1.6 does not support the upstream parameter in for-each-ref.
2010-12-20 13:59:19 -05:00
Kevin Bullock
5c61f5f136 mq: update .hgsubstate if subrepos are clean (issue2499)
This patch prevents MQ from creating an inconsistent subrepo state. If
the .hgsub file has been changed, and none of the subrepos have
uncommitted changes, creating or updating a patch (using qnew, qrefresh,
or qrecord) will update .hgsubstate accordingly.

If any subrepos _do_ have uncommitted changes, qnew/qrefresh/qrecord
will abort.

Thanks to pmezard for proposing this solution.
2010-12-07 22:14:43 -06:00
Erik Zielke
d12bb06bf6 subrepo: backout 9f2d8e1439d7
backing out 9f2d8e1439d7 because it introduced a bug in
.hgsubstate handling.
2010-12-17 13:38:15 +01:00
Matt Mackall
cdcb8c0f47 check-code: catch "except as" 2010-12-16 14:50:36 -06:00
Erik Zielke
19fa82cefe subrepo: avoids empty commit when .hgsubstate is dirty (issue2403)
This patch avoids empty commit when .hgsubstate is dirty. Empty commit
was caused by .hgsubstate being updated back to the state of the
working copy parent when committing, if a user had changed it manually
and not made any changes in subrepositories.

The subrepository state from the working copies parent is compared
with the state calculated as a result of trying to commit the
subrepositories. If the two states are the same, then return None
otherwise the commit is just done.

The line: "committing subrepository x" will be written if there is
nothing committed, but .hgsubstate is dirty for x subrepository.
2010-11-29 09:37:23 +01:00
Eric Eisner
06990b8d8e subrepo: use low-level git-diff-index for dirty()
Despite its name, git-diff-index compares a revision to the files in the
working directory. This seems way less sketchy and more future proof than
parsing human-readable git-status.
2010-12-14 21:58:13 -05:00
Eric Eisner
1e1100a33b subrepo: defer determination of git's current branch 2010-12-14 21:56:43 -05:00
Eric Eisner
2c85454675 subrepo: incorporate tracking branches into gitbranchmap 2010-12-14 21:56:43 -05:00
Eric Eisner
26d7ede580 subrepo: use low-level git-for-each-ref command in branchmap
This command's output doesn't change across versions, and it also
disambiguates cases where there are slashes in local branch names.
2010-12-14 21:53:40 -05:00
Martin Geisler
290569c6d1 subrepo: add progress bar support to archive 2010-11-29 16:34:10 +01:00
Matt Mackall
4866a8eb9e subrepo: re-backout 9ce26f91f137
This bug got introduced into default simultaneously with its backout,
so future merges didn't eradicate it.
2010-12-14 18:10:51 -06:00
Patrick Mezard
2539fe4ece subrepo: handle missing subrepo spec file as removed
Otherwise, all commands involving a dirstate walk will abort when trying to
readone of them. Deleting .hgsub basically breaks a repository.
2010-11-18 23:05:10 +01:00
Patrick Mezard
f94cde7dfe subrepo: prune empty directories when removing svn subrepo 2010-11-17 21:25:23 +01:00
Patrick Mezard
ef53dec68d subrepo: use subprocess directly to avoid python 2.6 bug
Using svn subrepos on MacOSX with native python 2.6.1 results in a lot of
unexpected output caused by:

    http://bugs.python.org/issue5099
    subprocess.Popen.__del__ causes AttributeError (os module == None)

Avoiding dangling Popen instance solves the issue.
2010-11-17 21:24:36 +01:00
Patrick Mezard
b43cfa6a0e subrepo: fix removing read-only svn files on Windows 2010-11-17 21:00:47 +01:00
Ronny Pfannschmidt
7701046742 subrepo: test & fix svn subrepo removal 2010-11-05 15:13:22 +01:00
Martin Geisler
fdfec2742f merge default heads in crew and main 2010-12-13 11:52:52 +01:00
Benoit Boissinot
d2ea44dc59 merge with stable 2010-12-10 23:05:48 +01:00
Eric Eisner
196def6fd2 subrepo: silence git output when ui.quiet is set 2010-12-09 16:52:14 -05:00
Eric Eisner
4c966e44c6 subrepo: show git command with --debug
Also removing the clutter of --no-pager, since none of these commands use
the pager.
2010-12-09 16:52:14 -05:00
Eric Eisner
ca860bf0f2 subrepo: speed up git push logic
In many common cases where the subrepo is up to date with the remote repo,
hg push will only need to run one git-branch command to see that nothing
needs to be pushed.
2010-12-09 16:52:14 -05:00
Eric Eisner
cb90078af4 subrepo: use subprocess.Popen without the shell
As well as simplifying the code, this makes subprocess calls about 25% faster.
Tested on a couple linux boxes.

python -mtimeit -s'import subprocess' 'subprocess.Popen(
        "git version", shell=True, stdout=subprocess.PIPE).wait()'
python -mtimeit -s'import subprocess' 'subprocess.Popen(
	["git","version"], stdout=subprocess.PIPE).wait()'
2010-12-09 16:52:14 -05:00
Eric Eisner
5cc1a07e5a subrepo: treat git error code 1 as success
At least status, commit, merge-base, and diff all return 1 when not failing.
2010-12-09 16:52:14 -05:00
Eric Eisner
d81be05e6d subrepo: gitsubrepo should inherit from abstractsubrepo 2010-12-09 16:52:14 -05:00
Eric Eisner
44d5bac715 subrepo: drop arguments unsupported by old git 2010-12-06 21:17:27 -05:00
Eric Eisner
6bdb7bc8d7 subrepo: work around old git's remote naming scheme
Older git versions use 'origin/master'
Current git uses 'remotes/origin/master'
2010-12-06 21:17:27 -05:00
Eric Eisner
6c1163de81 subrepo: use environment variable instead of git commit's --date
Older git versions do not have a --date flag.
2010-12-06 21:17:27 -05:00
Eric Eisner
11aba86609 subrepo: parse git status's human-readable output
Older git versions do not have a machine-readable output, but the default
format has not changed over time.
2010-12-06 21:17:27 -05:00
Eric Eisner
d9f3d5258c subrepo: use subprocess's cwd instead of git's --work-tree
Some older git commands (e.g. git merge) do not properly recognize the
--work-tree argument, so abstract that away from git.
2010-12-06 21:17:27 -05:00
Eric Eisner
433dad3882 subrepo: lazily update git's local tracking branches
This continues the strategy of separation between hg pull and hg update in
git subrepos by only dealing with git's branches on an update. This behavior
tries to cover the bare essentials of the semantics of git pull in the subrepo
when the parent repo does hg pull and hg update.
2010-11-28 17:19:23 -05:00
Eric Eisner
e82449fedc subrepo: return both mapping directions from gitbranchmap 2010-11-28 15:21:23 -05:00
Eric Eisner
597d9a4df9 subrepo: strip gitcommand output 2010-11-28 15:03:48 -05:00
Eric Eisner
47f74e81de subrepo: lazier git push logic
Avoids calls to git push when the revision is already known to be
in the remote repository. Now, when using a read-only git subrepo,
git will never need to talk to its upstream repository.
2010-11-21 22:00:51 -05:00
Eric Eisner
0e03c676b5 subrepo: archive git subrepos 2010-11-18 19:20:21 -05:00
Patrick Mezard
4795589405 Merge with stable 2010-11-18 23:15:13 +01:00
Patrick Mezard
4c85200b1f Merge with stable 2010-11-17 21:30:13 +01:00
Eric Eisner
c8106b69bb subrepo: removing (and restoring) git subrepo state 2010-11-14 18:31:40 -05:00
Eric Eisner
7c9ab4f118 subrepo: update and merge works with any git branch 2010-11-14 18:31:29 -05:00
Eric Eisner
22744d6861 subrepo: allow git subrepos to push and merge
(master branch only)

gitsubrepo based on patch from David Soria Parra:
http://bitbucket.org/segv/davids-poor-git-subrepo-attempt/
2010-11-14 18:22:33 -05:00
Eric Eisner
244b8e45a7 subrepo: cloning and updating of git subrepos
gitsubrepo based on patch from David Soria Parra:
http://bitbucket.org/segv/davids-poor-git-subrepo-attempt/
2010-11-14 18:20:13 -05:00
Eric Eisner
579b798395 subrepo: support for adding a git subrepo
gitsubrepo based on patch from David Soria Parra:
http://bitbucket.org/segv/davids-poor-git-subrepo-attempt/
2010-11-14 18:15:26 -05:00
Mads Kiilerich
eaea535bf7 subrepo: propagate non-default pull/push path to relative subrepos (issue1852) 2010-10-27 00:28:40 +02:00
Martin Geisler
0305929afc subrepo: svnsubrepo._wcrev should return str after 62328a9d763a 2010-10-21 10:54:37 +02:00
Matt Mackall
0677d9a163 subrepo: fix status check on SVN subrepos (issue2445) 2010-10-21 03:28:51 -05:00
Martin Geisler
77ce66fb6a check-code: find trailing whitespace 2010-10-20 10:13:04 +02:00
Mads Kiilerich
fd086af9b7 subrepo: abort instead of pushing/pulling to the repo itself
_abssource will now abort (or return None) in the rare cases where no push/pull
path can be found.
2010-10-19 03:56:20 +02:00
Mads Kiilerich
9c4dc8c331 subrepo: rename relpath to subrelpath and introduce reporelpath 2010-10-19 03:55:28 +02:00
Martin Geisler
afe812d8de subrepo: try remapping subpaths using the "final" path
Before, the right-hand side of a .hgsub entry was used, as is, to
match the left-hand side of a subpaths entry. This turned out to be
less useful than expected since a .hgsub file with

  src/foo = src/foo

has little context to do remapping on. The new idea is therefore to
prefix the parent repo path *before* the remapping takes place.

If the parent repository path (as defined by _abssource) is

  http://example.net/parent

then the remapping for the above .hgsub entry will be done on the
expanded path:

  http://example.net/parent/src/foo

If this expanded path is not changed by the remapping, then we remap

  src/foo

alone. This is the old behavior where the right-hand side is remapped
without context.
2011-09-22 15:15:18 +02:00
Martin Geisler
25c66ec3c7 subrepo: refactor state function 2011-09-22 14:39:49 +02:00
Matt Mackall
d4f66ce1b3 merge with stable 2011-08-26 16:08:24 -05:00
Matt Mackall
e75325116a merge with stable 2011-08-01 10:54:34 -05:00
Augie Fackler
9350462549 subrepo: use safehasattr instead of hasattr
Some of these instances could be rewritten as clever getattr(x, y,
default) ladders, but that felt like it impeded readability too much
to be worth the modest efficiency gain.
2011-07-25 15:53:22 -05:00
Brodie Rao
ac14679b96 subrepos: add missing self argument to abstractsubrepo.checknested 2010-09-26 16:11:04 -05:00
Wagner Bruna
141644d96f subrepo: improve lookup error messages 2010-09-13 10:33:49 -03:00
Martin Geisler
34af0cf109 subrepo: add support for 'hg archive' 2010-09-20 15:46:17 +02:00
Martin Geisler
37b2820a98 subrepo: introduce files and filedata methods for subrepo classes 2010-09-20 15:44:30 +02:00
Martin Geisler
d37ba034d5 incoming: recurse into subrepositories with --subrepos/-S flag
As with push and outgoing, the optional source path is ignored for the
subrepositories. Fixing this is Issue1852.
2010-09-13 13:09:31 +02:00
Martin Geisler
2346ea8e9e outgoing: recurse into subrepositories with --subrepos/-S flag
As with push, the optional destination path is ignored for the
subrepositories, i.e., they are always compared with their default
push path. Fixing this is Issue1852.
2010-09-13 13:09:26 +02:00
Martin Geisler
cb93a10b9b add: recurse into subrepositories with --subrepos/-S flag 2010-09-13 13:09:20 +02:00
Martin Geisler
ce594fa743 subrepo: handle diff with working copy
We cannot unconditionally call bin(node2) since node2 is None when
comparing with the working copy.
2010-09-10 23:53:49 +02:00
Patrick Mezard
30bd1afde3 subrepos: handle diff nodeids in subrepos, not before
Subversion nodeids are integer revisions.
2010-09-10 22:52:00 +02:00
Martin Geisler
c85f2356e3 subrepos: add function for iterating over ctx subrepos 2010-09-07 16:34:07 +02:00
Martin Geisler
e9c2a20771 diff: recurse into subrepositories with --subrepos/-S flag 2010-09-03 12:58:51 +02:00
Martin Geisler
f2188b5b90 status: recurse into subrepositories with --subrepos/-S flag 2010-09-03 12:58:51 +02:00
Martin Geisler
bfa6c992eb localrepo: add auditor attribute which knows about subrepos 2010-09-03 12:58:51 +02:00
Martin Geisler
9c67cf78d7 subrepo: use [0-9] instead of [\d] in svn subrepo regex
The \d was used in a normal (not raw) string and was only passed
through to re.search because Python does not define that escape
character itself. Using 0-9 makes it clearer what is happening.
2010-08-27 13:03:57 +02:00
Martin Geisler
9c87025d80 subrepos: handle backslashes in subpaths 2010-08-19 13:25:46 +02:00
Martin Geisler
174c3dbb8d subrepos: support remapping of .hgsub source paths
Given a .hgsub file containing

  lib/libfoo = http://server/libfoo

the 'lib/libfoo' subrepo will be cloned from 'http://server/libfoo'.

This changeset introduces a remapping mechanism whereby the source
paths (the right-hand sides) in the .hgsub file can be remapped. This
subpaths section

  [subpaths]
  http://server = /local

will result in the 'lib/libfoo' subrepo being cloned from
'/local/libfoo' instead of from 'http://server/libfoo'.

The patterns (left-hand sides) are really regular expressions and the
replacement strings (right-hand sides) can refer to matched groups
using normal backreferences. This can be used for more complicated
replacements such as

  [subpaths]
  http://server/(.*)-hg/ = http://hg.server/\1/

which replaces 'http://server/foo-hg/' with 'http://hg.server/foo/'.

All patterns are applied in the order by which they are listed in the
config files.
2010-07-15 18:10:05 +02:00
Martin Geisler
b5d9960615 Merge with stable 2010-07-15 14:11:14 +02:00
Mads Kiilerich
b68a37ac34 subrepo: docstrings 2010-07-15 13:24:02 +02:00
Martin Geisler
2061ba7fe0 subrepos: let caller specify a filename for SVN commands 2010-07-14 20:25:31 +02:00
Martin Geisler
294578fe50 subrepo: add abstract superclass for subrepo classes 2010-07-14 20:25:31 +02:00
Matt Mackall
49d11c6847 subrepo: correctly handle update -C with modified subrepos (issue2022)
(based on a patch by Saint Germain)
2010-06-30 23:56:35 -05:00
Matt Mackall
4edb323e75 subrepo: fix recording of + in .hgsubstate (issue2217) 2010-06-29 17:30:42 -05:00
Matt Mackall
43cb4cbcf4 subrepo: fix silent push failure for SVN (issue2241) 2010-06-27 18:20:49 -05:00
Martin Geisler
efe9b04aef subrepo: create subrepos using clone instead of pull
Subrepositories used to be created empty and then filled with data
using pull. This is wasteful when you do a clone from a local source
since it means that no hardlinks are created for the subrepos.

This patch make the hgsubrepo._get method check for an empty subrepo
and in that case do a clone instead of a pull. This brings in the same
data as before, but creates hardlinks when possible.
2011-05-09 17:15:44 +02:00
Adrian Buehlmann
e981d64ef2 rename path_auditor to pathauditor
The Mercurial 1.9 release is moving a lot of stuff around anyway and we are
already moving path_auditor from util.py to scmutil.py for that release.

So this seems like a good opportunity to do such a rename. It also strengthens
the current project policy to avoid underbars in names.
2011-05-06 09:54:06 +02:00
Brodie Rao
b7f0d2a103 url: move URL parsing functions into util to improve startup time
The introduction of the new URL parsing code has created a startup
time regression. This is mainly due to the use of url.hasscheme() in
the ui class. It ends up importing many libraries that the url module
requires.

This fix helps marginally, but if we can get rid of the urllib import
in the URL parser all together, startup time will go back to normal.

perfstartup time before the URL refactoring (707e4b1e8064):

! wall 0.050692 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)

current startup time (9ad1dce9e7f4):

! wall 0.070685 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)

after this change:

! wall 0.064667 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)
2011-04-30 09:43:20 -07:00
Matt Mackall
3b61150db3 merge with stable 2011-04-30 03:44:31 -05:00
Matt Mackall
463d91c511 subrepo: backout 11184e56ccc1 2011-04-30 03:00:38 -05:00
Matt Mackall
f184c5b13d merge with stable 2011-04-30 02:42:05 -05:00
Augie Fackler
a2ae5598b9 svn subrepo: attempt work around obstructed checkouts (issue2752)
It should be possible to do better than this with 'svn switch', but
the logic required woud be significantly more complex. Until someone
needs the performance improvements of using switch, we'll just use the
same strategy for everything.
2011-04-29 03:34:18 -05:00
Adrian Buehlmann
307196b733 move path_auditor from util to scmutil 2011-04-20 22:43:31 +02:00
Augie Fackler
7070a6da65 subrepo: trailing whitespace cleanup 2011-04-11 07:34:40 -05:00
Adrian Buehlmann
b66c4be0ad subrepo: process merge substate in sorted order in submerge()
This ensures that subrepositories are pulled in a well defined
order when cloning the parent repository.

BEFORE:

  $ hg clone http://hg.gerg.ca/allextensions
  destination directory: allextensions
  requesting all changes
  adding changesets
  adding manifests
  adding file changes
  added 10 changesets with 20 changes to 6 files
  updating to branch default
  pulling subrepo caseguard from http://bitbucket.org/alexandru/caseguard
  real URL is https://bitbucket.org/alexandru/caseguard
  requesting all changes
  adding changesets
  adding manifests
  adding file changes
  added 81 changesets with 100 changes to 13 files
  pulling subrepo hg-prompt from http://bitbucket.org/sjl/hg-prompt
  real URL is https://bitbucket.org/sjl/hg-prompt
  requesting all changes
  adding changesets
  adding manifests
  adding file changes
  added 114 changesets with 176 changes to 35 files
  pulling subrepo hgpaste from http://bitbucket.org/birkenfeld/hgpaste
  real URL is https://bitbucket.org/birkenfeld/hgpaste
  requesting all changes
  adding changesets
  adding manifests
  adding file changes
  added 18 changesets with 18 changes to 2 files
  ...

AFTER:

  $ hg clone http://hg.gerg.ca/allextensions
  destination directory: allextensions
  requesting all changes
  adding changesets
  adding manifests
  adding file changes
  added 10 changesets with 20 changes to 6 files
  updating to branch default
  pulling subrepo Artemis from http://hg.mrzv.org/Artemis
  requesting all changes
  adding changesets
  adding manifests
  adding file changes
  added 55 changesets with 108 changes to 47 files
  ...
2011-04-03 01:57:17 +02:00
Brodie Rao
0a05d49587 subrepos: use url.url when normalizing repo paths
This works around an issue in older versions of Python that would
strip double slashes from SSH URLs when using urlunparse() on a parsed
URL.

Related issues:

- issue1755: WinXP: cmd line hg 1.3 clone of subrepo fails, due to %5C
  '\'? (originally fixed by f7e3eaf7ec0b).
2011-03-25 22:59:04 -07:00
Martin Geisler
48d4f1b703 subrepo: simplify hgsubrepo._get a little 2011-03-24 18:17:49 +01:00
Matt Mackall
9bb3fa8c69 merge with stable 2011-03-17 17:08:13 -05:00
David Soria Parra
4e5087c547 bookmarks: separate bookmarks update code from localrepo's pull.
We explicitly want to update bookmarks from a remote. This will avoid
duplicate calls to listkeys if we clone (which calls pull) and keep
bookmark related code together.
2011-03-14 00:10:43 +01:00
Eric Eisner
402d7f0b91 subrepo: show the source that git pulls 2011-03-08 15:36:56 -05:00
Patrick Mezard
d3588c996f merge with stable 2011-03-07 23:19:17 +01:00
Matt Mackall
8a87e46d4b merge with stable 2011-03-07 15:46:46 -06:00
Patrick Mezard
3e6d7b41d2 Merge with stable 2011-03-04 14:11:15 +01:00
Eric Eisner
bcb09d6c72 subrepo: show the source that git clones 2011-03-02 12:19:18 -05:00
Matt Mackall
8f1a07c9bd subrepo: fix 2.5ism in url parsing 2010-05-07 14:19:14 -05:00
Edouard Gomez
293b104156 subrepo: print paths relative to upper repo root for push/pull/commit
This makes more sense when using multiple levels of
nesting.

This happens to help a lot in a case where 3 projects
of mine all use the same makefile helper project as a
sub. A fourth project use these first three projects
and current output made it very hard to figure
which makefile helper was committed. it looked more
like the project was committed/pushed/pulled three times
in a row than dealing on three different repos.
2010-05-01 23:05:22 +02:00
Edouard Gomez
0a2d8e6eef subrepo: print pushing url 2010-05-01 23:05:22 +02:00
Edouard Gomez
46ea8095fd subrepo: normalize path part of URLs so that pulling subrepos from webdir works
For a "all projects at root" repo layout eg:
/main
/sub

Where subrepos are used such that a clone of main has this layout:
./main/
./main/.hgsub
./main/sub/

And the .hgsub content is:
sub = ../sub

This allows a pull from a hgweb where main and sub are exposed
at the root (or same directory level)

The current code doesn't normalize the path component of a pull
url. this results in trying to pull from
http://server.com/hg/main/../sub

Current hgweb implementation doesn't reduce the path component
so this results in a 404 error though everything is setup logically.

This patch adresses this 404 error on the puller side
normalizing the URLs used for pulling sub repos. For this
example, the URL would be reduced to http://server.com/hg/sub

Fix + test
2010-05-01 23:05:19 +02:00
Matt Mackall
7f6aa6252c Merge with stable 2010-05-01 15:15:35 -05:00
Matt Mackall
53ab4498e1 subrepo: propagate and catch push failures 2010-04-30 18:32:18 -05:00
Brett Cannon
8e100766b6 subrepo: fix repo root path handling in svn subrepo 2010-04-18 14:20:08 -07:00
Matt Mackall
399ebe1c0f Merge with stable 2010-04-19 17:00:02 -05:00
Martin Geisler
7dc53bec4e Merge with stable 2010-03-15 18:36:11 +01:00
Edouard Gomez
8969d04970 subrepo: fix hgrc paths section during subrepo pulling
There are two bugs in current subrepo ctor:
 - hgrc paths were using parent repo (ctx._repo) instead of self._repo
 - it was joined with local extract path, not its source repo path

Fixed both bugs using _abssource on self once it is fully initialized.
It gets the job done perfectly for pull and push urls.
2010-03-14 00:28:10 +01:00
Benoit Boissinot
9803653bf1 subrepo: keep ui and hgrc in sync when creating new repo 2010-03-12 01:23:35 +01:00
Edouard Gomez
ec1cf25023 subrepo: forward the push to argument into _abssource 2010-03-12 01:23:35 +01:00
Martin Geisler
5be19296c9 subrepo: wrap long line 2010-03-13 19:57:52 +01:00
Benoit Boissinot
d6eff743cd merge with stable 2010-03-13 17:02:41 +01:00
Edouard Gomez
2b89d37c12 subrepo: print subrepo pulling URL 2010-03-12 01:23:35 +01:00
Benoit Boissinot
7dae5be27b i18n: mark more strings for translation 2010-02-19 02:23:38 +01:00
David Soria Parra
11f271739c subrepo: make sure that the source path is stripped
Test by Patrick Mézard <pmezard@gmail.com>
2010-02-09 18:32:57 +01:00
Saint Germain
ca80dfaea9 subrepo: change default path in hgrc of subrepo after cloning
Previous behavior was to put in the cloned subrepos the path found in the original main repo.
However it isn't valid for relative path and it seems more logical to reference instead the subrepos
working copy path of the original main repo.
2010-02-06 19:14:37 +01:00
David Soria Parra
6dcc1537f6 subrepo: correct copyright 2010-02-06 10:23:18 +01:00
Benoit Boissinot
5fd3bf33e2 subrepo: fix errors reported by pylint 2010-01-31 18:02:16 +01:00
Patrick Mezard
b3819101ba subrepo: handle svn externals and meta changes (issue1982)
- Detect changes to meta on regular and external entries
- Do not try to commit external entries
2010-01-21 13:26:26 +01:00
Patrick Mezard
8cc6cf7f71 subrepo: svn xml output is much easier to parse
That's especially true with status flags: there are different fields and values
for regular changes, meta changes, externals changes and externals meta
changes.
2010-01-21 15:13:40 +01:00
Patrick Mezard
d8a25e7f28 subrepo: make svn use C locale for portability
My reasons to do 877151efa5f3 were wrong. We want to have non-localized svn
output while preserving current locale for input arguments and svn internals.
This is achieved by setting LC_MESSAGE=C.
2010-01-21 15:13:03 +01:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Benoit Boissinot
ef2921d9e6 merge with stable 2010-01-15 21:32:53 +01:00
Benoit Boissinot
8fa7d00586 subrepo: fix merging of already merged subrepos (issue1986)
This fixes a bug seen when merging a main repo which contains a subrepo when
both repos have been merged before. Each repo (main and sub) has two
branches, both of which have been merged before.

In a subrepo, if the revision to merge to is an ancestor of the current rev,
then the merge should be a noop.

Test provided by Steve Losh.
2010-01-15 21:08:04 +01:00
Matt Mackall
4387f67807 subrepo: add default path to new clones 2009-12-14 15:01:13 -06:00
Matt Mackall
238098252f submerge: properly deal with overwrites
also pull .hgsubstate check out of inner loop
2009-11-08 10:29:52 -06:00
Matt Mackall
297f3b873b subrepo: add more debugging output, lose _ markers 2009-11-08 10:24:18 -06:00
Matt Mackall
ca298b21c0 subrepo: do a linear update when appropriate 2009-11-07 16:31:43 -06:00
Matt Mackall
34dc7c3fa5 subrepo: notice dirty subrepo states when merging 2009-11-07 16:30:42 -06:00
Matt Mackall
7900d62499 subrepo: add some debug output to submerge 2009-11-07 16:29:49 -06:00
Matt Mackall
03aa7b74f1 subrepo: more robust split for .hgsubstate parsing 2009-11-07 14:09:16 -06:00
Matt Mackall
3e6199cea0 Merge with -stable 2009-09-30 21:42:51 -05:00
Matt Mackall
76ac5743c5 subrepo: add auto-pull for merge 2009-09-30 18:47:33 -05:00
Matt Mackall
60ca8ea58d subrepo: use '/' for joining non-local paths 2009-07-22 17:53:23 -05:00
Matt Mackall
aa26914af7 subrepo: audit subrepo paths 2009-07-01 13:55:24 -05:00
Dirkjan Ochtman
da9d2d8f2b merge with crew-stable 2009-07-23 20:44:26 +02:00
Abderrahim Kitouni
45a072d541 subrepo: use hg.repository instead of creating localrepo directly
this way, extensions' reposetup will be called, which allows for git
subrepos to be handled by hg-git (and I believe the same goes for
svn and hgsubversion)
2009-07-04 14:18:15 +01:00
Martin Geisler
ecfc8a98d6 filemerge, subrepo: correct indention 2009-07-07 17:26:20 +02:00
Simon Heimberg
e0e4fc74e3 ui: extract choice from prompt
avoid translating single characters (as l for _local or sym_link)
2009-06-21 01:13:19 +02:00
Dongsheng Song
4e62c61983 Fix warning: Seen unexpected token "%" 2009-06-19 14:28:29 +08:00
Matt Mackall
459bbfbb56 subrepo: basic push support 2009-06-15 02:46:20 -05:00
Matt Mackall
430046de97 subrepo: add update/merge logic 2009-06-15 02:45:38 -05:00
Matt Mackall
fd08adf4d6 commit: recurse into subrepositories 2009-06-15 02:45:38 -05:00