Commit Graph

119 Commits

Author SHA1 Message Date
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
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
Mads Kiilerich
9933c7a60f subrepo: initialize subrepo relative default paths relative to their root 2010-12-10 01:30:16 +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
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
4c85200b1f Merge with stable 2010-11-17 21:30:13 +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
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
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