##// END OF EJS Templates
revset: add wdir() function to specify workingctx revision by command...
Yuya Nishihara -
r24419:0e41f110 default
parent child Browse files
Show More
@@ -1852,6 +1852,16 b' def user(repo, subset, x):'
1852 """
1852 """
1853 return author(repo, subset, x)
1853 return author(repo, subset, x)
1854
1854
1855 def wdir(repo, subset, x):
1856 """``wdir()``
1857 Working directory.
1858 """
1859 # i18n: "wdir" is a keyword
1860 getargs(x, 0, 0, _("wdir takes no arguments"))
1861 if None in subset:
1862 return baseset([None])
1863 return baseset()
1864
1855 # for internal use
1865 # for internal use
1856 def _list(repo, subset, x):
1866 def _list(repo, subset, x):
1857 s = getstring(x, "internal error")
1867 s = getstring(x, "internal error")
@@ -1947,6 +1957,7 b' symbols = {'
1947 "tagged": tagged,
1957 "tagged": tagged,
1948 "user": user,
1958 "user": user,
1949 "unstable": unstable,
1959 "unstable": unstable,
1960 "wdir": wdir,
1950 "_list": _list,
1961 "_list": _list,
1951 "_intlist": _intlist,
1962 "_intlist": _intlist,
1952 "_hexlist": _hexlist,
1963 "_hexlist": _hexlist,
@@ -2019,6 +2030,7 b' safesymbols = set(['
2019 "tagged",
2030 "tagged",
2020 "user",
2031 "user",
2021 "unstable",
2032 "unstable",
2033 "wdir",
2022 "_list",
2034 "_list",
2023 "_intlist",
2035 "_intlist",
2024 "_hexlist",
2036 "_hexlist",
@@ -509,6 +509,14 b' Test null revision'
509 1
509 1
510 0
510 0
511
511
512 Test working-directory revision
513 $ hg debugrevspec 'wdir()'
514 None
515 $ hg debugrevspec 'tip or wdir()'
516 9
517 None
518 $ hg debugrevspec '0:tip and wdir()'
519
512 $ log 'outgoing()'
520 $ log 'outgoing()'
513 8
521 8
514 9
522 9
@@ -240,6 +240,17 b" Check 'status -q' and some combinations"
240 $ rm deleted
240 $ rm deleted
241 $ hg copy modified copied
241 $ hg copy modified copied
242
242
243 Specify working directory revision explicitly, that should be the same as
244 "hg status"
245
246 $ hg status --change "wdir()"
247 M modified
248 A added
249 A copied
250 R removed
251 ! deleted
252 ? unknown
253
243 Run status with 2 different flags.
254 Run status with 2 different flags.
244 Check if result is the same or different.
255 Check if result is the same or different.
245 If result is not as expected, raise error
256 If result is not as expected, raise error
General Comments 0
You need to be logged in to leave comments. Login now