git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/4] remote-hg: trivial fixes and cleanups
@ 2013-05-10 10:16 Felipe Contreras
  2013-05-10 10:17 ` [PATCH 1/4] remote-hg: don't push fake 'master' bookmark Felipe Contreras
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Felipe Contreras @ 2013-05-10 10:16 UTC (permalink / raw
  To: git; +Cc: Junio C Hamano, Jeff King, Felipe Contreras

Hi,

Simple no-brainers.

Felipe Contreras (4):
  remote-hg: don't push fake 'master' bookmark
  remote-hg: update bookmarks when pulling
  remote-hg: test: be a little more quiet
  remote-hg: fix new branch creation

 contrib/remote-helpers/git-remote-hg | 7 +++++--
 contrib/remote-helpers/test-hg.sh    | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

-- 
1.8.3.rc1.555.gd13b5a0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] remote-hg: don't push fake 'master' bookmark
  2013-05-10 10:16 [PATCH 0/4] remote-hg: trivial fixes and cleanups Felipe Contreras
@ 2013-05-10 10:17 ` Felipe Contreras
  2013-05-10 12:20   ` Felipe Contreras
  2013-05-10 10:17 ` [PATCH 2/4] remote-hg: update bookmarks when pulling Felipe Contreras
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Felipe Contreras @ 2013-05-10 10:17 UTC (permalink / raw
  To: git; +Cc: Junio C Hamano, Jeff King, Felipe Contreras

We skip it locally, but not for the remote, so let's do so.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/git-remote-hg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 96ad30d..5647ed5 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -867,7 +867,7 @@ def do_export(parser):
 
         if bmark == 'master' and 'master' not in parser.repo._bookmarks:
             # fake bookmark
-            pass
+            continue
         elif bookmarks.pushbookmark(parser.repo, bmark, old, new):
             # updated locally
             pass
-- 
1.8.3.rc1.555.gd13b5a0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] remote-hg: update bookmarks when pulling
  2013-05-10 10:16 [PATCH 0/4] remote-hg: trivial fixes and cleanups Felipe Contreras
  2013-05-10 10:17 ` [PATCH 1/4] remote-hg: don't push fake 'master' bookmark Felipe Contreras
@ 2013-05-10 10:17 ` Felipe Contreras
  2013-05-10 10:17 ` [PATCH 3/4] remote-hg: test: be a little more quiet Felipe Contreras
  2013-05-10 10:17 ` [PATCH 4/4] remote-hg: fix new branch creation Felipe Contreras
  3 siblings, 0 replies; 6+ messages in thread
From: Felipe Contreras @ 2013-05-10 10:17 UTC (permalink / raw
  To: git; +Cc: Junio C Hamano, Jeff King, Felipe Contreras

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/git-remote-hg | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 5647ed5..85b9319 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -357,6 +357,9 @@ def get_repo(url, alias):
                 die('Repository error')
             repo.pull(peer, heads=None, force=True)
 
+        rb = peer.listkeys('bookmarks')
+        bookmarks.updatefromremote(myui, repo, rb, url)
+
     return repo
 
 def rev_to_mark(rev):
-- 
1.8.3.rc1.555.gd13b5a0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] remote-hg: test: be a little more quiet
  2013-05-10 10:16 [PATCH 0/4] remote-hg: trivial fixes and cleanups Felipe Contreras
  2013-05-10 10:17 ` [PATCH 1/4] remote-hg: don't push fake 'master' bookmark Felipe Contreras
  2013-05-10 10:17 ` [PATCH 2/4] remote-hg: update bookmarks when pulling Felipe Contreras
@ 2013-05-10 10:17 ` Felipe Contreras
  2013-05-10 10:17 ` [PATCH 4/4] remote-hg: fix new branch creation Felipe Contreras
  3 siblings, 0 replies; 6+ messages in thread
From: Felipe Contreras @ 2013-05-10 10:17 UTC (permalink / raw
  To: git; +Cc: Junio C Hamano, Jeff King, Felipe Contreras

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/test-hg.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh
index 8de2aa7..f8d1f9e 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -109,10 +109,10 @@ test_expect_success 'update bookmark' '
   (
   git clone "hg::$PWD/hgrepo" gitrepo &&
   cd gitrepo &&
-  git checkout devel &&
+  git checkout --quiet devel &&
   echo devel > content &&
   git commit -a -m devel &&
-  git push
+  git push --quiet
   ) &&
 
   hg -R hgrepo bookmarks | egrep "devel[	 ]+3:"
-- 
1.8.3.rc1.555.gd13b5a0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] remote-hg: fix new branch creation
  2013-05-10 10:16 [PATCH 0/4] remote-hg: trivial fixes and cleanups Felipe Contreras
                   ` (2 preceding siblings ...)
  2013-05-10 10:17 ` [PATCH 3/4] remote-hg: test: be a little more quiet Felipe Contreras
@ 2013-05-10 10:17 ` Felipe Contreras
  3 siblings, 0 replies; 6+ messages in thread
From: Felipe Contreras @ 2013-05-10 10:17 UTC (permalink / raw
  To: git; +Cc: Junio C Hamano, Jeff King, Felipe Contreras

When force_push is disabled, we need to turn the argument to True.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/git-remote-hg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 85b9319..10f073a 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -853,7 +853,7 @@ def do_export(parser):
             continue
 
     if peer:
-        parser.repo.push(peer, force=force_push)
+        parser.repo.push(peer, force=force_push, newbranch=True)
 
     # handle bookmarks
     for bmark, node in p_bmarks:
-- 
1.8.3.rc1.555.gd13b5a0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/4] remote-hg: don't push fake 'master' bookmark
  2013-05-10 10:17 ` [PATCH 1/4] remote-hg: don't push fake 'master' bookmark Felipe Contreras
@ 2013-05-10 12:20   ` Felipe Contreras
  0 siblings, 0 replies; 6+ messages in thread
From: Felipe Contreras @ 2013-05-10 12:20 UTC (permalink / raw
  To: git; +Cc: Junio C Hamano, Jeff King, Felipe Contreras

On Fri, May 10, 2013 at 5:17 AM, Felipe Contreras
<felipe.contreras@gmail.com> wrote:
> --- a/contrib/remote-helpers/git-remote-hg
> +++ b/contrib/remote-helpers/git-remote-hg
> @@ -867,7 +867,7 @@ def do_export(parser):
>
>          if bmark == 'master' and 'master' not in parser.repo._bookmarks:
>              # fake bookmark
> -            pass

Missed:

+ print "ok %s" % ref

> +            continue
>          elif bookmarks.pushbookmark(parser.repo, bmark, old, new):
>              # updated locally
>              pass

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-05-10 12:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-10 10:16 [PATCH 0/4] remote-hg: trivial fixes and cleanups Felipe Contreras
2013-05-10 10:17 ` [PATCH 1/4] remote-hg: don't push fake 'master' bookmark Felipe Contreras
2013-05-10 12:20   ` Felipe Contreras
2013-05-10 10:17 ` [PATCH 2/4] remote-hg: update bookmarks when pulling Felipe Contreras
2013-05-10 10:17 ` [PATCH 3/4] remote-hg: test: be a little more quiet Felipe Contreras
2013-05-10 10:17 ` [PATCH 4/4] remote-hg: fix new branch creation Felipe Contreras

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).