hgsubversion | 12 Apr 18:36 2014

2 new revisions pushed by durin42 on 2014-04-12 16:36 GMT

2 new revisions:

Revision: 8b20e1bbcd23
Branch:   default
Author:   Durham Goode <durham@...>
Date:     Wed Apr  9 23:17:13 2014 UTC
Log:      push: update push logic to match mercurial upstream...
http://code.google.com/p/hgsubversion/source/detail?r=8b20e1bbcd23

Revision: b04758acf410
Branch:   default
Author:   Augie Fackler <raf@...>
Date:     Sat Apr 12 15:02:11 2014 UTC
Log:      wrappers: note which version of hg e10000369b47 is from
http://code.google.com/p/hgsubversion/source/detail?r=b04758acf410

==============================================================================
Revision: 8b20e1bbcd23
Branch:   default
Author:   Durham Goode <durham@...>
Date:     Wed Apr  9 23:17:13 2014 UTC
Log:      push: update push logic to match mercurial upstream

Commit e10000369b47 in upstream Mercurial changed the checkpush function
signature. So we need to update hgsubversion accordingly.

Ran the tests against the tip of the hg repo, against a version of hg from
January before the exchange module, and against a version of hg after
pushoperations was added but before checkpush used it, and the tests passed  
in
(Continue reading)

Durham Goode | 10 Apr 01:28 2014

[PATCH] push: update push logic to match mercurial upstream

# HG changeset patch
# User Durham Goode <durham@...>
# Date 1397085433 25200
#      Wed Apr 09 16:17:13 2014 -0700
# Node ID 850eb303767b93e2bf6e3bd1bc2b5b59cfdca256
# Parent  c55b94dc3a4831208b7b1888d1d6f2f1496480e6
push: update push logic to match mercurial upstream

Commit e10000369b47 in upstream Mercurial changed the checkpush function
signature. So we need to update hgsubversion accordingly.

Ran the tests against the tip of the hg repo, against a version of hg from
January before the exchange module, and against a version of hg after
pushoperations was added but before checkpush used it, and the tests passed in
all cases.

diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
 <at>  <at>  -180,7 +180,14  <at>  <at> 
     cmdutil.bailifchanged(repo)
     checkpush = getattr(repo, 'checkpush', None)
     if checkpush:
-        checkpush(force, revs)
+        try:
+            # The checkpush function changed as of e10000369b47 in mercurial
+            from mercurial.exchange import pushoperation
+            pushop = pushoperation(repo, dest, force, revs, False)
+            checkpush(pushop)
+        except (ImportError, TypeError):
(Continue reading)

hgsubversion | 5 Apr 03:53 2014

2 new revisions pushed by durin42 on 2014-04-05 01:53 GMT

2 new revisions:

Revision: 61d4fb78370b
Branch:   stable
Author:   Augie Fackler <raf@...>
Date:     Sat Apr  5 01:27:55 2014 UTC
Log:      pull: fix pull when phases.new-commit=secret...
http://code.google.com/p/hgsubversion/source/detail?r=61d4fb78370b

Revision: c55b94dc3a48
Branch:   default
Author:   Augie Fackler <raf@...>
Date:     Sat Apr  5 01:28:42 2014 UTC
Log:      Merge with stable.
http://code.google.com/p/hgsubversion/source/detail?r=c55b94dc3a48

==============================================================================
Revision: 61d4fb78370b
Branch:   stable
Author:   Augie Fackler <raf@...>
Date:     Sat Apr  5 01:27:55 2014 UTC
Log:      pull: fix pull when phases.new-commit=secret

This was causing subtle failures during pull. I believe the line where
we manually "set phase to public" isn't required any more, but more
work is required to verify that behavior on all versions of hg, so
we'll do that as a followup on default if needed.
http://code.google.com/p/hgsubversion/source/detail?r=61d4fb78370b

Modified:
(Continue reading)

hgsubversion | 5 Apr 03:02 2014

8 new revisions pushed by durin42 on 2014-04-05 01:02 GMT

8 new revisions:

Revision: cb14dba562eb
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:43 2014 UTC
Log:      svncommands: add svnmeta object...
http://code.google.com/p/hgsubversion/source/detail?r=cb14dba562eb

Revision: 3028f083bd95
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:43 2014 UTC
Log:      svncommands: use meta.metapath...
http://code.google.com/p/hgsubversion/source/detail?r=3028f083bd95

Revision: 52de1f3b6824
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:43 2014 UTC
Log:      svncommands: use meta.uuid instead of duplicating code...
http://code.google.com/p/hgsubversion/source/detail?r=52de1f3b6824

Revision: eba7de99c576
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Mon Mar 24 16:20:43 2014 UTC
Log:      svncommands: use meta.subdir instead of duplicating code...
http://code.google.com/p/hgsubversion/source/detail?r=eba7de99c576

(Continue reading)

Sean Farley | 4 Apr 04:30 2014
Picon

[PATCH 1 of 8] svncommands: add svnmeta object

# HG changeset patch
# User Sean Farley <sean.michael.farley@...>
# Date 1395678043 18000
#      Mon Mar 24 11:20:43 2014 -0500
# Node ID dd024095aa5b2675f0dc429f7ba4fbae3cfb3cd0
# Parent  8693c9558f1a8a8be5080458867a9f2ac4d28be1
svncommands: add svnmeta object

This patch adds a svnmeta object that currently does nothing but will be used
in upcoming patches to remove code duplication and unify svn meta data.

diff --git a/hgsubversion/svncommands.py b/hgsubversion/svncommands.py
--- a/hgsubversion/svncommands.py
+++ b/hgsubversion/svncommands.py
 <at>  <at>  -16,10 +16,11  <at>  <at>  import maps
 import svnwrap
 import svnrepo
 import util
 import svnexternals
 import verify
+import svnmeta

 
 def updatemeta(ui, repo, args, **opts):
     """Do a partial rebuild of the subversion metadata.

 <at>  <at>  -51,10 +52,12  <at>  <at>  def _buildmeta(ui, repo, args, partial=F
         validateuuid = True
     elif len(args) > 1:
         raise hgutil.Abort('rebuildmeta takes 1 or no arguments')
(Continue reading)

hgsubversion | 25 Mar 19:20 2014

15 new revisions pushed by durin42 on 2014-03-25 18:19 GMT

15 new revisions:

Revision: 56f426d0261f
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Tue Feb 18 23:16:28 2014 UTC
Log:      util: add resave bool parameter to load...
http://code.google.com/p/hgsubversion/source/detail?r=56f426d0261f

Revision: 91d685418490
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Tue Feb 18 23:19:29 2014 UTC
Log:      util: fallback to raw string reading if pickle fails...
http://code.google.com/p/hgsubversion/source/detail?r=91d685418490

Revision: 34173bbd3b8e
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Tue Feb 18 23:17:02 2014 UTC
Log:      tests: use util.load instead of reading file directly
http://code.google.com/p/hgsubversion/source/detail?r=34173bbd3b8e

Revision: 510fa46caf9c
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Sat Mar 15 00:44:35 2014 UTC
Log:      uuid: use util.dump and util.load for writing and reading...
http://code.google.com/p/hgsubversion/source/detail?r=510fa46caf9c

(Continue reading)

Sean Farley | 17 Mar 22:02 2014
Picon

[PATCH 01 of 15 cleanup V2] util: add resave bool parameter to load

# HG changeset patch
# User Sean Farley <sean.michael.farley@...>
# Date 1392765388 21600
#      Tue Feb 18 17:16:28 2014 -0600
# Node ID fef8898fff007cb47489e7ef62b8cd273d0f9ef9
# Parent  4cdb0e95604f657fb49acca19600c0b048eb6795
util: add resave bool parameter to load

This parameter is needed as a stopgap so that tests can use the common
util.load method without having to change the format of the file. It isn't used
now but will be in upcoming patches.

diff --git a/hgsubversion/util.py b/hgsubversion/util.py
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
 <at>  <at>  -155,11 +155,11  <at>  <at>  def dump(data, file_path):
     """
     f = hgutil.atomictempfile(file_path, 'w+b', 0644)
     json.dump(_convert(data, _scrub), f)
     f.close()

-def load(file_path, default=None):
+def load(file_path, default=None, resave=True):
     """Deserialize some data from a path.
     """
     data = default
     if not os.path.exists(file_path):
         return data
 <at>  <at>  -172,11 +172,12  <at>  <at>  def load(file_path, default=None):
         # Ok, JSON couldn't be loaded, so we'll try the old way of using pickle
(Continue reading)

Sean Farley | 15 Mar 01:52 2014
Picon

[PATCH 01 of 15 cleanup] util: add resave bool parameter to load

# HG changeset patch
# User Sean Farley <sean.michael.farley@...>
# Date 1392765388 21600
#      Tue Feb 18 17:16:28 2014 -0600
# Node ID fef8898fff007cb47489e7ef62b8cd273d0f9ef9
# Parent  4cdb0e95604f657fb49acca19600c0b048eb6795
util: add resave bool parameter to load

This parameter is needed as a stopgap so that tests can use the common
util.load method without having to change the format of the file. It isn't used
now but will be in upcoming patches.

diff --git a/hgsubversion/util.py b/hgsubversion/util.py
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
 <at>  <at>  -155,11 +155,11  <at>  <at>  def dump(data, file_path):
     """
     f = hgutil.atomictempfile(file_path, 'w+b', 0644)
     json.dump(_convert(data, _scrub), f)
     f.close()

-def load(file_path, default=None):
+def load(file_path, default=None, resave=True):
     """Deserialize some data from a path.
     """
     data = default
     if not os.path.exists(file_path):
         return data
 <at>  <at>  -172,11 +172,12  <at>  <at>  def load(file_path, default=None):
         # Ok, JSON couldn't be loaded, so we'll try the old way of using pickle
(Continue reading)

hgsubversion | 19 Feb 22:05 2014

20 new revisions pushed by durin42 on 2014-02-19 21:05 GMT

20 new revisions:

Revision: eaefb3413b87
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Fri Aug 23 15:46:08 2013 UTC
Log:      util: rename pickle_atomic to dump...
http://code.google.com/p/hgsubversion/source/detail?r=eaefb3413b87

Revision: 2922f4881a04
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Fri Aug 23 15:54:20 2013 UTC
Log:      util: add a method to load data from a file
http://code.google.com/p/hgsubversion/source/detail?r=2922f4881a04

Revision: 063cae4e35af
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Fri Aug 23 15:57:09 2013 UTC
Log:      layouts: use util.load instead of bare pickle
http://code.google.com/p/hgsubversion/source/detail?r=063cae4e35af

Revision: ed4804ee68c4
Branch:   default
Author:   Sean Farley <sean.michael.farley@...>
Date:     Fri Aug 23 15:58:03 2013 UTC
Log:      svnmeta: use util.load instead of bare pickle
http://code.google.com/p/hgsubversion/source/detail?r=ed4804ee68c4

(Continue reading)

Sean Farley | 17 Feb 19:34 2014
Picon

[PATCH 01 of 20 V3] util: rename pickle_atomic to dump

# HG changeset patch
# User Sean Farley <sean.michael.farley@...>
# Date 1377272768 18000
#      Fri Aug 23 10:46:08 2013 -0500
# Node ID ed61e3f7cd44ac1c091886fb294a56a3d9107c84
# Parent  cb4dccc90ff1ef75017be49daf8bc85dcb7214ef
util: rename pickle_atomic to dump

This is in preparation for an upcoming patch that will add a 'load' method to
util.

diff --git a/hgsubversion/layouts/standard.py b/hgsubversion/layouts/standard.py
--- a/hgsubversion/layouts/standard.py
+++ b/hgsubversion/layouts/standard.py
 <at>  <at>  -74,11 +74,11  <at>  <at>  class StandardLayout(base.BaseLayout):
                 f.close()
             else:
                 self._tag_locations = self.ui.configlist('hgsubversion',
                                                         'tagpaths',
                                                         ['tags'])
-            util.pickle_atomic(self._tag_locations, tag_locations_file)
+            util.dump(self._tag_locations, tag_locations_file)

             # ensure nested paths are handled properly
             self._tag_locations.sort()
             self._tag_locations.reverse()

diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
(Continue reading)

Sean Farley | 15 Feb 23:17 2014
Picon

[PATCH 01 of 12 V2] util: add visitor pattern for scrubbing json

# HG changeset patch
# User Sean Farley <sean.michael.farley@...>
# Date 1392450397 21600
#      Sat Feb 15 01:46:37 2014 -0600
# Node ID cd6ba0a5cefed4d192e6592b63c33e3b727d54d6
# Parent  c330c260057099dc09763fddc68144596b833522
util: add visitor pattern for scrubbing json

These functions are for future patches that will add safer serialization via
json. '_convert' is a visitor pattern that will be used for lists,
dictionaries, and strings for helping convert None to the empty string since
json forbids 'null' as a key for a dictionary.

None -> '' is a safe mapping because this is for the 'branch_info' variable
which already maps the empty string to None.

Note, also, that json is chosen instead of, say, csv because json has a concept
of 'null' and will better handle utf8 strings (which subversion supports).

Important: this changes the requirement of hgsubversion to python 2.6+.

diff --git a/hgsubversion/util.py b/hgsubversion/util.py
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
 <at>  <at>  -140,10 +140,34  <at>  <at>  def save_string(file_path, string):
         string = ""
     f = open(file_path, 'wb')
     f.write(str(string))
     f.close()

(Continue reading)


Gmane