[PATCH 4 of 4 RFC V2] DO NOT COMMIT; test-identify: give examples of formatdebug output

David Carr davidmc24 at gmail.com
Sun Sep 16 00:45:00 CDT 2012


# HG changeset patch
# User David M. Carr  <david at carrclan.us>
# Date 1347774236 14400
# Node ID 01d96f926c157c4b06c34cb724680056df744a70
# Parent  1ae6f841281c9f0c7f8924613c1d0ee285d6a679
DO NOT COMMIT; test-identify: give examples of formatdebug output

diff --git a/tests/test-identify.t b/tests/test-identify.t
--- a/tests/test-identify.t
+++ b/tests/test-identify.t
@@ -22,39 +22,87 @@
 
   $ hg id
   cb9a9f314b8b tip
+  $ hg id --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': False, 'num': '0', 'branch': 'default', 'bookmarks': []},
+  }
   $ hg id --debug
   cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b tip
+  $ hg id --debug --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': False, 'num': '0', 'branch': 'default', 'bookmarks': []},
+  }
   $ hg id -q
   cb9a9f314b8b
+  $ hg id -q --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': False, 'num': '0', 'branch': 'default', 'bookmarks': []},
+  }
   $ hg id -v
   cb9a9f314b8b tip
+  $ hg id -v --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': False, 'num': '0', 'branch': 'default', 'bookmarks': []},
+  }
 
 with options
 
   $ hg id -r.
   cb9a9f314b8b tip
+  $ hg id -r. --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'bookmarks': [], 'num': '0', 'branch': 'default', 'tags': ['tip']},
+  }
   $ hg id -n
   0
+  $ hg id -n --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': False, 'num': '0', 'branch': 'default', 'bookmarks': []},
+  }
   $ hg id -t
   tip
+  $ hg id -t --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': False, 'num': '0', 'branch': 'default', 'bookmarks': []},
+  }
   $ hg id -b
   default
+  $ hg id -b --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': False, 'num': '0', 'branch': 'default', 'bookmarks': []},
+  }
   $ hg id -i
   cb9a9f314b8b
+  $ hg id -i --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': False, 'num': '0', 'branch': 'default', 'bookmarks': []},
+  }
   $ hg id -n -t -b -i
   cb9a9f314b8b 0 default tip
+  $ hg id -n -t -b -i --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': False, 'num': '0', 'branch': 'default', 'bookmarks': []},
+  }
 
 with modifications
 
   $ echo b > a
   $ hg id -n -t -b -i
   cb9a9f314b8b+ 0+ default tip
+  $ hg id -n -t -b -i --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': True, 'num': '0', 'branch': 'default', 'bookmarks': []},
+  }
 
 other local repo
 
   $ cd ..
   $ hg -R test id
   cb9a9f314b8b+ tip
+  $ hg -R test id --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': True, 'num': '0', 'branch': 'default', 'bookmarks': []},
+  }
 #if no-outer-repo
   $ hg id test
   cb9a9f314b8b+ tip
@@ -67,6 +115,10 @@
   $ cat hg.pid >> $DAEMON_PIDS
   $ hg id http://localhost:$HGPORT1/
   cb9a9f314b8b
+  $ hg id http://localhost:$HGPORT1/ --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'bookmarks': []},
+  }
 
 remote with rev number?
 
@@ -95,19 +147,43 @@
    * Z                         0:cb9a9f314b8b
   $ hg id
   cb9a9f314b8b+ tip Y/Z
+  $ hg id --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': True, 'num': '0', 'branch': 'default', 'bookmarks': ['Y', 'Z']},
+  }
   $ hg id --bookmarks
   Y Z
+  $ hg id --bookmarks --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'tags': ['tip'], 'changed': False, 'num': '0', 'branch': 'default', 'bookmarks': ['Y', 'Z']},
+  }
 
 test remote identify with bookmarks
 
   $ hg id http://localhost:$HGPORT1/
   cb9a9f314b8b Y/Z
+  $ hg id http://localhost:$HGPORT1/ --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'bookmarks': ['Y', 'Z']},
+  }
   $ hg id --bookmarks http://localhost:$HGPORT1/
   Y Z
+  $ hg id --bookmarks http://localhost:$HGPORT1/ --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'bookmarks': ['Y', 'Z']},
+  }
   $ hg id -r . http://localhost:$HGPORT1/
   cb9a9f314b8b Y/Z
+  $ hg id -r . http://localhost:$HGPORT1/ --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'bookmarks': ['Y', 'Z']},
+  }
   $ hg id --bookmarks -r . http://localhost:$HGPORT1/
   Y Z
+  $ hg id --bookmarks -r . http://localhost:$HGPORT1/ --config ui.formatdebug=true
+  identify = {
+      {'node': 'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b', 'bookmarks': ['Y', 'Z']},
+  }
 
 with multiple parents
 
@@ -123,6 +199,10 @@
   (branch merge, don't forget to commit)
   $ hg id -n -t -b -i
   d2ae7f538514+bf02f68f2f4a+ 2+1+ default tip
+  $ hg id -n -t -b -i --config ui.formatdebug=true
+  identify = {
+      {'nums': ['2', '1'], 'tags': ['tip'], 'changed': True, 'branch': 'default', 'nodes': ['d2ae7f538514cd87c17547b0de4cea71fe1af9fb', 'bf02f68f2f4a577618a92513364b6f4ab6a3d5f6'], 'bookmarks': ['Z']},
+  }
 
 Make sure we do not obscure unknown requires file entries (issue2649)
 


More information about the Mercurial-devel mailing list