hgsubversion | 16 Dec 19:37 2014

2 new revisions pushed by durin42 on 2014-12-16 18:37 GMT

2 new revisions:

Revision: 9e85feb93984
Branch:   default
Author:   Mateusz Kwapich <mitrandir@...>
Date:     Sat Dec 13 00:17:11 2014 UTC
Log:      wrappers: improve push performance by reusing the existing  
metadata...
https://code.google.com/p/hgsubversion/source/detail?r=9e85feb93984

Revision: 9a722b5246df
Branch:   default
Author:   Mateusz Kwapich <mitrandir@...>
Date:     Sat Dec 13 00:32:34 2014 UTC
Log:      maps: cache hashes() for the revmap...
https://code.google.com/p/hgsubversion/source/detail?r=9a722b5246df

==============================================================================
Revision: 9e85feb93984
Branch:   default
Author:   Mateusz Kwapich <mitrandir@...>
Date:     Sat Dec 13 00:17:11 2014 UTC
Log:      wrappers: improve push performance by reusing the existing  
metadata

Push operation for n commits regenerated SVNMeta class 2*n+1 times
(one time at beginning, n times in push() loop, 1 time per each of n
pulls). This operation is very costly when the revision map is big.

This commit reuses this metadata every time when there is no rebase
(Continue reading)

Mateusz Kwapich | 16 Dec 01:56 2014

[PATCH 1 of 2] wrappers: improve push performance by reusing the existing metadata

# HG changeset patch
# User Mateusz Kwapich <mitrandir@...>
# Date 1418429831 28800
#      Fri Dec 12 16:17:11 2014 -0800
# Node ID edaa02033c3bdbed2be26f41aa4f9dad24dd7338
# Parent  7bbe120be1938ec17608bfcf25f747cd7a1bc2fc
wrappers: improve push performance by reusing the existing metadata

Push operation for n commits regenerated SVNMeta class 2*n+1 times
(one time at beginning, n times in push() loop, 1 time per each of n
pulls). This operation is very costly when the revision map is big.

This commit reuses this metadata every time when there is no rebase
made between svn commits which leads to 1 metadata rebuild in optimistic
case and n+1 metadata rebuilds in pessimistic case (rebase after every commit).

To achieve this I added extra parameter to pull command to pass metadata
to it.

All unit tests are passing for this change.

diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
 <at>  <at>  -261,6 +261,8  <at>  <at> 

                 # Don't trust the pre-rebase repo and context.
                 repo = getlocalpeer(ui, {}, meta.path)
+                meta = repo.svnmeta(svn.uuid, svn.subdir)
+                hashes = meta.revmap.hashes()
(Continue reading)

Sean Farley | 15 Dec 17:57 2014
Picon

[PATCH 1 of 7] svnmeta: add generated cached branch property

# HG changeset patch
# User Sean Farley <sean.michael.farley@...>
# Date 1395678053 18000
#      Mon Mar 24 11:20:53 2014 -0500
# Node ID 6f3f6a4c028576150e5b12a241a954864e836707
# Parent  4dbba18b77bad965218663b5e1644f4de622b235
svnmeta: add generated cached branch property

diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
 <at>  <at>  -54,10 +54,11  <at>  <at>  class SVNMeta(object):
         self._gen_cachedconfig('defaultauthors', True)
         self._gen_cachedconfig('caseignoreauthors', False)
         self._gen_cachedconfig('defaulthost', self.uuid)
         self._gen_cachedconfig('usebranchnames', True)
         self._gen_cachedconfig('defaultmessage', '')
+        self._gen_cachedconfig('branch', '')

         # misc
         self.branches = util.load(self.branch_info_file) or {}
         self.prevbranches = dict(self.branches)
         self._layout = layouts.detect.layout_from_file(self)

--

-- 
You received this message because you are subscribed to the Google Groups "hgsubversion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hgsubversion+unsubscribe@...
To post to this group, send email to hgsubversion@...
Visit this group at http://groups.google.com/group/hgsubversion.
For more options, visit https://groups.google.com/d/optout.
(Continue reading)

hgsubversion | 15 Dec 15:25 2014

4 new revisions pushed by durin42 on 2014-12-15 14:25 GMT

4 new revisions:

Revision: d29a3f988b74
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:53 2014 UTC
Log:      svnmeta: remove unneeded call to self.taglocations...
https://code.google.com/p/hgsubversion/source/detail?r=d29a3f988b74

Revision: 3549a84bdebe
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:53 2014 UTC
Log:      svnmeta: remove taglocations property...
https://code.google.com/p/hgsubversion/source/detail?r=3549a84bdebe

Revision: 13f8e9cc90c6
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:53 2014 UTC
Log:      layouts: generate cached taglocations property...
https://code.google.com/p/hgsubversion/source/detail?r=13f8e9cc90c6

Revision: 7bbe120be193
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:53 2014 UTC
Log:      layouts: turn taglocations method into a property...
https://code.google.com/p/hgsubversion/source/detail?r=7bbe120be193

(Continue reading)

Sean Farley | 14 Dec 22:22 2014
Picon

[PATCH 1 of 4] svnmeta: remove unneeded call to self.taglocations

# HG changeset patch
# User Sean Farley <sean.michael.farley@...>
# Date 1395678053 18000
#      Mon Mar 24 11:20:53 2014 -0500
# Node ID 37042067ea50e75edd5dd5803e586674725bf502
# Parent  1553a4b612218ff7f909afe2970f07e1df7cfc81
svnmeta: remove unneeded call to self.taglocations

This is the only call to taglocations, therefore we remove it so that we can
remove the property in the next patch.

diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
 <at>  <at>  -387,11 +387,12  <at>  <at>  class SVNMeta(object):

         Note that it's only a tag if it was copied from the path '' in a branch
         (or tag) we have, for our purposes.
         """
         path = self.normalize(path)
-        return self.layoutobj.get_path_tag(path, self.taglocations)
+        tloc = self.layoutobj.taglocations(self.metapath)
+        return self.layoutobj.get_path_tag(path, tloc)

     def split_branch_path(self, path, existing=True):
         """Figure out which branch inside our repo this path represents, and
         also figure out which path inside that branch it is.

--

-- 
You received this message because you are subscribed to the Google Groups "hgsubversion" group.
(Continue reading)

hgsubversion | 11 Dec 17:22 2014

12 new revisions pushed by durin42 on 2014-12-11 16:21 GMT

12 new revisions:

Revision: ada9b39a9eb8
Branch:   default
Author:   Augie Fackler <raf@...>
Date:     Mon Dec  8 21:49:52 2014 UTC
Log:      stupid: remove code that's only used by hg < 1.9...
https://code.google.com/p/hgsubversion/source/detail?r=ada9b39a9eb8

Revision: 2ae577a4cd56
Branch:   default
Author:   Augie Fackler <raf@...>
Date:     Mon Dec  8 21:50:22 2014 UTC
Log:      stupid: dedent some code...
https://code.google.com/p/hgsubversion/source/detail?r=2ae577a4cd56

Revision: b5520673f6f2
Branch:   stable
Author:   Sean Farley <sean.michael.farley@...>
Date:     Wed Dec 10 22:04:55 2014 UTC
Log:      pull: adapt from upstream changes to transactions...
https://code.google.com/p/hgsubversion/source/detail?r=b5520673f6f2

Revision: c791efb7082a
Branch:   default
Author:   Augie Fackler <raf@...>
Date:     Thu Dec 11 03:47:18 2014 UTC
Log:      Merge with stable.
https://code.google.com/p/hgsubversion/source/detail?r=c791efb7082a

(Continue reading)

Sean Farley | 10 Dec 23:16 2014
Picon

[PATCH 1 of 8] svnmeta: copy util.getmessage to here so we can refactor

# HG changeset patch
# User Sean Farley <sean.michael.farley@...>
# Date 1395678051 18000
#      Mon Mar 24 11:20:51 2014 -0500
# Node ID 871b0977a649d2147526dd82d33884827e87c73a
# Parent  db50b6717273ee8330f3cf7ce471f1c5331f4083
svnmeta: copy util.getmessage to here so we can refactor

This doesn't do anything currently but will be used in upcoming patches to
refactor the call to ui.config.

diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
 <at>  <at>  -364,10 +364,24  <at>  <at>  class SVNMeta(object):

      <at> property
     def taglocations(self):
         return self.layoutobj.taglocations(self.metapath)

+    def getmessage(self, rev):
+        msg = rev.message
+
+        if msg:
+            try:
+                msg.decode('utf-8')
+                return msg
+
+            except UnicodeDecodeError:
+                # ancient svn failed to enforce utf8 encoding
(Continue reading)

Sean Farley | 10 Dec 23:13 2014
Picon

[PATCH] pull: adapt from upstream changes to transactions

# HG changeset patch
# User Sean Farley <sean.michael.farley@...>
# Date 1418249095 28800
#      Wed Dec 10 14:04:55 2014 -0800
# Node ID db50b6717273ee8330f3cf7ce471f1c5331f4083
# Parent  cc1e2c8cdaa62b626969ff0ba618ddc3a22b8d2e
pull: adapt from upstream changes to transactions

Mercurial rev 52db731b964d introduced a transaction manager upstream. This
means that the closetransaction and releasetransaction methods on the pull
operation have gone away.

Code mostly based on Siddharth Agarwal's work on hg-git.

diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
 <at>  <at>  -519,17 +519,27  <at>  <at>  def pull(repo, source, heads=[], force=F
         ui.status("pulled %d revisions\n" % revisions)

 def exchangepull(orig, repo, remote, heads=None, force=False, bookmarks=()):
     capable = getattr(remote, 'capable', lambda x: False)
     if capable('subversion'):
+        # transaction manager is present in Mercurial >= 3.3
+        try:
+            trmanager = getattr(exchange, 'transactionmanager')
+        except AttributeError:
+            trmanager = None
         pullop = exchange.pulloperation(repo, remote, heads, force,
                                         bookmarks=bookmarks)
(Continue reading)

Augie Fackler | 9 Dec 17:12 2014

[PATCH 1 of 2] stupid: remove code that's only used by hg < 1.9

# HG changeset patch
# User Augie Fackler <raf@...>
# Date 1418075392 18000
#      Mon Dec 08 16:49:52 2014 -0500
# Node ID ada9b39a9eb82d341d64c10fce1bbd46fff36425
# Parent  cc1e2c8cdaa62b626969ff0ba618ddc3a22b8d2e
stupid: remove code that's only used by hg < 1.9

Mercurial 1.9 is over three years old at this point, so I'm willing to
drop this code, as there's been an Ubuntu LTS release since then.

diff --git a/hgsubversion/stupid.py b/hgsubversion/stupid.py
--- a/hgsubversion/stupid.py
+++ b/hgsubversion/stupid.py
 <at>  <at>  -171,40 +171,7  <at>  <at>  def filteriterhunks(meta):
                 yield data
     return filterhunks

-def patchrepoold(ui, meta, parentctx, patchfp):
-    files = {}
-    try:
-        oldpatchfile = patch.patchfile
-        olditerhunks = patch.iterhunks
-        patch.patchfile = mempatchproxy(parentctx, files)
-        patch.iterhunks = filteriterhunks(meta)
-        try:
-            # We can safely ignore the changed list since we are
-            # handling non-git patches. Touched files are known
-            # by our memory patcher.
-            patch_st = patch.applydiff(ui, patchfp, {}, strip=0)
(Continue reading)

hgsubversion | 28 Nov 17:10 2014

10 new revisions pushed by durin42 on 2014-11-28 16:10 GMT

10 new revisions:

Revision: 5f86e2ac7659
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:50 2014 UTC
Log:      svnmeta: add pre-transformation parameter to cached generator...
https://code.google.com/p/hgsubversion/source/detail?r=5f86e2ac7659

Revision: fadacedaf391
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:50 2014 UTC
Log:      layouts: add cached branchdir property to standard...
https://code.google.com/p/hgsubversion/source/detail?r=fadacedaf391

Revision: 738c685f893c
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:50 2014 UTC
Log:      layouts: use meta.branchdir in standard
https://code.google.com/p/hgsubversion/source/detail?r=738c685f893c

Revision: 04ead6e0b9de
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:50 2014 UTC
Log:      layouts: remove unused _branch_dir in standard
https://code.google.com/p/hgsubversion/source/detail?r=04ead6e0b9de

(Continue reading)

Sean Farley | 26 Nov 21:14 2014
Picon

[PATCH 01 of 10] svnmeta: add pre-transformation parameter to cached generator

# HG changeset patch
# User Sean Farley <sean.michael.farley@...>
# Date 1395678050 18000
#      Mon Mar 24 11:20:50 2014 -0500
# Node ID 5c538677f4cc9a8ed9c065a7aa046471501adc57
# Parent  5ee3e5030a35d00173359e10e90bf07e7377a680
svnmeta: add pre-transformation parameter to cached generator

This allows us to do some custom transformation of a value when loading a
config value.

diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
 <at>  <at>  -59,11 +59,11  <at>  <at>  class SVNMeta(object):
         # misc
         self.branches = util.load(self.branch_info_file) or {}
         self.prevbranches = dict(self.branches)
         self._layout = layouts.detect.layout_from_file(self)

-    def _get_cachedconfig(self, name, filename, configname, default):
+    def _get_cachedconfig(self, name, filename, configname, default, pre):
         """Return a cached value for a config option. If the cache is uninitialized
         then try to read its value from disk. Option can be overridden by the
         commandline.
             name: property name, e.g. 'lastpulled'
             filename: name of file in .hg/svn
 <at>  <at>  -97,10 +97,14  <at>  <at>  class SVNMeta(object):

             # prefer the non-default, and the one sent from command-line
(Continue reading)


Gmane