Hello community,

here is the log from the commit of package hg-git for openSUSE:Factory checked 
in at 2013-01-10 15:38:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hg-git (Old)
 and      /work/SRC/openSUSE:Factory/.hg-git.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hg-git", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/hg-git/hg-git.changes    2012-05-16 
21:07:42.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.hg-git.new/hg-git.changes       2013-01-10 
15:38:29.000000000 +0100
@@ -1,0 +2,17 @@
+Mon Jan  7 23:44:39 UTC 2013 - [email protected]
+
+- update to version 0.3.4
+  - remove git-daemon check from test-subrepos.t
+  - test-pull.t: normalize git-merge output
+  - overlaychangectx: fix compatibility with mercurial 2.4-rc (no attribute 
_repo) 
+  - pull: don't pull tags as bookmarks 
+  - push: fix traceback when pushing empty hg repo to empty git repo
+  - push: change "no changes" default output to match normal mercurial 
+  - Verify tree and parent objects are in Git repo 
+  - outgoing: re-introduce support for outgoing
+  - dulwich: require 0.8.6 or greater
+  - makefile: add update support from hg 2.3 to hg 2.3.1
+  - add fromgit and gitnode selectors
+  - make test-encoding.t compatible with git 1.8.0
+
+-------------------------------------------------------------------

Old:
----
  dfb2b7b5d586.tar.bz2

New:
----
  586b7aa96466.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hg-git.spec ++++++
--- /var/tmp/diff_new_pack.p9IhTU/_old  2013-01-10 15:38:30.000000000 +0100
+++ /var/tmp/diff_new_pack.p9IhTU/_new  2013-01-10 15:38:30.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package hg-git
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,10 +16,10 @@
 #
 
 
-%define rev dfb2b7b5d586
+%define rev 586b7aa96466
 
 Name:           hg-git
-Version:        0.3.2
+Version:        0.3.4
 Release:        0
 Summary:        Mercurial Plugin for Communicating with Git Servers
 License:        GPL-2.0+

++++++ dfb2b7b5d586.tar.bz2 -> 586b7aa96466.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/.hg_archival.txt 
new/durin42-hg-git-586b7aa96466/.hg_archival.txt
--- old/durin42-hg-git-dfb2b7b5d586/.hg_archival.txt    2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/.hg_archival.txt    2012-11-01 
15:10:59.000000000 +0100
@@ -1,5 +1,4 @@
 repo: 06366111af3c6a2ffa06333ed60d3ed3b9ec0763
-node: dfb2b7b5d586e584280c6640652dc939b4b9120a
+node: 586b7aa9646641b3b1083ab349bb186c79aa646b
 branch: default
-latesttag: 0.3.2
-latesttagdistance: 14
+tag: 0.3.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/.hgtags 
new/durin42-hg-git-586b7aa96466/.hgtags
--- old/durin42-hg-git-dfb2b7b5d586/.hgtags     2012-05-12 10:33:19.000000000 
+0200
+++ new/durin42-hg-git-586b7aa96466/.hgtags     2012-11-01 15:10:59.000000000 
+0100
@@ -9,3 +9,4 @@
 fa3edeec7ed16dec6a16bd3e99bc3feba93115c3 0.3.0
 556c3c586c4aa52f587ccc4d2d65b370a7e9037f 0.3.1
 a9c0b93488d4d082f813c6d91c8e473505a026c4 0.3.2
+9d44dafbb31c14126be151b78c7a41b3c110fd97 0.3.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/Makefile 
new/durin42-hg-git-586b7aa96466/Makefile
--- old/durin42-hg-git-dfb2b7b5d586/Makefile    2012-05-12 10:33:19.000000000 
+0200
+++ new/durin42-hg-git-586b7aa96466/Makefile    2012-11-01 15:10:59.000000000 
+0100
@@ -20,7 +20,12 @@
        (cd $(CREW) ; $(MAKE) clean ) && \
        cd tests && $(PYTHON) $(CREW)/tests/run-tests.py $(TESTFLAGS)
 
-all-version-tests: tests-1.4.3 tests-1.5.4 tests-1.6.2 tests-1.7.2 \
-                   tests-1.9.2 tests-tip
+# This is intended to be the authoritative list of Hg versions that this
+# extension is tested with.  Versions prior to the version that ships in the
+# latest Ubuntu LTS release (2.0.2 for 12.04 LTS) may be dropped if they
+# interfere with new development.  The latest released minor version should be
+# listed for each major version; earlier minor versions are not needed.
+all-version-tests: tests-1.7.5 tests-1.8.4 tests-1.9.3 tests-2.0.2 \
+                   tests-2.1.2 tests-2.2.3 tests-2.3.1 tests-tip
 
 .PHONY: tests all-version-tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/README.md 
new/durin42-hg-git-586b7aa96466/README.md
--- old/durin42-hg-git-dfb2b7b5d586/README.md   2012-05-12 10:33:19.000000000 
+0200
+++ new/durin42-hg-git-586b7aa96466/README.md   2012-11-01 15:10:59.000000000 
+0100
@@ -1,6 +1,10 @@
 Hg-Git Mercurial Plugin
 =======================
 
+* Homepage: http://hg-git.github.com/
+* https://bitbucket.org/durin42/hg-git (primary)
+* https://github.com/schacon/hg-git (mirror)
+
 This is the Hg-Git plugin for Mercurial, adding the ability to push
 and pull to/from a Git server repository from Hg.  This means you can
 collaborate on Git based projects from Hg, or use a Git server as a
@@ -26,13 +30,13 @@
 Usage
 =====
 
-You can clone a Git repository from Hg by running `hg clone [url]`.  For
+You can clone a Git repository from Hg by running `hg clone <url> [dest]`.  For
 example, if you were to run
 
     $ hg clone git://github.com/schacon/hg-git.git
 
-hg-git would clone the repository down into the directory 'munger.git', then
-convert it to an Hg repository for you.
+Hg-Git would clone the repository and convert it to an Hg repository
+for you.
 
 If you want to clone a github repository for later pushing (or any
 other repository you access via ssh), you need to convert the ssh url
@@ -51,16 +55,16 @@
 
     $ hg clone git+ssh://[email protected]/schacon/hg-git.git
 
-If you are starting from an existing Hg repository, you have to setup
-a Git repository somewhere that you have push access to, add it as
-default path or default-push path in your .hg/hgrc and then run `hg
-push` from within your project.  For example:
+If you are starting from an existing Hg repository, you have to set up
+a Git repository somewhere that you have push access to, add a path entry
+for it in your .hg/hgrc file, and then run `hg push [name]` from within
+your repository.  For example:
 
     $ cd hg-git # (an Hg repository)
     $ # edit .hg/hgrc and add the target git url in the paths section
     $ hg push
 
-This will convert all your Hg data into Git objects and push them up to the 
Git server.
+This will convert all your Hg data into Git objects and push them to the Git 
server.
 
 Now that you have an Hg repository that can push/pull to/from a Git
 repository, you can fetch updates with `hg pull`.
@@ -136,6 +140,16 @@
 That will enable the Hg-Git extension for you.  The bookmarks section
 is not compulsory, but it makes some things a bit nicer for you.
 
+This plugin is currently tested against the following Mercurial versions:
+ * 1.6.4
+ * 1.7.5
+ * 1.8.4
+ * 1.9.3
+ * 2.0.2
+ * 2.1.2
+ * 2.2.3
+ * 2.3
+
 Configuration
 =============
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/hggit/__init__.py 
new/durin42-hg-git-586b7aa96466/hggit/__init__.py
--- old/durin42-hg-git-dfb2b7b5d586/hggit/__init__.py   2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/hggit/__init__.py   2012-11-01 
15:10:59.000000000 +0100
@@ -13,8 +13,11 @@
 project that is in Git.  A bridger of worlds, this plugin be.
 
 Try hg clone git:// or hg clone git+ssh://
+
+For more information and instructions, see :hg:`help git`
 '''
 
+from bisect import insort
 import inspect
 import os
 
@@ -22,8 +25,11 @@
 from mercurial import commands
 from mercurial import demandimport
 from mercurial import extensions
+from mercurial import help
 from mercurial import hg
 from mercurial import localrepo
+from mercurial import revset
+from mercurial import templatekw
 from mercurial import util as hgutil
 from mercurial import url
 from mercurial.i18n import _
@@ -87,6 +93,20 @@
 if getattr(hg, 'addbranchrevs', False):
     extensions.wrapfunction(hg, 'addbranchrevs', safebranchrevs)
 
+def extsetup():
+    templatekw.keywords.update({'gitnode': gitnodekw})
+    revset.symbols.update({
+        'fromgit': revset_fromgit, 'gitnode': revset_gitnode
+    })
+    helpdir = os.path.join(os.path.dirname(__file__), 'help')
+    entry = (['git'], _("Working with Git Repositories"),
+        lambda: open(os.path.join(helpdir, 'git.rst')).read())
+    # in 1.6 and earler the help table is a tuple
+    if getattr(help.helptable, 'extend', None):
+        insort(help.helptable, entry)
+    else:
+        help.helptable = help.helptable + (entry,)
+
 def reposetup(ui, repo):
     if not isinstance(repo, gitrepo.gitrepo):
         klass = hgrepo.generate_repo_subclass(repo.__class__)
@@ -161,6 +181,39 @@
     # 1.7+
     pass
 
+def revset_fromgit(repo, subset, x):
+    '''``fromgit()``
+    Select changesets that originate from Git.
+    '''
+    args = revset.getargs(x, 0, 0, "fromgit takes no arguments")
+    git = GitHandler(repo, repo.ui)
+    return [r for r in subset if git.map_git_get(repo[r].hex()) is not None]
+
+def revset_gitnode(repo, subset, x):
+    '''``gitnode(hash)``
+    Select changesets that originate in the given Git revision.
+    '''
+    args = revset.getargs(x, 1, 1, "gitnode takes one argument")
+    rev = revset.getstring(args[0],
+                           "the argument to gitnode() must be a hash")
+    git = GitHandler(repo, repo.ui)
+    def matches(r):
+        gitnode = git.map_git_get(repo[r].hex())
+        if gitnode is None:
+            return False
+        return rev in [gitnode, gitnode[:12]]
+    return [r for r in subset if matches(r)]
+
+def gitnodekw(**args):
+    """:gitnode: String.  The Git changeset identification hash, as a 40 
hexadecimal digit string."""
+    node = args['ctx']
+    repo = args['repo']
+    git = GitHandler(repo, repo.ui)
+    gitnode = git.map_git_get(node.hex())
+    if gitnode is None:
+        gitnode = ''
+    return gitnode
+
 cmdtable = {
   "gimport":
         (gimport, [], _('hg gimport')),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/hggit/git_handler.py 
new/durin42-hg-git-586b7aa96466/hggit/git_handler.py
--- old/durin42-hg-git-dfb2b7b5d586/hggit/git_handler.py        2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/hggit/git_handler.py        2012-11-01 
15:10:59.000000000 +0100
@@ -86,9 +86,22 @@
 
         self.branch_bookmark_suffix = ui.config('git', 
'branch_bookmark_suffix')
 
-        self.load_map()
+        self._map_git_real = {}
+        self._map_hg_real = {}
         self.load_tags()
 
+    @property
+    def _map_git(self):
+      if not self._map_git_real:
+        self.load_map()
+      return self._map_git_real
+
+    @property
+    def _map_hg(self):
+      if not self._map_hg_real:
+        self.load_map()
+      return self._map_hg_real
+
     # make the git data directory
     def init_if_missing(self):
         if os.path.exists(self.gitdir):
@@ -123,13 +136,11 @@
         return self._map_hg.get(hgsha)
 
     def load_map(self):
-        self._map_git = {}
-        self._map_hg = {}
         if os.path.exists(self.repo.join(self.mapfile)):
             for line in self.repo.opener(self.mapfile):
                 gitsha, hgsha = line.strip().split(' ', 1)
-                self._map_git[gitsha] = hgsha
-                self._map_hg[hgsha] = gitsha
+                self._map_git_real[gitsha] = hgsha
+                self._map_hg_real[hgsha] = gitsha
 
     def save_map(self):
         file = self.repo.opener(self.mapfile, 'w+', atomictemp=True)
@@ -241,15 +252,26 @@
 
     def push(self, remote, revs, force):
         self.export_commits()
-        changed_refs = self.upload_pack(remote, revs, force)
+        old_refs, new_refs = self.upload_pack(remote, revs, force)
         remote_name = self.remote_name(remote)
 
-        if remote_name and changed_refs:
-            for ref, sha in changed_refs.iteritems():
-                self.ui.status("    %s::%s => GIT:%s\n" %
-                               (remote_name, ref, sha[0:8]))
+        if remote_name and new_refs:
+            for ref, new_sha in new_refs.iteritems():
+                if new_sha != old_refs.get(ref):
+                    self.ui.status("    %s::%s => GIT:%s\n" %
+                                   (remote_name, ref, new_sha[0:8]))
 
-            self.update_remote_branches(remote_name, changed_refs)
+            self.update_remote_branches(remote_name, new_refs)
+        if old_refs == new_refs:
+            self.ui.status(_("no changes found\n"))
+            ret = None
+        elif len(new_refs) > len(old_refs):
+            ret = 1 + (len(new_refs) - len(old_refs))
+        elif len(old_refs) > len(new_refs):
+            ret = -1 - (len(new_refs) - len(old_refs))
+        else:
+            ret = 1
+        return ret
 
     def clear(self):
         mapfile = self.repo.join(self.mapfile)
@@ -597,8 +619,18 @@
                         'name' in self._tags:
                     # Mercurial 1.5 and later.
                     del self.repo._tags[name]
-                if name in self.repo._tagtypes:
+                if (hgutil.safehasattr(self.repo, '_tagtypes') and
+                    self.repo._tagtypes and
+                    name in self.repo._tagtypes):
+                    # Mercurial 1.9 and earlier.
                     del self.repo._tagtypes[name]
+                elif (hgutil.safehasattr(self.repo, 'tagscache') and
+                      self.repo.tagscache and
+                      hgutil.safehasattr(self.repo.tagscache, '_tagtypes') and
+                      self.repo.tagscache._tagtypes and
+                      name in self.repo.tagscache._tagtypes):
+                    # Mercurial 2.0 and later.
+                    del self.repo.tagscache._tagtypes[name]
 
     def import_git_commit(self, commit):
         self.ui.debug(_("importing: %s\n") % commit.id)
@@ -755,15 +787,17 @@
 
     def upload_pack(self, remote, revs, force):
         client, path = self.get_transport_and_path(remote)
+        old_refs = {}
         def changed(refs):
+            old_refs.update(refs)
             to_push = revs or set(self.local_heads().values() + 
self.tags.values())
             return self.get_changed_refs(refs, to_push, force)
 
         genpack = self.git.object_store.generate_pack_contents
         try:
             self.ui.status(_("creating and sending data\n"))
-            changed_refs = client.send_pack(path, changed, genpack)
-            return changed_refs
+            new_refs = client.send_pack(path, changed, genpack)
+            return old_refs, new_refs
         except (HangupException, GitProtocolError), e:
             raise hgutil.Abort(_("git remote error: ") + str(e))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/hggit/gitrepo.py 
new/durin42-hg-git-586b7aa96466/hggit/gitrepo.py
--- old/durin42-hg-git-dfb2b7b5d586/hggit/gitrepo.py    2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/hggit/gitrepo.py    2012-11-01 
15:10:59.000000000 +0100
@@ -1,14 +1,22 @@
-from mercurial import repo, util
+from mercurial import util
 try:
     from mercurial.error import RepoError
 except ImportError:
     from mercurial.repo import RepoError
 
+try:
+    from mercurial.peer import peerrepository
+except ImportError:
+    from mercurial.repo import repository as peerrepository
+
 from git_handler import GitHandler
 
-class gitrepo(repo.repository):
+class gitrepo(peerrepository):
     capabilities = ['lookup']
 
+    def _capabilities(self):
+        return self.capabilities
+
     def __init__(self, ui, path, create):
         if create: # pragma: no cover
             raise util.Abort('Cannot create a git repository.')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/hggit/help/git.rst 
new/durin42-hg-git-586b7aa96466/hggit/help/git.rst
--- old/durin42-hg-git-dfb2b7b5d586/hggit/help/git.rst  1970-01-01 
01:00:00.000000000 +0100
+++ new/durin42-hg-git-586b7aa96466/hggit/help/git.rst  2012-11-01 
15:10:59.000000000 +0100
@@ -0,0 +1,82 @@
+Basic Use
+---------
+
+You can clone a Git repository from Hg by running `hg clone <url> [dest]`.
+For example, if you were to run::
+
+ $ hg clone git://github.com/schacon/hg-git.git
+
+Hg-Git would clone the repository and convert it to an Hg repository for
+you. There are a number of different protocols that can be used for Git
+repositories. Examples of Git repository URLs include::
+
+  https://github.com/schacon/hg-git.git
+  http://code.google.com/p/guava-libraries
+  ssh://[email protected]:schacon/hg-git.git
+  git://github.com/schacon/hg-git.git
+
+For protocols other than git://, it isn't clear whether these should be
+interpreted as Mercurial or Git URLs. Thus, to specify that a URL should
+use Git, prepend the URL with "git+". For example, an HTTPS URL would
+start with "git+https://";. Also, note that Git doesn't require the
+specification of the protocol for SSH, but Mercurial does.
+
+If you are starting from an existing Hg repository, you have to set up a
+Git repository somewhere that you have push access to, add a path entry
+for it in your .hg/hgrc file, and then run `hg push [name]` from within
+your repository. For example::
+
+ $ cd hg-git # (an Hg repository)
+ $ # edit .hg/hgrc and add the target Git URL in the paths section
+ $ hg push
+
+This will convert all your Hg data into Git objects and push them to the
+Git server.
+
+Pulling new revisions into a repository is the same as from any other
+Mercurial source. Within the earlier examples, the following commands are
+all equivalent::
+
+ $ hg pull
+ $ hg pull default
+ $ hg pull git://github.com/schacon/hg-git.git
+
+Git branches are exposed in Hg as bookmarks, while Git remotes are exposed
+as Hg local tags.  See `hg help bookmarks` and `hg help tags` for further
+information.
+
+Finding and displaying Git revisions
+------------------------------------
+
+For displaying the Git revision ID, Hg-Git provides a template keyword:
+
+  :gitnode: String.  The Git changeset identification hash, as a 40 hexadecimal
+    digit string.
+
+For example::
+
+  $ hg log --template='{rev}:{node|short}:{gitnode|short} {desc}\n'
+  $ hg log --template='hg: {node}\ngit: {gitnode}\n{date|isodate} 
{author}\n{desc}\n\n'
+
+For finding changesets from Git, Hg-Git extends revsets to provide two new
+selectors:
+
+  :fromgit: Select changesets that originate from Git. Takes no arguments.
+  :gitnode: Select changesets that originate in a specific Git revision. Takes
+    a revision argument.
+
+For example::
+
+  $ hg log -r 'fromgit()'
+  $ hg log -r 'gitnode(84f75b909fc3)'
+
+Revsets are accepted by several Mercurial commands for specifying revisions.
+See ``hg help revsets`` for details.
+
+Limitations
+-----------
+
+- Cloning/pushing/pulling local Git repositories is not supported (due to
+  lack of support in Dulwich)
+- The `hg incoming` and `hg outgoing` commands are not currently
+  supported.
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/hggit/hgrepo.py 
new/durin42-hg-git-586b7aa96466/hggit/hgrepo.py
--- old/durin42-hg-git-dfb2b7b5d586/hggit/hgrepo.py     2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/hggit/hgrepo.py     2012-11-01 
15:10:59.000000000 +0100
@@ -19,7 +19,7 @@
         def push(self, remote, force=False, revs=None, newbranch=None):
             if isinstance(remote, gitrepo):
                 git = GitHandler(self, self.ui)
-                git.push(remote.path, revs, force)
+                return git.push(remote.path, revs, force)
             else: #pragma: no cover
                 # newbranch was added in 1.6
                 if newbranch is None:
@@ -45,6 +45,7 @@
                 tags[tag] = bin(rev)
                 tagtypes[tag] = 'git'
 
+            tags.update(self.gitrefs())
             return (tags, tagtypes)
 
         def gitrefs(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/hggit/overlay.py 
new/durin42-hg-git-586b7aa96466/hggit/overlay.py
--- old/durin42-hg-git-dfb2b7b5d586/hggit/overlay.py    2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/hggit/overlay.py    2012-11-01 
15:10:59.000000000 +0100
@@ -14,6 +14,11 @@
         self._map = None
         self._flagmap = None
 
+    def withflags(self):
+        self.load()
+        return set([path for path, flag in self._flagmap.iteritems()
+                    if flag & 020100])
+
     def copy(self):
         return overlaymanifest(self.repo, self.tree.id)
 
@@ -146,6 +151,13 @@
     def __nonzero__(self):
         return True
 
+    def phase(self):
+        try:
+            from mercurial import phases
+            return phases.draft
+        except ImportError:
+            return 1
+
 class overlayrevlog(object):
     def __init__(self, repo, base):
         self.repo = repo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/setup.py 
new/durin42-hg-git-586b7aa96466/setup.py
--- old/durin42-hg-git-dfb2b7b5d586/setup.py    2012-05-12 10:33:19.000000000 
+0200
+++ new/durin42-hg-git-586b7aa96466/setup.py    2012-11-01 15:10:59.000000000 
+0100
@@ -5,7 +5,7 @@
 
 setup(
     name='hg-git',
-    version='0.3.2',
+    version='0.3.4',
     author='Scott Chacon',
     maintainer='Augie Fackler',
     maintainer_email='[email protected]',
@@ -19,5 +19,6 @@
     keywords='hg git mercurial',
     license='GPLv2',
     packages=['hggit'],
+    package_data={ 'hggit': ['help/git.rst'] },
     install_requires=['dulwich>=0.8.0'],
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-git-tags.out 
new/durin42-hg-git-586b7aa96466/tests/test-git-tags.out
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-git-tags.out     2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-git-tags.out     2012-11-01 
15:10:59.000000000 +0100
@@ -19,6 +19,4 @@
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/tags/beta => GIT:e6f255c6
-    default::refs/tags/alpha => GIT:7eeab2ea
     default::refs/heads/master => GIT:3b7fd1b3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-help 
new/durin42-hg-git-586b7aa96466/tests/test-help
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-help     1970-01-01 
01:00:00.000000000 +0100
+++ new/durin42-hg-git-586b7aa96466/tests/test-help     2012-11-01 
15:10:59.000000000 +0100
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Tests that the various help files are properly registered
+
+echo "[extensions]" >> $HGRCPATH
+echo "hggit=$(echo $(dirname $(dirname $0)))/hggit" >> $HGRCPATH
+
+hg help | grep 'git' | sed 's/  */ /g'
+hg help hggit | grep 'help git' | sed 's/:hg:`help git`/"hg help git"/g'
+hg help git | grep 'Working with Git Repositories'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-help.out 
new/durin42-hg-git-586b7aa96466/tests/test-help.out
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-help.out 1970-01-01 
01:00:00.000000000 +0100
+++ new/durin42-hg-git-586b7aa96466/tests/test-help.out 2012-11-01 
15:10:59.000000000 +0100
@@ -0,0 +1,4 @@
+ hggit push and pull from a Git server
+ git Working with Git Repositories
+For more information and instructions, see "hg help git"
+Working with Git Repositories
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-hg-author.out 
new/durin42-hg-git-586b7aa96466/tests/test-hg-author.out
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-hg-author.out    2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-hg-author.out    2012-11-01 
15:10:59.000000000 +0100
@@ -7,42 +7,34 @@
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/heads/master => GIT:cffa0e8d
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/heads/master => GIT:2b9ec6a4
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/heads/master => GIT:fee30180
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/heads/master => GIT:d1659250
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/heads/master => GIT:ee985f12
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/heads/master => GIT:d21e26b4
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/heads/master => GIT:8c878c97
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/heads/master => GIT:1e03e913
 @  changeset:   8:d3c51ce68cfd
 |  tag:         default/master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-hg-branch.out 
new/durin42-hg-git-586b7aa96466/tests/test-hg-branch.out
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-hg-branch.out    2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-hg-branch.out    2012-11-01 
15:10:59.000000000 +0100
@@ -7,13 +7,11 @@
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/heads/master => GIT:05c2bcbe
 marked working directory as branch gamma
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/heads/master => GIT:296802ef
 @  changeset:   2:05aed681ccb3
 |  branch:      gamma
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-hg-tags.out 
new/durin42-hg-git-586b7aa96466/tests/test-hg-tags.out
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-hg-tags.out      2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-hg-tags.out      2012-11-01 
15:10:59.000000000 +0100
@@ -7,7 +7,6 @@
 pushing to git://localhost/gitrepo
 exporting hg objects to git
 creating and sending data
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/tags/alpha => GIT:7eeab2ea
     default::refs/heads/master => GIT:9a2616b9
 @  changeset:   1:d529e9229f6d
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-incoming 
new/durin42-hg-git-586b7aa96466/tests/test-incoming
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-incoming 2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-incoming 2012-11-01 
15:10:59.000000000 +0100
@@ -7,7 +7,8 @@
 python -c 'import dulwich, dulwich.repo' || exit 80
 
 # This test only works on hg 1.7 and later
-python -c 'from mercurial import util ; assert util.version() > "1.7"' || exit 
80
+python -c 'from mercurial import util ; assert \
+ util.version() != "unknown" and util.version() > "1.7"' || exit 80
 
 # bail early if the user is already running git-daemon
 echo hi | nc localhost 9418 2>/dev/null && exit 80
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-keywords 
new/durin42-hg-git-586b7aa96466/tests/test-keywords
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-keywords 1970-01-01 
01:00:00.000000000 +0100
+++ new/durin42-hg-git-586b7aa96466/tests/test-keywords 2012-11-01 
15:10:59.000000000 +0100
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# Fails for some reason, need to investigate
+# "$TESTDIR/hghave" git || exit 80
+
+# bail if the user does not have dulwich
+python -c 'import dulwich, dulwich.repo' || exit 80
+
+# bail early if the user is already running git-daemon
+echo hi | nc localhost 9418 2>/dev/null && exit 80
+
+echo "[extensions]" >> $HGRCPATH
+echo "hggit=$(echo $(dirname $(dirname $0)))/hggit" >> $HGRCPATH
+echo 'hgext.bookmarks =' >> $HGRCPATH
+
+GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
+GIT_AUTHOR_EMAIL='[email protected]'; export GIT_AUTHOR_EMAIL
+GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0000"; export GIT_AUTHOR_DATE
+GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME
+GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL
+GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
+
+count=10
+commit()
+{
+    GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000"
+    GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
+    git commit "$@" >/dev/null 2>/dev/null || echo "git commit error"
+    count=`expr $count + 1`
+}
+
+mkdir gitrepo
+cd gitrepo
+git init | python -c "import sys; print sys.stdin.read().replace('$(dirname 
$(pwd))/', '')"
+echo alpha > alpha
+git add alpha
+commit -m 'add alpha'
+echo beta > beta
+git add beta
+commit -m 'add beta'
+
+cd ..
+
+hg clone gitrepo hgrepo | grep -v '^updating'
+cd hgrepo
+echo gamma > gamma
+hg add gamma
+hg commit -m 'add gamma'
+
+hg log --template "{rev} {node} {node|short} {gitnode} {gitnode|short}\n"
+hg log --template "fromgit {rev}\n" --rev "fromgit()"
+hg log --template "gitnode_existsA {rev}\n" --rev 
"gitnode(9497a4ee62e16ee641860d7677cdb2589ea15554)"
+hg log --template "gitnode_existsB {rev}\n" --rev "gitnode(7eeab2ea75ec)"
+hg log --template "gitnode_notexists {rev}\n" --rev "gitnode(1234567890ab)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-keywords.out 
new/durin42-hg-git-586b7aa96466/tests/test-keywords.out
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-keywords.out     1970-01-01 
01:00:00.000000000 +0100
+++ new/durin42-hg-git-586b7aa96466/tests/test-keywords.out     2012-11-01 
15:10:59.000000000 +0100
@@ -0,0 +1,11 @@
+Initialized empty Git repository in gitrepo/.git/
+
+importing git objects into hg
+2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+2 a9da0c7c9bb7574b0f3139ab65cabac7468d6b8d a9da0c7c9bb7  
+1 7bcd915dc873c654b822f01b0a39269b2739e86d 7bcd915dc873 
9497a4ee62e16ee641860d7677cdb2589ea15554 9497a4ee62e1
+0 3442585be8a60c6cd476bbc4e45755339f2a23ef 3442585be8a6 
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 7eeab2ea75ec
+fromgit 0
+fromgit 1
+gitnode_existsA 1
+gitnode_existsB 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-merge 
new/durin42-hg-git-586b7aa96466/tests/test-merge
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-merge    2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-merge    2012-11-01 
15:10:59.000000000 +0100
@@ -48,7 +48,7 @@
 commit -m 'add gamma'
 
 # clean merge
-git merge beta | sed "s/the '//;s/' strategy//" | sed 
's/^Merge.*recursive.*$/Merge successful/' | sed 
's/files/file/;s/insertions/insertion/;s/, 0 deletions.*//'
+git merge beta | sed "s/the '//;s/' strategy//" | sed 
's/^Merge.*recursive.*$/Merge successful/' | sed 
's/files/file/;s/insertions/insertion/;s/, 0 deletions.*//' | sed 's/|  */| /'
 
 cd ..
 mkdir gitrepo2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-merge.out 
new/durin42-hg-git-586b7aa96466/tests/test-merge.out
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-merge.out        2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-merge.out        2012-11-01 
15:10:59.000000000 +0100
@@ -3,7 +3,7 @@
 Switched to a new branch "beta"
 Switched to branch "master"
 Merge successful
- beta |    1 +
+ beta | 1 +
  1 file changed, 1 insertion(+)
  create mode 100644 beta
 Initialized empty Git repository in gitrepo2/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-octopus 
new/durin42-hg-git-586b7aa96466/tests/test-octopus
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-octopus  2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-octopus  2012-11-01 
15:10:59.000000000 +0100
@@ -53,7 +53,7 @@
 git add delta
 commit -m 'add delta'
 
-git merge branch1 branch2 | sed "s/the '//;s/' strategy//" | sed 
's/^Merge.*octopus.*$/Merge successful/;s/, 0 deletions.*//'
+git merge branch1 branch2 | sed "s/the '//;s/' strategy//" | sed 
's/^Merge.*octopus.*$/Merge successful/;s/, 0 deletions.*//'  | sed 's/|  */| /'
 
 cd ..
 mkdir gitrepo2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-octopus.out 
new/durin42-hg-git-586b7aa96466/tests/test-octopus.out
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-octopus.out      2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-octopus.out      2012-11-01 
15:10:59.000000000 +0100
@@ -6,8 +6,8 @@
 Trying simple merge with branch1
 Trying simple merge with branch2
 Merge successful
- beta  |    1 +
- gamma |    1 +
+ beta  | 1 +
+ gamma | 1 +
  2 files changed, 2 insertions(+)
  create mode 100644 beta
  create mode 100644 gamma
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-outgoing 
new/durin42-hg-git-586b7aa96466/tests/test-outgoing
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-outgoing 2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-outgoing 2012-11-01 
15:10:59.000000000 +0100
@@ -7,7 +7,8 @@
 
 # Fails for some reason, need to investigate
 # "$TESTDIR/hghave" git || exit 80
-python -c 'from mercurial import util ; assert util.version() < "1.8"' || exit 
80
+python -c 'from mercurial import util ; assert \
+ util.version() == "unknown" or util.version() < "1.8"' || exit 80
 
 # bail if the user does not have dulwich
 python -c 'import dulwich, dulwich.repo' || exit 80
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/durin42-hg-git-dfb2b7b5d586/tests/test-pull-after-strip 
new/durin42-hg-git-586b7aa96466/tests/test-pull-after-strip
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-pull-after-strip 2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-pull-after-strip 2012-11-01 
15:10:59.000000000 +0100
@@ -7,7 +7,7 @@
 cat > tmp.py <<EOF
 import sys
 v = sys.stdin.read().strip()[:-1]
-if v[1] == '.' and int(v[2]) > 4:
+if v[1] == '.' and ((int(v[0]) == 1 and int(v[2]) > 4) or int(v[0]) > 1):
   sys.exit(0)
 sys.exit(1)
 EOF
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-push 
new/durin42-hg-git-586b7aa96466/tests/test-push
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-push     2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-push     2012-11-01 
15:10:59.000000000 +0100
@@ -69,6 +69,7 @@
 
 hg book -r 1 beta
 hg push -r beta
+echo [$?]
 
 cd ..
 
@@ -88,9 +89,11 @@
 cd hgrepo
 echo % this should fail
 hg push -r master
+echo [$?]
 
 echo % ... even with -f
 hg push -fr master
+echo [$?]
 
 hg pull
 # TODO shouldn't need to do this since we're (in theory) pushing master 
explicitly,
@@ -102,8 +105,16 @@
 
 echo % this should also fail
 hg push -r master
+echo [$?]
 
 echo % ... but succeed with -f
 hg push -fr master
+echo [$?]
+
+echo % this should fail, no changes to push
+hg push -r master
+# This was broken in Mercurial (incorrectly returning 0) until issue3228 was
+# fixed in 2.1
+echo [$?] | sed s/0/1/
 
 cd ..
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/durin42-hg-git-dfb2b7b5d586/tests/test-push.out 
new/durin42-hg-git-586b7aa96466/tests/test-push.out
--- old/durin42-hg-git-dfb2b7b5d586/tests/test-push.out 2012-05-12 
10:33:19.000000000 +0200
+++ new/durin42-hg-git-586b7aa96466/tests/test-push.out 2012-11-01 
15:10:59.000000000 +0100
@@ -7,8 +7,7 @@
 exporting hg objects to git
 creating and sending data
     default::refs/heads/beta => GIT:cffa0e8d
-    default::refs/heads/not-master => GIT:7eeab2ea
-    default::refs/heads/master => GIT:7eeab2ea
+[0]
 % should have two different branches
   beta       cffa0e8 add beta
   master     7eeab2e add alpha
@@ -20,10 +19,12 @@
 pushing to git://localhost/gitrepo
 creating and sending data
 abort: refs/heads/master changed on the server, please pull and merge before 
pushing
+[255]
 % ... even with -f
 pushing to git://localhost/gitrepo
 creating and sending data
 abort: refs/heads/master changed on the server, please pull and merge before 
pushing
+[255]
 pulling from git://localhost/gitrepo
 importing git objects into hg
 (run 'hg update' to get a working copy)
@@ -45,9 +46,14 @@
 pushing to git://localhost/gitrepo
 creating and sending data
 abort: pushing refs/heads/master overwrites 72f56395749d
+[255]
 % ... but succeed with -f
 pushing to git://localhost/gitrepo
 creating and sending data
-    default::refs/heads/beta => GIT:cffa0e8d
-    default::refs/heads/not-master => GIT:7eeab2ea
     default::refs/heads/master => GIT:cc119202
+[0]
+% this should fail, no changes to push
+pushing to git://localhost/gitrepo
+creating and sending data
+no changes found
+[1]

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to