merge with main
authorThomas Arendsen Hein <thomas@intevation.de>
Tue, 15 Jan 2008 23:04:44 +0100
changeset 5862 ad08dfad7e7b
parent 5860 493632bb171c (current diff)
parent 5858 e7ed5d07cc4c (diff)
child 5864 88783c8b5660
merge with main
--- a/mercurial/commands.py	Tue Jan 15 13:29:59 2008 +0200
+++ b/mercurial/commands.py	Tue Jan 15 23:04:44 2008 +0100
@@ -670,11 +670,11 @@
     for file_, ent in k:
         if ent[3] == -1:
             # Pad or slice to locale representation
-            locale_len = len(time.strftime("%x %X", time.localtime(0)))
+            locale_len = len(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(0)))
             timestr = 'unset'
             timestr = timestr[:locale_len] + ' '*(locale_len - len(timestr))
         else:
-            timestr = time.strftime("%x %X", time.localtime(ent[3]))
+            timestr = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(ent[3]))
         if ent[1] & 020000:
             mode = 'lnk'
         else:
--- a/mercurial/merge.py	Tue Jan 15 13:29:59 2008 +0200
+++ b/mercurial/merge.py	Tue Jan 15 23:04:44 2008 +0100
@@ -210,21 +210,23 @@
     for f in u2:
         checkcopies(ctx(f, m2[f]), m1, ma)
 
-    d2 = {}
+    diverge2 = {}
     for of, fl in diverge.items():
-        for f in fl:
-            fo = list(fl)
-            fo.remove(f)
-            d2[f] = (of, fo)
+        if len(fl) == 1:
+            del diverge[of] # not actually divergent
+        else:
+            diverge2.update(dict.fromkeys(fl)) # reverse map for below
 
     if fullcopy:
         repo.ui.debug(_("  all copies found (* = to merge, ! = divergent):\n"))
         for f in fullcopy:
             note = ""
             if f in copy: note += "*"
-            if f in diverge: note += "!"
+            if f in diverge2: note += "!"
             repo.ui.debug(_("   %s -> %s %s\n") % (f, fullcopy[f], note))
 
+    del diverge2
+
     if not fullcopy or not repo.ui.configbool("merge", "followdirs", True):
         return copy, diverge
 
--- a/tests/test-convert-hg-sink.out	Tue Jan 15 13:29:59 2008 +0200
+++ b/tests/test-convert-hg-sink.out	Tue Jan 15 23:04:44 2008 +0100
@@ -34,7 +34,7 @@
 % dirstate should be empty:
 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % put something in the dirstate:
-a   0         -1 unset             baz
+a   0         -1 unset               baz
 copy: bar -> baz
 % add a new revision in the original repo
 scanning source...
--- a/tests/test-filebranch	Tue Jan 15 13:29:59 2008 +0200
+++ b/tests/test-filebranch	Tue Jan 15 23:04:44 2008 +0100
@@ -37,7 +37,7 @@
 hg commit -m "branch b" -d "1000000 0"
 
 echo "we shouldn't have anything but n state here"
-hg debugstate | cut -b 1-16,35-
+hg debugstate | cut -b 1-16,37-
 
 echo merging
 hg pull ../a
@@ -48,7 +48,7 @@
 echo new > quux
 
 echo "we shouldn't have anything but foo in merge state here"
-hg debugstate | cut -b 1-16,35- | grep "^m"
+hg debugstate | cut -b 1-16,37- | grep "^m"
 
 hg ci -m "merge" -d "1000000 0"
 
--- a/tests/test-issue522.out	Tue Jan 15 13:29:59 2008 +0200
+++ b/tests/test-issue522.out	Tue Jan 15 23:04:44 2008 +0100
@@ -11,7 +11,7 @@
 getting foo
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
-n   0         -2 unset             foo
+n   0         -2 unset               foo
 M foo
 c6fc755d7e68f49f880599da29f15add41f42f5a 644   foo
    rev    offset  length   base linkrev nodeid       p1           p2
--- a/tests/test-keyword	Tue Jan 15 13:29:59 2008 +0200
+++ b/tests/test-keyword	Tue Jan 15 23:04:44 2008 +0100
@@ -79,6 +79,19 @@
 echo % cat
 cat sym a b
 
+echo % check whether expansion is filewise
+echo '$Id$' > c
+echo 'tests for different changenodes' >> c
+echo % commit c
+hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
+echo % force expansion
+hg -v kwexpand
+echo % compare changenodes in a c
+cat a c
+echo % rollback and remove c
+hg rollback
+rm c
+
 echo % copy
 hg cp a c
 
--- a/tests/test-keyword.out	Tue Jan 15 13:29:59 2008 +0200
+++ b/tests/test-keyword.out	Tue Jan 15 23:04:44 2008 +0100
@@ -146,6 +146,20 @@
 do not process $Id:
 xxx $
 ignore $Id$
+% check whether expansion is filewise
+% commit c
+adding c
+% force expansion
+overwriting a expanding keywords
+overwriting c expanding keywords
+% compare changenodes in a c
+expand $Id: a,v f782df5f9602 1970/01/01 00:00:00 user $
+do not process $Id:
+xxx $
+$Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $
+tests for different changenodes
+% rollback and remove c
+rolling back last transaction
 % copy
 % kwfiles added
 a
--- a/tests/test-rebuildstate	Tue Jan 15 13:29:59 2008 +0200
+++ b/tests/test-rebuildstate	Tue Jan 15 23:04:44 2008 +0100
@@ -12,13 +12,13 @@
 hg rm bar
 
 echo '% state dump'
-hg debugstate | cut -b 1-16,35- | sort
+hg debugstate | cut -b 1-16,37- | sort
 echo '% status'
 hg st -A
 
 hg debugrebuildstate
 echo '% state dump'
-hg debugstate | cut -b 1-16,35- | sort
+hg debugstate | cut -b 1-16,37- | sort
 echo '% status'
 hg st -A
 
--- a/tests/test-rename-merge1.out	Tue Jan 15 13:29:59 2008 +0200
+++ b/tests/test-rename-merge1.out	Tue Jan 15 23:04:44 2008 +0100
@@ -11,9 +11,9 @@
    b
    b2
   all copies found (* = to merge, ! = divergent):
-   c2 -> a2 
+   c2 -> a2 !
    b -> a *
-   b2 -> a2 
+   b2 -> a2 !
   checking for directory renames
  a2: divergent renames -> dr
  a: remote moved to b -> m
--- a/tests/test-rename-merge2.out	Tue Jan 15 13:29:59 2008 +0200
+++ b/tests/test-rename-merge2.out	Tue Jan 15 23:04:44 2008 +0100
@@ -228,8 +228,8 @@
   unmatched files in other:
    c
   all copies found (* = to merge, ! = divergent):
-   c -> a 
-   b -> a 
+   c -> a !
+   b -> a !
   checking for directory renames
  a: divergent renames -> dr
  rev: versions differ -> m