[cig-commits] commit: snapshot: update existing but do not add new path aliases

Mercurial hg at geodynamics.org
Mon Nov 24 11:26:55 PST 2008


changeset:   26:6db2e2e67ae5
parent:      24:2d991bfffb86
user:        Robin Farine <robin.farine at terminus.org>
date:        Mon Nov 06 16:52:33 2006 +0100
files:       forest.py
description:
snapshot: update existing but do not add new path aliases

When 'fsnap' updates a snapshot file, it now only updates existing
path aliases.

We can still create a snapshot with all the path aliases for each
repository by not passing a snapshot file to update in argument.


diff -r 2d991bfffb86 -r 6db2e2e67ae5 forest.py
--- a/forest.py	Fri Nov 03 13:21:48 2006 +0000
+++ b/forest.py	Mon Nov 06 16:52:33 2006 +0100
@@ -107,7 +107,7 @@ class ForestSnapshot(object):
         def update(self, rev, paths):
             self.rev = rev
             for name, path in paths.items():
-                if not self.paths.has_key(name):
+                if self.paths.has_key(name):
                     self.paths[name] = path
 
         def write(self, ui, section):
@@ -172,8 +172,10 @@ class ForestSnapshot(object):
         """Update a snapshot by scanning a forest.
 
         If the ForestSnapshot instance to update was initialized from
-        a snapshot file, this regenerate the list of trees with their
-        current revisions but existing path aliases are not touched.
+        a snapshot file, this regenerates the list of trees with their
+        current revisions but does not add any path alias to updated
+        tree entries. Newly created tree entries get all the path aliases
+        from the corresponding repository.
         """
 
         rootmap = {}



More information about the CIG-COMMITS mailing list