Commit Graph

19 Commits

Author SHA1 Message Date
Kevin Bullock
720b543cad subrepos: print short git changeset ids
This changes the prompts on git subrepos to show only the first seven
digits of git changeset IDs (as git's command line does):

    $ hg update
    subrepository sources for s differ (in checked out version)
    use (l)ocal source (32a3438) or (r)emote source (da5f5b1)?
2011-02-16 11:53:48 -06:00
Erik Zielke
1d125c0477 subrepos: prompt on conflicts on update with dirty subrepos
Consider a repository with a single subrepository. The changesets in
the main repository reference the subrepository changesets like this:

  m0 -> s0
  m1 -> s1
  m2 -> s2

Starting from a state (m1, s0), doing 'hg update m2' in the main
repository will yield a conflict: the subrepo is at revision s0 but
the target revision says it should be at revision s2.

Before this change, Mercurial would do (m1, s0) -> (m2, s2) and thus
ignore the conflict between the working copy and the target revision.

With this change, the user is prompted to resolve the conflict by
choosing which revision he wants. This is consistent with 'hg merge',
which also prompts the user when it detects conflicts in the merged
.hgsubstate files.

The prompt looks like this:

  $ hg update tip
   subrepository sources for my-subrepo differ
  use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)?
2011-02-09 10:53:09 +01:00
Eric Eisner
968806d4b9 test-subrepo-git.t: make compatible with old git 2011-01-31 19:19:56 -05:00
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
Lee Cantey
61056636c3 Ignore pax_global_header that some tar versions write as a file. 2011-01-25 16:33:46 -08: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
196def6fd2 subrepo: silence git output when ui.quiet is set 2010-12-09 16:52:14 -05:00
Eric Eisner
bdf59c0067 test-subrepo-git.t: make gitroot pushable earlier
Older git versions get confused when the git repo becomes bare.
2010-12-06 21:17:27 -05:00
Eric Eisner
3cd880088d test-subrepo-git.t: silence git output
Older git versions have different ideas of what output is considered quiet,
so the tests can be more version-blind.
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
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
Dan Villiom Podlaski Christiansen
56cb66ebbb test-subrepo-git.t: portability fix.
Specifying arguments after file names for 'ls' is a GNU extension.
2010-11-16 13:29:35 +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